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

Re: Texture mapping co-ordinates



[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Mind pasting some code?

Tricky - it's buried inside tons and tons of C++ - I've been writing
this for ages on my laptop before I tried a hardware renderer. I can't
really think how to extract this without it either being thousands of
lines of code to handle the event stuff or without making it overly
simple.

Basically I've got a grid of verticies, spaced out at unit intervals
on the Y=0 plane. The vertices have texture coords of TX=X, TY=Z. The
grid is origined at 0,0,0.

The texture basically seems to be trying to stay still, almost as if
the texture projection matrix is being filled with an inverse of the
modelview matrix. The model coordinates are fine, EVERY texture coord
in the model i warped.

I thought it might be the recomputation ofthe texture coords being
done each frame, but I've stopped that happening. Again, even with
that in, the model coords are fine. It's not memory corruption because
it's reproducible - rotate one way and then back a bit and the pattern
of texture morphing reverses as well.

I have tried making sure identity is loaded into the texture matrix.

As I say it works fine in software mode (albeit slower).

> 
> > 
> > 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.
> > 
> > Anyone come across this?
> > 
> > { Perspective correction is set to "nicest" BTW }
> > 
> > 
> 
>