Hi,
using glSubImage2D with internal format GL_ALPHA,
GL_TEXTURE_RECTANGLE_EXT and Pixel Buffer Objects exposes some strange
behaviour (NVidia 8600 driver). Here's a partial opengl profiler log
(I'd attach the complete one but it's too big for the list):
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glGenTextures(1, 0x18616a48);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_RECTANGLE_EXT, 1);
glTexImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, GL_ALPHA, 48, 48, 0, GL_ALPHA,
GL_UNSIGNED_BYTE, 0x00000000);
glBindBuffer(0x000088ec, 1);
glBindTexture(GL_TEXTURE_RECTANGLE_EXT, 1);
glTexSubImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, 0, 0, 48, 48, GL_ALPHA,
GL_UNSIGNED_BYTE, 0x00000000);
The top line of the texture is downloaded correctly. All other lines are
copies of that line.
Some more data points:
- The same code works correctly on Tiger (both PPC and Intel), with
NVidia Linux drivers and with NVidia Windows drivers.
- Changing the last parameter of glTexSubImage2D (the offset into the
PBO) to something other than a multiple of - I think - 128 causes the
bug to disappear.
I've implemented a workaround using GL_RGBA instead of GL_ALPHA, but
that's likely to be an extreme speed hit - these textures are y, u and v
planes of video frames. Any other ideas for workarounds? I could use an
offset into the PBO, but I assume that that causes the driver to leave
an optimized (abeit buggy) path? Is there anything I might be doing wrong?
Cheers,
Uli
--
Ulrich von Zadow | +49-172-7872715
Jabber: email@hidden
Skype: uzadow
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden
This email sent to email@hidden