Jump to content
  • Advertisement
Sign in to follow this  
andy55

OpenGL Fast texture uploading on windows/wgl

This topic is 4488 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 tried searching the forums for this topic, but I couldn't find anything... I'm looking to upload a new CPU-generated frame (into a texture) every frame as fast as possible. I currently use glTexSubImage2D() which of course is normally a blocking operation. Since my frame buffer persists, it would be ideal to use the supplied buffer as the backing store or, at least, perform the buffer transfer asynchronously (I actually have two buffers that alternate so that I can work on one while the other is uploaded). For example, my code on Mac OS uses glPixelStorei( GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE ), which tells the OS to use the source buffer as the backing store (with it understood that you'll keep the buffer around until at least the next frame). This allows the OS to not block on glTexSubImage2D() and results in a huge speedup. So, if anyone has any recommendations for boosting upload performance from a CPU-generated frames for win32/wgl, it'd be great to hear them! I have to believe this is a reoccurring topic, since anyone who typically wants to display, say, a movie (with large dimensions) via opengl. Ideally, it'd be nice to find a solution that wasn't vendor specific or that requires rare (or dying) extensions, etc. Thanks in advance, andy [Edited by - andy55 on March 11, 2006 11:27:04 AM]

Share this post


Link to post
Share on other sites
Advertisement
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!