Moved glEnables to graphics.init().

This commit is contained in:
Faerbit 2015-03-01 16:41:46 +01:00
parent 4cc21fd378
commit 47bcf0bf1c
2 changed files with 7 additions and 6 deletions

View File

@ -28,6 +28,13 @@ void Graphics::init(Level* level) {
// save Level // save Level
this->level = level; this->level = level;
// OpenGL state:
glClearColor( 0.0, 0.0, 0.0, 1.0 );
glEnable( GL_DEPTH_TEST );
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
// update lights on creation // update lights on creation
lastUpdate = -lightUpdateDelay; lastUpdate = -lightUpdateDelay;

View File

@ -126,12 +126,6 @@ int main( int argc, char *argv[] )
// Enable vertical sync (on cards that support it) with parameter 1 - 0 means off // Enable vertical sync (on cards that support it) with parameter 1 - 0 means off
glfwSwapInterval( 0 ); glfwSwapInterval( 0 );
// OpenGL state:
glClearColor( 0.0, 0.0, 0.0, 1.0 );
glEnable( GL_DEPTH_TEST );
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
app.init(); app.init();
int frameCount = 0; int frameCount = 0;