Help,My puzzle about coordinate value in OpenGL

Started by
2 comments, last by Thunder_Hawk 19 years, 7 months ago
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 ~~~ ^_^
Advertisement
How do you mean 'doesn't work' ?

How is your projection matrix set up?
yeah...you probably have problem with projection matrix or you have n't used glTranslatef() properly...
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.
______________________________________________________________________________________The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ"So. Any n00bs need some pointers? I have a std::vector<n00b*> right here..." - ZahlmanMySite | Forum FAQ | File Formats______________________________________________________________________________________

This topic is closed to new replies.

Advertisement