PDA

View Full Version : x-axis goin in the opposite direction



mithun_daa
10-31-2003, 10:45 AM
either my program has a prob or my basicz have gone wrong. as far as i know, the x-axis in opengl goes from left to right (i.e, it increases from left to right), but whenever i increase my x-values either to move the camera, or to draw even simple lines, its done along the -ve x-axis. i have my viewvolume set as

glFrustum -100, 100, -100, 100, 10, 210

i dont know whatz goin wrong. plz help.

virtualchetan
10-31-2003, 11:07 AM
This will happen if u have done
glScalef(scaleX, scaleY, scaleZ);
and scaleX is a negative value.

- Chetan

mithun_daa
10-31-2003, 11:40 AM
i m not using the glscale function. one more thing i forgot to mention is that i am using vb6 with opengl. vb6 has a scale fucntion for the control and i have set it as
Pic1.Scale (-100, 100)-(100, -100)

mikael_aronsson
11-01-2003, 02:16 AM
Have you transformed the camera correct ?, if you put it on the "other" side of the Z axis looking at the origin the X axis will swap direction.

Mikael