Jump to content
  • Advertisement
Sign in to follow this  
dimensionX

glDrawPixels + EXT_framebuffer_object

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

Has anyone tried "glDrawPixels() + EXT_framebuffer_object combination ? For example:- ----------- -> create a texture. -> create fbo. -> Bind texture to fbo. -> call glDrawPixels(). -> Texture map the contents of the texture to check if the contents are correct. When I create a texture should I call the glTexImage2D() or will the driver automatically allocate the memory on the GPU ?

Share this post


Link to post
Share on other sites
Advertisement
you need to call glTexImage2D() so the driver knows how big you want the texture to be as well as what format you want. However, you can specify NULL for the data address so you dont need to upload data to it.

Share this post


Link to post
Share on other sites
remember to unbind the framebufferobject again?

glbindframebufferobjectext(gl_framebuffer_ext, 0);

this will do the same as swapbuffers do. if you don't the texture will just be black

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!