Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Window
»
OpenGL Depth buffer
Print
Pages: [
1
]
Author
Topic: OpenGL Depth buffer (Read 1911 times)
0 Members and 1 Guest are viewing this topic.
DEElekgolo
Newbie
Posts: 2
OpenGL Depth buffer
«
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?
Logged
Laurent
Administrator
Hero Member
Posts: 32498
OpenGL Depth buffer
«
Reply #1 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.
Logged
Laurent Gomila - SFML developer
DEElekgolo
Newbie
Posts: 2
OpenGL Depth buffer
«
Reply #2 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?
Logged
Laurent
Administrator
Hero Member
Posts: 32498
OpenGL Depth buffer
«
Reply #3 on:
July 03, 2011, 09:31:55 am »
If you want to use them as textures, yes.
Logged
Laurent Gomila - SFML developer
Print
Pages: [
1
]
SFML community forums
»
Help
»
Window
»
OpenGL Depth buffer
anything