I have this problem that when there is an OpenGL application I am working on. When I try drawing this particular piece of code:
for (float i = 0; i < 100; i++)
{
glBegin(GL_LI开发者_运维技巧NE_LOOP);
glVertex3f(cos(i), i, -10.0f);
}
glEnd();
I get this problem where the program crashes and returns:
“SIGTERM”
Any suggestions to help me around this problem or any insight as to why this is happening would be greatly appreciated.
Per the docs, you need one glBegin
per glEnd
-- not the 10,000 or so you're doing! So yank that glBegin
to before the loop...
精彩评论