Hello,
I am trying to make glut work in win32 app (not console). In win32 app, i use the WinMain function instead of main. I use the standard WinMain function. My code is this:
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
glutInit(0, NULL);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
glutInitWindowSize(400,400);
glutInitWindowPosition(200, 200);
glutCreateWindow(“Actual window”);
init();
glutDisplayFunc(display);
glutMainLoop();
return 0;
}
the problem is that the app runs, but makes an error, and forces the user to close it. u know the window. U can try it too to tell me if it works, but please help me a bit. also, what is the argc and argv values? do the vary?