-
Using main depth buffer
I'm porting some code from Direct3D to OpenGL and I'm a bit lost on how to approach the following:
- Render objects to main depth and color buffers (window system provided)
- Create a new render target (application created)
- Turn off depth writes
- Write new geometry to new render target using main depth buffer for depth tests
I was looking into FBOs, but it seems like this is just not possible with them. Any suggestions? Which extensions should I be looking at?
-
Junior Member
Regular Contributor
Re: Using main depth buffer
- Render objects to main depth and color buffers (window system provided)
- Copy depth values from main framebuffer to a depth texture
- Create a new render target & attach it to fbo
- Attach depth texture to fbo
- Turn off depth writes
- Render new geometry
.. that should do the job, though there might be a faster way I didn't think.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules