From ac99aa398b8cff5517282b05f11adf70cc727b5b Mon Sep 17 00:00:00 2001 From: Szabolcs Dombi Date: Mon, 18 Dec 2023 21:14:53 +0200 Subject: [PATCH] fix default framebuffer parameters --- zengl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zengl.c b/zengl.c index 52ad5573..3e142b8f 100644 --- a/zengl.c +++ b/zengl.c @@ -1781,21 +1781,21 @@ static Context * meth_context(PyObject * self) { res->limits.max_combined_texture_image_units = MAX_SAMPLER_BINDINGS; } + int color_encoding = 0; int red_size = 0; int green_size = 0; int blue_size = 0; int alpha_size = 0; int depth_size = 0; int stencil_size = 0; - int color_encoding = 0; + glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_FRONT_LEFT, GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, &color_encoding); glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_FRONT_LEFT, GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE, &red_size); glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_FRONT_LEFT, GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE, &green_size); glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_FRONT_LEFT, GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE, &blue_size); glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_FRONT_LEFT, GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE, &alpha_size); - glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_FRONT_LEFT, GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE, &depth_size); - glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE, &stencil_size); - glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, &color_encoding); + glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_DEPTH, GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE, &depth_size); + glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_STENCIL, GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE, &stencil_size); res->info_dict = Py_BuildValue( "{szszszszsisisisisisisis{s(iiii)sisisOsO}}",