If you really want to use gluSphere to draw your sphere, you can use
the GL_TEXTURE matrix to glScale by the actual dimensions of the
rectangle texture. I also recommend if you are going to use
gluSphere to put it in a display list (so that you avoid the sphere
calculation that is done by gluSphere on subsequent frames).
Chris
On May 28, 2007, at 8:38 PM, Matthew Veenstra wrote:
Hello,
I am trying to use a modern Mac OS X approach to texture map frames
of a QT movie onto a gluSphere.
Here is what I do.
- I grab the frames with QTVisualContextCopyImageForTime
- I then create and setup the OpenGL texture with
CVOpenGLTextureCacheCreateTextureFromImage
- I can then happily map to GL_QUADS and such but I cannot then map
to a glu quadratic (gluSphere)
It seems gluSphere only lets us map a power of 2 texture.
CVOpenGLTextureCacheCreateTextureFromImage returns a non power of 2
texture. Does anyone know another way to get texture data from
QTVisualContextCopyImageForTime for glTexture2D or such. Would I
have to go back to a GWorld to try and do this and create a power
of 2 texture?
Is there a way to use gluSphere with a non power of 2 texture. I
am not sure I know my math well enough to create my own sphere and
handle my own mapping.
Any other ideas?
Matt Veenstra
tribalmedia.com
_______________________________________________
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