Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

WoolyUK

Stupidly simple problem :)

This topic is 5446 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys - im almost embarassed to ask this, cus ive done quite a lot of OpenGL but for some reason this has got me really stumped Im trying to draw a simple quad and set the camera to look directly down on it, im using the following code and it just brings up a blank screen: gluLookAt(4.5, 10, 7.5, 4.5, 0, 7.5, 0, 1,0); glColor3f(1,0,0); glBegin(GL_QUADS); glVertex3f(0,0,0); glVertex3f(9,0,0); glVertex3f(9,0,15); glVertex3f(0,0,15); glEnd(); Im using the nehe base code and any other drawing stuff works (ie nehe examples). What stupid mistake am I making? Thanks for any help!

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
the camera is probably facing the wrong way...

Share this post


Link to post
Share on other sites
How do u mean facing the wrong way? The cam postion is 10 units up the Y axis looking down, so shouldnt it automatically point downwards?

Thanks for reply

Share this post


Link to post
Share on other sites
The camera is facing directly against the Up vector which might be what''s causing problems (doesn''t work when I try it in my program).
Try:
gluLookAt(4.6, 10, 7.5, 4.5, 0, 7.5, 0, 1,0);
and see if it shows up. If it does and you need to look straight at the quad then reposition the quad so it goes along the x/y plane and not the x/z plane.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!