Skip to content

Commit

Permalink
Merge pull request #4125 from openscad/fix-black-screen
Browse files Browse the repository at this point in the history
Disable depth test after extracting pixel data.
  • Loading branch information
t-paul committed Feb 17, 2022
2 parents 8d1fa8a + 2d0e8bd commit beeff28
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/MouseSelector.cc
Expand Up @@ -187,6 +187,8 @@ int MouseSelector::select(const Renderer *renderer, int x, int y) {
GLubyte color[3] = { 0 };
glReadPixels(x, y, 1, 1, GL_RGB, GL_UNSIGNED_BYTE, color);
OPENGL_TEST("glReadPixels");
glDisable(GL_DEPTH_TEST);

int index = (uint32_t)color[0] | ((uint32_t)color[1] << 8) | ((uint32_t)color[2] << 16);

// Switch the active framebuffer back to the default
Expand Down

0 comments on commit beeff28

Please sign in to comment.