Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void SDLWrapper::initialise(int flags)
- {
- SDL_SetVideoMode(width, height, bpp, flags);
- //if(!screen)
- //{
- // throw new SDLException("SDL_SetVideoMode(): returned NULL!");
- //}
- glViewport(0, 0, width, height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- gluPerspective(45.0f, (float)width / (float)height, 0.1f, 100.0f);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glShadeModel(GL_SMOOTH);
- glEnable(GL_TEXTURE_2D);
- glClearColor(0, 0, 0, 0);
- glClearDepth(1.0f);
- glEnable(GL_DEPTH_TEST);
- glDepthFunc(GL_LEQUAL);
- glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
- }
Add Comment
Please, Sign In to add comment