Archived

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

Partitial glTexSubImage

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