initializing OpenGL in Video::start()
git-svn-id: svn://anubis/anaglym/trunk@34 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
parent
639af8d59f
commit
218d292388
11
Video.cc
11
Video.cc
@ -1,5 +1,7 @@
|
||||
|
||||
#include "Video.h"
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include <SDL.h>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
@ -47,6 +49,15 @@ void Video::start(int width, int height, bool fullscreen)
|
||||
SDL_WM_GrabInput(SDL_GRAB_ON);
|
||||
m_inputGrabbed = true;
|
||||
m_fullscreen = fullscreen;
|
||||
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glEnable(GL_LIGHTING);
|
||||
glEnable(GL_LIGHT0);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
gluPerspective(60.0, (double) width / (double) height, 0.01, 10000.0);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user