# Thread: Why OpenGL use in my prog. left coordinate system

1. ## Why OpenGL use in my prog. left coordinate system

I wrote program which generate this picture
[img:center]http://w677.wrzuta.pl/sr/f/01jTmePucq7/gl[/img]
and the code for axial is
"
glLineWidth(3.0f);
glBegin (GL_LINES);
glColor3f (1.0f, 0.0f, 0.0f); //red green blue
glVertex3f (0.0f, 0.0f,0.0f);
glVertex3f (0.0f, 200.0f,0.0f);

//red line Y axis
glColor3f (0.0f, 1.0f, 0.0f);
glVertex3f (0.0f, 0.0f,0.0f);
glVertex3f (200.0f, 0.0f,0.0f);

//green line X axis
glColor3f (1.0f, 1.0f, 1.0f);
glVertex3f (0.0f, 0.0f,0.0f);
glVertex3f (0.0f, 0.0f,200.0f);

//blue line Z axis
glEnd ();
"
why it's looke like left-handle coordinate thus opengl use right coordinate system?

2. ## Re: Why OpenGL use in my prog. left coordinate system

hm, perhaps you have multiplied a negative scale onto the matrix stack?

3. ## Re: Why OpenGL use in my prog. left coordinate system

I don't multiplet by negative , but i thing i find solution, look at this site OpenGL Projection Matrix

4. ## Re: Why OpenGL use in my prog. left coordinate system

Your picture is ambiguous because it uses no hidden line removal.

You could be below and to the left of the origin, with the Z axis shooting up over your right shoulder (right-handed axes)...

Or you could be up and to the right of the origin, with the white line shooting our and away from your left foot (left-handed axes)...

Unless you have a negation in your lookat transform, I'd suspect the former since OpenGL is right-handed.

Turn on depth test and render some surfaces to remove the ambiguity.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•