henne

06-13-2011, 09:25 PM

Hi all,

I'm working with OpenGL for the first time and I have some problems with projection. I read this (http://www.songho.ca/opengl/gl_transform.html) but I still don't understand how the objects are projected to the screen. My biggest problem is that I still get confused about all these different coordinates. So what are the eye coordinates, device coordinates and normalized device coordinates and what is the difference between them? So when I draw a vertex with glVertex(a, b, c). Are the parameters a, b, c eye coordinates?

In my code I used perspective projection. So I set up the projection matrix with

gluperspective(45, aspect, 0.01, 100); aspect in this case is 1060/479

So when I construct my projection matrix like this. Does the image I see correspond to the near clipping plane of the frustum?

After setting up my projection matrix I wanted to draw a single point at the upper left corner. So I used

glBegin(GL_POINTS);

glVertex(-1, 1, -0.1);

glEnd();

But this point doesn't show up. Doesn't -1,1 correspond to the upper right corner?

Please help me ;)

I'm working with OpenGL for the first time and I have some problems with projection. I read this (http://www.songho.ca/opengl/gl_transform.html) but I still don't understand how the objects are projected to the screen. My biggest problem is that I still get confused about all these different coordinates. So what are the eye coordinates, device coordinates and normalized device coordinates and what is the difference between them? So when I draw a vertex with glVertex(a, b, c). Are the parameters a, b, c eye coordinates?

In my code I used perspective projection. So I set up the projection matrix with

gluperspective(45, aspect, 0.01, 100); aspect in this case is 1060/479

So when I construct my projection matrix like this. Does the image I see correspond to the near clipping plane of the frustum?

After setting up my projection matrix I wanted to draw a single point at the upper left corner. So I used

glBegin(GL_POINTS);

glVertex(-1, 1, -0.1);

glEnd();

But this point doesn't show up. Doesn't -1,1 correspond to the upper right corner?

Please help me ;)