My vertex cords are :
GLfloat vertices[]=
{
0.5f,0.5f,0.5f,
-0.5f,0.5f,0.5f,
-0.5f,-0.5f,0.5f,
0.5f,-0.5f,0.5f,//face 1
0.5f,-0.5f,-0.5f,
-0.5f,-0.5f,-0.5f,
-0.5f,0.5f,-0.5f,
0.5f,0.5f,-0.5f,//face 2
0.5f,0.5f,0.5f,
0.5f,-0.5f,0.5f,
0.5f,-0.5f,-0.5f,
0.5f,0.5f,-0.5f,//face 3
-0.5f,0.5f,0.5f,
-0.5f,0.5f,-0.5f,
-0.5f,-0.5f,-0.5f,
-0.5f,-0.5f,0.5f,//face 4
0.5f,0.5f,0.5f,
0.5f,0.5f,-0.5f,
-0.5f,0.5f,-0.5f,
-0.5f,0.5f,0.5f,//face 5
-0.5f,-0.5f,0.5f,
-0.5f,-0.5f,-0.5f,
0.5f,-0.5f,-0.5f,
0.5f,-0.5f,0.5f//face 6
};
now, i am changing z cords by:
for(int i=0;i<24;i++)
vertices[i*3+2]*=10
glDepthRange(0,10.0);
Now, i am expecting that z cords will be mapped to -0.5 to 0.5 range due to glDepthRange call and i can see a proper cube, but it gives o/p as that of when i comment glDepthRange call above with distorted geometry.