Jump to content
  • Advertisement
Sign in to follow this  
sofakng

OpenGL Do I need to use pBuffer for rendering to textures?

This topic is 4069 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 looking for the easiest, platform independant way to render something to a texture. I've asked on the GarageGames forums (eg. Torque Game Builder) and they said I should read up on pBuffers. However after doing some searching I found the OpenGL funciton called glCopyTexSubImage2D(). glCopyTexSubImage2D seems like it would be *much* easier to use than a pBuffer (I have no idea what a pBuffer is but it seems more complicated). So, can I use glCopyTexSubImage2D for rendering to a texture? If so, what are the pros/cons versus using a pBuffer? (or other methods?) Thanks, John

Share this post


Link to post
Share on other sites
Advertisement
Look up EXT_framebuffer_object. That's definitely the way to do it these days. PBuffers were used before the framebuffer_object extension became available, but are a lot slower (apparently; I never used them).

Share this post


Link to post
Share on other sites
Ahhh, excellent!

Are there any really dumbed-down tutorials on how to use this?

I'm only doing 2D graphics and I'd just like to create a simple bloom effect by rendering my screen to a smaller texture (via FBOs?) and then stretch it back over the screen using alpha blending...

Share this post


Link to post
Share on other sites
look at the Framebuffer Object 101 article from phantom its aviable on this page in the opengl section

Share this post


Link to post
Share on other sites
Using glCopyTexSubImage2D() is indeed very simple. From what I've read, it should also be quite efficient, since everythinh is happening on the graphics card itself.

Share this post


Link to post
Share on other sites
Quick question...

How can I check if a video card supports the framebuffer object extension?

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!