View Full Version : Framebuffer

01-19-2018, 11:07 PM
what is needed to initialize a framebuffer? One function it works fine and the other function nothing is visible. I cannot spot any difference.-
Any ideas on what to try?

01-20-2018, 12:13 AM
what is needed to initialize a framebuffer?
Create the framebuffer, attach at least one colour, depth and/or stencil buffer to it. Bind, set viewport, clear, render.

If you're having problems, use glGetError() and glCheckFramebufferStatus(). If you're using textures, ensure that they aren't bound to a texture unit at the same time as being attached to a framebuffer (the actual restrictions are a bit more relaxed than that; it's only an issue if the attached mipmap level is capable of being read from).