[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Texture mapping co-ordinates



Katie Lucas wrote:
> 
> I've got a problem with texture coords for a plane - I've got the
> vertex coords and the colours for the verticies and the texture coords
> all stashed away in structures and selected into arrays. The textures
> slide about on the surface of the plane as the camera rotates about
> it.
> 
> Now normally I'd say "clown, you've screwed up the coord generation",
> but the thing works FINE in software Mesa rendering - on a VoodooII in
> hardware: texture problem. This is the same exe, just picking between
> the software/hardware by setting the environment variable.

Without seeing the effect (or the source code), it's hard to diagnose this.

Here are some possibilities:

  1) You might be moving the eyepoint around using the projection
     matrix instead of the modelview matrix.  Some OpenGL's don't
     like that.

     Here is a FAQ:  http://web2.airmail.net/sjbaker1/projection_abuse.html

  2) You might have very large texture coordinates - that can cause the
     texture to drift around.  The Voodoo is especially sensitive to this
     due to poor (~14 bit) internal numerical precision.  Software OpenGL
     is highly insensitive to it (because it's all done in 'float's).

  3) Some older Mesa's had broken glPushAttrib/glPopAttrib - that could
     leave you with some strange modes popping up...perhaps glTexGen is
     somehow remaining enabled when you think it should be disabled.
     Texture coordinates more than about 16 start to show this visibly.

  4) Are you using the GL_TEXTURE matrix?  Different implementations
     of OpenGL have different matrix stack lengths from others - with
     the Projection and Texture stacks sometimes being just one or two
     elements deep.  Hence you might be overflowing the stack in one case
     and not in the other.

...or it could be something I havn't thought of!

----------------------------- Steve Baker -------------------------------
HomeMail : <sjbaker1@airmail.net>   WorkMail: <sjbaker@link.com>
HomePage : http://web2.airmail.net/sjbaker1
Projects : http://plib.sf.net       http://tuxaqfh.sf.net
           http://prettypoly.sf.net http://tuxkart.sf.net
           http://freeglut.sf.net   http://toobular.sf.net