Jump to content
  • Advertisement
Sign in to follow this  
billconan

OpenGL how to render to texture?

This topic is 4445 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

Advertisement
Hi, I'm interested in the same thing, but I wasn't able to find a tutorial about fbo: it seems that all the tutorials still use render to texture extension...

Share this post


Link to post
Share on other sites
There are three basic methods

- Use FBO extension - the best way if supported
- Use WGL_pbuffer extension - apparently works, but complicated to set up, Windows-only, and has some performance problems
- Render to somewhere else, then use glCopyTexImage2D - the most widely supported, but can be slow for larger textures because of the extra copying involved.

I'd say it depends how often you do it. If performance is not critical, or it's a small texture or something you're only doing occasionally, use glCopyTexImage2D - it really is MUCH easier (Hint: You can render to the back buffer, copy the texture, then clear the back buffer again and do more rendering before you call swapbuffers)

Mark

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!