GL_DEPTH_TEST and GL_DEPTH_ATTACHMENT

@Vortico is the OpenGL FrameBuffer widget usable for a full scene representation (+ using shaders )?
(on my MAC the scenes are not correctly refreshed when the GL_DEPTH_TEST is on and I clear, frame by frame, using
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); )

solved
had to declare a local nvgluCreateFramebuffer (in a new customOpenGLWidget)

declaring the GL_RENDERBUFFER as GL_DEPTH_COMPONENT
and GL_DEPTH_ATTACHMENT

glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24, w, h);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, fb->rbo);

1 Like