glLoadIdentity();
}
-void Reshape( int w, int h )
-{
- if( h <= 0 ) h = 1 ;
-
- glViewport( 0, 0, w, h ) ;
-
- glMatrixMode( GL_PROJECTION ) ;
- glLoadIdentity() ;
- gluPerspective( 45.0, (GLfloat)w / (GLfloat)h, 0.1, 1000.0 ) ;
-
- glMatrixMode( GL_MODELVIEW ) ;
- glLoadIdentity() ;
-}
-
/** Global static pointer used to ensure a single instance of the class. */
Game* Game::m_instance = NULL;
break;
case SDL_VIDEORESIZE :
- Reshape( event.resize.w, event.resize.h ) ;
+ init_GL( event.resize.w, event.resize.h ) ;
break ;
case SDL_USEREVENT: