glTranslate

Hi to everyone:

i’ve a question: if a draw a ugSolidCubef in a specific place with glTranslate(x,y,z) why if i move the “camera” the cube seems to move in uncoordinate mode?

thanx,

Giuseppe

I don’t understand the question. What is “uncoordinate mode”?

Post the relevant parts of your code, a description of what you get, and a description of what you expect to get. And don’t forget to mention the implementation you’re using.


void display(UGWindow uwin)

{
    glVertexPointer(3, GL_FLOAT, 0, plane);
    glEnableClientState(GL_VERTEX_ARRAY);
    glDrawArrays(GL_TRIANGLE_FAN, 0, 4);

   glPushMatrix();
   glColor4f(64/255.0f, 206/255.0f, 100/255.0f, 1.0f); // Verde
   glTranslatef(320087, 0.0f, -1464312.0f);
   ugSolidBox(30,50, 30);
   glPopMatrix();
}

When i move my “camera” the box drawn seem to move in a different way respectly the pavement…ok?
Why this? When i recall the “display” to move the P.O.V., the box move in a different way respectly the pavement…
Please help me,

Regards,
Gius

How do you move the camera? What pavement?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.