Hi everybody,
Im working with texture in opengl. I can upload texture to and object and everything looks great when doing it on a perfect quad or polygon but when working with a irregular polygon(not the same dimensions)I get a distorted texture
I believe its something with texture coordinates with my polygon or something abut mipmaps?I kn ow that everything in opengl is made up from triangles,but how can I get rid of that distortion ?Should i have more texture coordinates?
Hi ZbuffeR,
thanks for the link! I think Im understanding what is happening but im not totally sure how to make it work. I grab some code from the example in teh link were i think everything is happening but i got some questions about the code:
{
float tx = scale_texcoord * top;
glBegin(GL_QUADS);
Hi overlay,
I got opengl v2.1 . I do have that glHint() but nothing changes :(.
Do you have any sample about texture coordinates. Im still a bit confused about how the coordinates work [glTexCoord4f(s,t,r,q)]
I read the cass page again but I cant make it work :(… Im confuse on how gltexcoord4f(s,t,r,q) works ! Im still getting that unpleasant image! I tried to copy part of his code but I got the same distortion ;(… Could you please help me with a sample about gltexcoord4f?
Did you run the demo provided on the page ?
Did it work ? If not, either your hardware/driver do not support this, or the demo is bogus.
EDIT: I compiled and the demo on Linux nivida, no problem here and works as advertised (had to remove a bunch of non-used lines from the glh_linear.h to make my compiler happy).
Hi ZbuffeR,
sorry couldnt post this before Im still stuck in this, I mean ,I made the sample work… My problem is i cant totally understand glTexCoord4f(s,t,r,q)… The sample is fine when the top is the same value for each top coordinate. I want to put each one of the quad coordinates and have a irregular quad and map my texture into that polygon! Thanks for your time and Illw ait for your comments.