[PyOpenGL-Users] glGetDouble
Brought to you by:
mcfletch
|
From: John <j2...@jt...> - 2003-01-09 22:46:23
|
glGetFloat (GL_MODELVIEW_MATRIX) seems to return an array of integers =
instead of floats. What it returns seems to be the correct float values =
but interpreted as integers.
eg:
glMatrixMode (GL_MODELVIEW)
glLoadIdentity ()
matrix =3D glGetFloat (GL_MODELVIEW_MATRIX)
print matrix
[[1065353216 0 0 0]
[ 0 1065353216 0 0]
[ 0 0 1065353216 0]
[ 0 0 0 1065353216]]
1065353216 is the same as 1.0 in binary.
matrix.typecode () returns 'u' Don't know what type this is??
matrix =3D glGetDouble (GL_MODELVIEW_MATRIX)
print matrix
[[ 0 1072693248 0 0]
[ 0 0 0 0]
[ 0 0 0 1072693248]
[ 0 0 0 0]]
Don't know why this happens with the same matrix, maybe an overflow?
matrix.typecode () returns 'l' which is long integer.
Ok? Get em fixed :P
John
|