Moved glEnables to graphics.init().
This commit is contained in:
parent
4cc21fd378
commit
47bcf0bf1c
@ -28,6 +28,13 @@ void Graphics::init(Level* level) {
|
||||
// save 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
|
||||
lastUpdate = -lightUpdateDelay;
|
||||
|
||||
|
6
main.cc
6
main.cc
@ -126,12 +126,6 @@ int main( int argc, char *argv[] )
|
||||
// Enable vertical sync (on cards that support it) with parameter 1 - 0 means off
|
||||
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();
|
||||
|
||||
int frameCount = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user