Jump to content

  • Log In with Google      Sign In   
  • Create Account

UberNewbie Question


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 GriffonZ   Members   -  Reputation: 122

Like
Likes
Like

Posted 26 June 2001 - 04:43 PM

Ok...here is all I am trying to do...I am trying to write a very simple isometric view program...what im currently doing is just drawing a set of 10x10 quads(made of triangles) which is fine. where i guess things get confusing to me is this: when i rotate the viewing transformation to get a nice angled look this obviously rotates the world coord system ? how can camera movement be done on a program like this with these rotations etc? does this even make sense =P thanks griffonz

Sponsor:

#2 Obelix   Members   -  Reputation: 122

Like
Likes
Like

Posted 26 June 2001 - 11:35 PM

Camera movement can be done with rotations and translations but it is easier to use gluLookAt. I think that most OpenGL programmers thinks of roatations and translations affecting a local and not a world coord system. Some typical (pseudo) code:

glLoadIdentity();
gluLookAt(...);
drawQuads(); // in your example

// if you have some object you want to place in the world

for(eachObject) {
glPushMatrix();
glTranslate(...); // move the object to the proper place
glRotate(...); // rotate around itself
drawObject();
glPopMatrix();
}

#3 AIRmichael   Members   -  Reputation: 136

Like
Likes
Like

Posted 27 June 2001 - 12:29 AM

theres no really need for gluLookAt();

If you use glTranslatef BEFORE glRotatef it can rotate around itself. If you use glTranslatef after glRotatef then it uses the world coordinates.

#4 GriffonZ   Members   -  Reputation: 122

Like
Likes
Like

Posted 27 June 2001 - 06:27 AM

ok so...lets say I wanted to use gluLookAt..how do I come up with the 3 Vectors gluLookAt takes...I want the cam to be at a -45deg X and 45deg Y and to follow my player.. any ideas ?
GriffonZ





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS