Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

stephanh

Partitial glTexSubImage

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

Hi, i have to do texture uploads at runtime and want to split up one upload into several glSubTexImage2D calls (one for a 512x512 takes too long), in the first run i''d like to upload the upper part ind the 2nd run the lower one. But glTexSubImage(GL_TEXTURE_2D,0,0,0,TexWidth,HalfImageHeight,....,ub_TextureData); doesn''t work as expected (texture is totally messed up). Do i have to set GL_PACK_ROW_* even if i use the full width? Thank you very much in advance. regards, Stephan
eisscholle.de

Share this post


Link to post
Share on other sites
Advertisement
As long as you use the full width you should be okay. One thing you need to be sure to do is all glTexImage at least once for the entire texture size before you can make glTexSubImage calls. Also be sure to offset ub_TextureData when doing the bottom half...

Share this post


Link to post
Share on other sites
Thanks kronq.
I had some major mistake in the offset....

[edited by - stephanh on June 5, 2003 6:34:04 AM]

Share this post


Link to post
Share on other sites

  • 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!