View Full Version : x,y coordinates reversed???
02-13-2001, 08:29 PM
for some reason my x and y coords are reversed, but not my z??
eg glTranslatef(0,5,0); will move down the coordinate system...
is your monitor upside down?
j/k....what other transformations have you performed in your program before this one
02-13-2001, 09:27 PM
Ill keep checking my code to see if i've mistakenly inverted something somewhere http://www.opengl.org/discussion_boards/ubb/tongue.gif
02-13-2001, 09:28 PM
Here's my reshape func.
void reshape(int w, int h)
if (h==0) // Prevent A Divide By Zero By
h=1; // Making Height Equal One
glViewport(0, 0, (GLsizei)w, (GLsizei)h);
glMatrixMode(GL_PROJECTION); // Select The Projection Matrix
glLoadIdentity(); // Reset The Projection Matrix
glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix
02-13-2001, 09:41 PM
Well, since the "camera" is the inverse of what your actually doing, that is most likely the cause.
When you move left, the "camera" is moving right. (Sorta like a mirror)
02-13-2001, 10:19 PM
thanks for your help. I just don't remember this happening in other programs, thats why i was confused. I'll just reverse my coords
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.