Jump to content
  • Advertisement
Sign in to follow this  
scottsong

Help,My puzzle about coordinate value in OpenGL

This topic is 5073 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

In my OpenGL,when I used coordinate value over 1.0,i always failed. for example: glBegin(GL_TRIANGLE) glVertex3f(0.0,0.5,0.0); glVertex3f(-0.5,-0.5,0.0); glVertex3f(0.5,-0.5,0.0); glEnd(); this ok,but glBegin(GL_TRIANGLE) glVertex3f(0.0,20.0,0.0); glVertex3f(-20.0,-20.0,0.0); glVertex3f(20.0,-20.0,0.0); glEnd(); won't work? Could somebody tell me why? thanks ~~~ ^_^

Share this post


Link to post
Share on other sites
Advertisement
Most likely, you are drawing too near to the near clipping plane. Try throwing in a:

glLoadIdentity();
glTranslatef (0.0f, 0.0f, -10.0f);

at the beginning of your drawing code.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!