Hi,
it’s somewhat my first time dealing with shaders and I’m going through the lighthouse3D GLSL tutorial.
http://www.lighthouse3d.com/opengl/glsl/index.php?flatten
void main(void)
{
vec4 v = vec4(gl_Vertex);
v.z = 0.0;
gl_Position = gl_ModelViewProjectionMatrix * v;
}
In their flatten vertex shader example, my output differs from theirs:
http://img28.imageshack.us/img28/9149/flattenoutput.png
As you can see, my glutTeapot seems to be flattened down in the y axis instead of the z axis as it should.
At first I thought it was the example, but I went further tracking and the following testing makes it even weirder:
http://img341.imageshack.us/img341/1136/flattenoutput1.png
http://img199.imageshack.us/img199/1462/flattenoutput2.png
As you can see, only the glutTeapot doesn’t get it right. In red I have some points loaded from a file, in blue I have a glutSphere to make sure it’s not a glut bug, and finally in green the evil glutTeapot.
So, I’m just curious on what could be causing this behavior?
It’s harder to learn when examples don’t seem to do what they are supposed to
Thanks in advance!