Jump to content
  • Advertisement
Sign in to follow this  

FBO, textures and MRT

This topic is 2896 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


I'm having several troubles with FBO use and textures attached to them.

1) I first have an FBO with two binded textures. After a draw into it, I'd want to use the same FBO but with only one texture bound. How can I unbound the second one ? Is it ok to just call

I've tried this but it seems that the glClear() still affects the two textures.
(observed with REMEDY gDebugger)

2) I want to reuse the same FBO but with others textures attached. Is that enough to bound new textures using glFramebufferTexture2DEXT() or is there something to do to unbound previous textures properly ?
After a try it seems that the first textures memory is erased once new ones are bound (I observed that they turned to black on gDebugger, but maybe this is a bug or misunderstanding of the software).

Thanks a lot for help.

Share this post

Link to post
Share on other sites
You seem to have the right idea, I'm not sure why it's giving you problems. The red book has to say about glFramebufferTexture2D:

If texture is zero, indicating that any texture bound to attachment is released, and no subsequent bind to attachment is made. In this case, texturetarget, level, and layer are ignored.

I believe you can just call glFramebufferTexture2D to unattach or reattach a different texture. Perhaps your error is elsewhere.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!