tags:

views:

21

answers:

1

I have gotten the GLUT 3.7 source and opened the MSVC project. I switched DLL to static lib in the project settings and got a lib. I then linked against it in my application, and added the GLUT_STATIC preprocessor definition. It creates the window and renders one frame of my game and that's it. Whereas the game runs just fine with the dynamic version of GLUT. What did I do wrong?

Thanks

It seems that what's happening is that my timer function is not being recalled:

glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(640, 480);
glutCreateWindow("Game");

CubeEngine.InitEngine();

glutDisplayFunc(drawScene);
glutReshapeFunc(handleResize);
glutSpecialFunc(keyboard);
glutSpecialUpFunc(keyboardup);
glutKeyboardFunc(rkeyboard);
glutKeyboardUpFunc(rkeyboardup);
glutPassiveMotionFunc(mousemove);
glewInit();
glutTimerFunc(17, update, 0);
glutMainLoop();
void update(int val) {

    CubeEngine.UpdateLogic();

    glutPostRedisplay();
    glutTimerFunc(17, update, 0);
}
+1  A: 

Just an idea: it might be because of a duplicate symbol. Could you try to rename that update function?

tibur
renamed to updates(), still the same problem
Milo