SFML community forums

Help => Window => Topic started by: DEElekgolo on June 30, 2011, 05:54:02 am

Title: OpenGL Depth buffer
Post by: DEElekgolo on June 30, 2011, 05:54:02 am
I realize that the openGL context is created for me but how would I manage getting the depth buffer out of it so I pass it to my GLSL shader?
Title: OpenGL Depth buffer
Post by: Laurent on July 02, 2011, 10:33:11 pm
To do what you want, you must use Frame Buffer Objects (FBO). Copying the back buffer to a texture manually would be very very slow.
Title: OpenGL Depth buffer
Post by: DEElekgolo on July 02, 2011, 11:38:33 pm
So I should be binding my own frame buffer/render buffer rather than getting the buffers that the window context already uses?
Title: OpenGL Depth buffer
Post by: Laurent on July 03, 2011, 09:31:55 am
If you want to use them as textures, yes.