Maybe I missed something, but it would seem you need to call
glPixelStorei( GL_UNPACK_ROW_LENGTH,...) before each call to
glTexImage2D() for each of the textures. I am not 100% certain, but I
think this parameter is bound with the rest of the texture state in
glBindTexture(). Even if not, just making sure to call glPixelStorei()
after each glBindTexture() should garantee a fix.
I'm looking for a way to display both a YUV image extracted from
QuickTime
(using either a sequence grabber or a movie controller) and an RGB
image
generated by my processing code. I can display the YUV data correctly
using
GL_YCBCR_422_APPLE inside a GL_TEXTURE_RECTANGLE_EXT texture. The
problem
currently appears with the use of glPixelStorei( GL_UNPACK_ROW_LENGTH,
width
* 2 ). With 'width*2', I get the correct height for the output YUV
image,
but the RGB texture data is only then half the height. Going for just
'width' makes the RGB image work fine, but only provides half the YUV
image.
Each texture is rendered onto a single quad with varying transparency
so
that I can see the image through the marks made by the processing code.
I've seen a bit about YUV -> RGB shaders, and I'm curious whether I
need to
go down this path, but I can't see how that solves the texture
unpacking
problem. I don't really want to generate the RGB image as YUV as well.
Does anybody have any suggestions? I'm stumped.
- Simon Wilson
_______________________________________________
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