Textures stretching

In your code, aren’t

Data[8]=-50;
Data[9]=50;
Data[10]=-50;

and

Data[17]=-50;
Data[18]=50;
Data[19]=-50;

the same vertices?

The same goes for

Data[14]=50;
Data[15]=50;
Data[16]=-50;

and

Data[11]=50;
Data[12]=50;
Data[13]=-50;

?

Another remark

 glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR_MIPMAP_LINEAR); 

You can not specify a mipmap filtering mode for magnification filters, only for minification filtering.

N.

Just an idea, I didn’t actually test this:
Do you do your camera transformation on the projection matrix instead of the modelview matrix? If yes, this could cause a problem with perspective correct interpolation…

Originally posted by -NiCo-:
[b]In your code, aren’t

Data[8]=-50;
Data[9]=50;
Data[10]=-50;

and

Data[17]=-50;
Data[18]=50;
Data[19]=-50;

the same vertices?

The same goes for

Data[14]=50;
Data[15]=50;
Data[16]=-50;

and

Data[11]=50;
Data[12]=50;
Data[13]=-50;

?[/b]
Oh, I copied the - wrongly.

Originally posted by -NiCo-:
[b]Another remark

 glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR_MIPMAP_LINEAR); 

You can not specify a mipmap filtering mode for magnification filters, only for minification filtering.

N.[/b]
Hey I didn’t know that. Thanks.

Originally posted by Overmind:
Just an idea, I didn’t actually test this:
Do you do your camera transformation on the projection matrix instead of the modelview matrix? If yes, this could cause a problem with perspective correct interpolation…

No, everything (except the perspective calculation and calling glfrustom) is done in the ModelView matrix.
I just don’t get it… :confused: :confused:

Are you seeing this with other programs? I am not familier with the 9600 driver settings you can mess with, but could there be something there forcing linear (instead of perstective correct) interpolation on? Have you tried the executable on a non-radeon card?

Originally posted by gdewan:
Are you seeing this with other programs? I am not familier with the 9600 driver settings you can mess with, but could there be something there forcing linear (instead of perstective correct) interpolation on? Have you tried the executable on a non-radeon card?
Games work fine. I didn’t try on a non-Radeon, mainly because my other GF4Ti doesn’t support PS2.

What are you doing in the shader then? Sounds like the problem might be there

Originally posted by gdewan:
What are you doing in the shader then? Sounds like the problem might be there
I told you. The problem effects non-shaded polygons as well.

I’ve just tested it with the same quad, but I’ve applied a shader to it. The fragement program outputs the texcoords as color, and as expected when I move the mouse all the color on the quad slides randomaly. :mad:

Maybe it’s best to write a little test code that simply draws a textured quad without anything else. Just to check if it’s a driver bug or not.

N.

Originally posted by -NiCo-:
[b]Maybe it’s best to write a little test code that simply draws a textured quad without anything else. Just to check if it’s a driver bug or not.

N.[/b]
New program? Hang on, I will just test my app on my second computer with the no fragememnt programs codepath.

If it’s a bug, it’s possible that games still run fine as most of them use directx.
Just try compiling some code of http://nehe.gamedev.net or some other site to see if the problem still persists.

N.

I was talking about OpenGL games of course (Counter Strike using the OpenGL renderer). Nut even Nehe’s examples work correctly. :frowning:

Try not using VOB…it’s almost like you’ve done no debugging yourself before…is this the first bug you’ve ever encountered or something? The people here are just suggesting the obvious, eliminate factors until you find your bug.

Originally posted by knackered:
Try not using VOB…it’s almost like you’ve done no debugging yourself before…is this the first bug you’ve ever encountered or something? The people here are just suggesting the obvious, eliminate factors until you find your bug.
Do you think I have wrote more than 35000 lines and never encountered a bug? I have already tried without VBOs, I have tried different texture loading ways, but using the fragement program I see that the problem are the tex coords being changed.

If Nehe’s tutorials don’t work, the problem is definetly specific to your workenvironment.
Try reinstalling the graphics card drivers and make sure the libs you’re linking to are not corrupted. Also try disabling al environment settings like Ati’s TruForm, antialiasing, anisotropic filtering, etc.

N.

Originally posted by -NiCo-:
[b]If Nehe’s tutorials don’t work, the problem is definetly specific to your workenvironment.
Try reinstalling the graphics card drivers and make sure the libs you’re linking to are not corrupted. Also try disabling al environment settings like Ati’s TruForm, antialiasing, anisotropic filtering, etc.

N.[/b]
No Nehe’s examples do work.

Nut even Nehe’s examples work correctly.
So ‘Nut’ means ‘yes’? :slight_smile:

Anyway, it’s indeed time to do some debugging at every step and see if the results are what you expect.

Good luck!

N.