Help,My puzzle about coordinate value in OpenGL
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 ~~~ ^_^
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.
glLoadIdentity();
glTranslatef (0.0f, 0.0f, -10.0f);
at the beginning of your drawing code.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement