PDA

View Full Version : I don't see anything...



MrBlue
03-09-2001, 05:51 AM
I'm just learning OpenGl but I can't arrive to see what I try to do. I think it's a problem with the GlutLookAt but
I'm not sure.
This is my program :

glScalef(scale,scale,scale);
gluLookAt(0.8,0.8,0.8,0,0.6,0,1,0,0);
glBegin(GL_LINES);
glVertex3f(0.32780680060387, 0.66463083028793, 0.20269837975502);
glVertex3f(0.32780680060387, 0.66547948122025, 0.20269837975502);
glEnd();

Thanks to help me.

A027298
03-09-2001, 08:44 AM
Hi MrBlue,

Your vertexdata are almost equal. I mean your line is very small. Replace your code with the following and use a valid Projectionmatrix:
.
.
.
glScalef(1,1,1);
gluLookAt(1.8,1.8,1.8, 0,0.6,0, 0,1,0);
glBegin(GL_LINES);
glVertex3f(0.32780680060387, .66463083028793, 0.20269837975502);
glVertex3f(1.32780680060387, 0.66547948122025, 0.20269837975502);
glEnd();
.
.
.
and use the Up-vector (0,1,0) (the last 3 gluLookAt(...) values) for the direction of the viewing volume.


Bye

A027298