Skip to content

Commit

Permalink
fix default framebuffer parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
szabolcsdombi committed Dec 18, 2023
1 parent 361f3b9 commit ac99aa3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zengl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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}}",
Expand Down

0 comments on commit ac99aa3

Please sign in to comment.