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
|
// 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;
|
||||||
|
|
||||||
|
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
|
// 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;
|
||||||
|
Loading…
Reference in New Issue
Block a user