Is it necessary to use a renderbuffer for depth? Can we just create a 2D texture and bind it to the framebuffer as depth attachment for depth testing? I tried it like this but it did not work (got black screen). Is it because I have to render-to-texture the depth myself if using a texture? EDIT: nevermind, i forgot to bind the texture
Hey Brian, thanks so much for this informative video. I was wondering if rendering to a framebuffer maintains anti-aliasing? If not, is there a more straightforward way to enable anti-aliasing than having to render to a multi-sampled texture?
I had a lot of issues when trying to do this with objects that have textures. This was my fix: //drawing // the fix glActiveTexture(GL_TEXTURE0); glBindFramebuffer(GL_FRAMEBUFFER, 0); glDisable(GL_DEPTH_TEST);