glRotated
and glTranslated
cannot execute right when the number is big
for example, the below code can execute right
xpos=1
zpos=1
glRotated(90, 1,0,0)
glRotated(360, 0,1,0)
glTranslated(-xpos,-ypos-2,-zpos)
but this one cannot execute right
xpos=100000000
zpos=100000000
glRotated(90, 1,0,0)
glRotated(360, 0,1,0)
glTranslated(-xpos,-ypos-2,-zpos)
if you use the second code, you will get an incorrect graph. Why?
Lack of numeric precision. Most GPUs use single point floats internally, and unless you write a custom shader that explicitly declares double precision, with the fixed function pipeline your transformation matrix computations are likely to be clamped to 23 significant bits, which is about 10 times less, than the order of magnitude of your numbers. (2^23 =~= 8·10^6)