开发者

'SIGTERM' problem

开发者 https://www.devze.com 2023-01-04 17:16 出处:网络
I have this problem that when there is an OpenGL application I am working on. When I try drawing this particular piece of code:

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...

0

精彩评论

暂无评论...
验证码 换一张
取 消