Archived

This topic is now archived and is closed to further replies.

hello_there

please help newbie

Recommended Posts

glutInitWindowPosition(0,0); glutInitWindowSize(840,680); glutCreateWindow("Title"); How do you use these properly? Do i need to incldue any files if so what ones?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Those are the window intialization functions from the glut library - glut aka "open gl toolkit" - you''ll need to #include glut.h and link you app with glut32.lib (on win32 machines). Start at opengl.org or use google to search out specific details - check the newsgroups too. Also start in opengl forums or opengl newgroups and proceed from there.

Share this post


Link to post
Share on other sites
You have to download the glut files...$
And I''m used to use this funciton in my main_function, like this:

int main(int argc, char* argv[])
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_RGBA|GLUT_DOUBLE|GLUT_DEPTH);

glutInitWindowPosition(0,0);
glutInitWindowSize(1024,768);
glutCreateWindow("Le Monde");// Window Title
InitGL();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutKeyboardFunc(keyboard);
glutIdleFunc(game_function);
glutMainLoop();
return 0;
}

But if you don''t want to open a window but enter in exclusive mode you should use the glutGameEnterGameMode function...performance are better...

Share this post


Link to post
Share on other sites