PDA

View Full Version : object shows in different parts of the screen????



chuck norrrissss
03-29-2011, 04:31 AM
i'm putting an object onto the screen.

the things is, depending where i put the line of code, i get the object being put into a totally different space on the screen even though the actual values have not changed.

it must be how openGL reads the current raster point or something like that? or?
how can i reset the raster point (is that what its even called) so the object goes where i want it?

does openGL not use a fixed grid for positioning things?

mobeen
03-29-2011, 05:45 AM
Could u post the code so that its easier for us to tell u where the problem is? Currently my guess is that u are modifying the modelview matrix and thus the rasterpos is modified.

chuck norrrissss
03-30-2011, 08:40 AM
was able to sort it out.
problem was a combination of not using glutPostRedisplay() and calling the glLoadIdentity() matrix.

thanks!