glutInit parameters in simple OSX example
I'm working with an example from this site on OSX and I have no troubles compiling it but I don't know how to test run it. The program looks like this:
void display()
{
}
int main(int argc, char **argv)
{
glutInit(&argc, argv);
glutDisplayFunc(display);
glutMainLoop();
}
I don't know what the arguments should be for the program, which glutInit
will use. Does anybody know what with which arguments I need to call me program to acually show a window?
Calling with no arguments orcourse causes this crash:
./hello
2011-10-13 11:41:15.360 hello[2395:903] GLUT Fatal 开发者_如何学JAVAAPI Usage: main loop entered with no windows created.
Abort trap
You need to create a GLUT window before calling glutDisplayFunc or glutMainLoop
精彩评论