Hello, I’m using an orthographic projection using glOrtho(). I have set up my transformation (eye, at, up) using gluLookAt(). Everything seems to work fine until I have very large coordinates ( > 10 million).
Even though I use glVertex3d(), and I specify double precision values, gl seems to be losing the precision. It’s as if gl is converting everything to single precision floating point values. Is this what gl does?
Is there any way to get gl to use double precision values?
Has anyone had experience using very large coordinate values with gl?
Originally posted by Ryo:
[b]Say you have a point with following coordinates.
x : 10000000.111
y : 10000000.222
z : 10000000.333
Then, you can draw a point like this…
// Move by offset
glTranslated(10000000.0, 10000000.0, 10000000.0);
// Draw a point with value-offset
glBegin(GL_POINTS);
glVertex3f( 0.111f, 0.222f, 0.333f );
glEnd();
Hope it helps![/b]
I dont’t think it will work.
Bcos the value of glTranslate is combined with what is passed to glVertex() and then it might exceed the largest possible float value, which is the same as passing it to glVertex directly.