Paging in textures from one memblock using glTexSubImage2D

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 work as expected. Do i have to set GL_PACK_ROW_* even if i use the full width?

Thank you very much in advance.

regards,
Stephan

What does “doesn work as expected” mean? Lots of things can go wrong in a program you know, and without knowing what’s wrong we can’t tell you how to fix it.

Sorry for my bad “question asking”.
The texture was totally messed up, but i found the problem now. I’ve missed the offset
to the data for the second glTexSubImage call.

glTexSubImage2D(…, &(m_ubTextureData[offset]));

regards,
Stephan