Original Post
i first posted this thread asking about help for an openGL space shooter im trying to make saying i was having problems compiling. i fixed all the problems i think, but now when i run the program it completly freezes up the computer, to the point were i get a system error saying i have to restart. ive been playing around with different sections of the code, taking out lines here and their to see what the problem was. the only time i can get anything to even come up on the screen without the computer crashing is if i put the glutMainLoop(), which i origonally forgot to put in. but, if i put in the main loop then my game loop is never called and obviously nothing works. this is my main, which brings to the game loop, which runs a timer with all of the game function calls ( update, collision, render, ect. ) how and were should i be putting the glutMainLoop? am i supposed to be putting it inside my timer, or put my timer inside it? i really dont understant the point of the glutMainLoop() all i know is it wont run without it and once its called it never resturns. if someone could explain it more or tell me how i should be using it id be really happy [Edited by - c_young on January 18, 2007 9:12:30 AM]
int main( int argc, char **argv )
{
init_GL();
init_Game();
glutInit( &argc, argv );
glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH );
glutInitWindowPosition( 300, 250 );
glutInitWindowSize( winWidth, winHeight );
glutCreateWindow( " " );
glutDisplayFunc( draw_Screen );
game_Loop();
return 0;
}