diff options
-rw-r--r-- | src/Game.cpp | 6 | ||||
-rw-r--r-- | src/Game.h | 2 | ||||
-rw-r--r-- | src/Renderer.h | 1 |
3 files changed, 4 insertions, 5 deletions
diff --git a/src/Game.cpp b/src/Game.cpp index d265e83..e629aca 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -39,7 +39,7 @@ Game::Game() : playerPos(vmml::vec3f::ZERO), playerRotY(vmml::mat4f::IDENTITY), glEnable(GL_MULTISAMPLE_ARB); - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, vmml::vec4f(0.1, 0.1, 0.1, 1).array); + glLightModelfv(GL_LIGHT_MODEL_AMBIENT, vmml::vec4f(0.05, 0.05, 0.05, 1).array); glLightfv(GL_LIGHT0, GL_AMBIENT, vmml::vec4f::ZERO.array); glLightfv(GL_LIGHT0, GL_DIFFUSE, vmml::vec4f::ONE.array); @@ -93,8 +93,8 @@ void Game::turn(float x, float y) { } void Game::run(int delta) { - lightPos += delta; - lightPos %= 24000; + lightPos += delta*0.5; + lightPos = std::fmod(lightPos, 24000); vmml::vec3f playerMove(vmml::vec3f::ZERO); @@ -65,7 +65,7 @@ class Game { unsigned input; - int lightPos; + float lightPos; }; } diff --git a/src/Renderer.h b/src/Renderer.h index bf2da20..1b6f91b 100644 --- a/src/Renderer.h +++ b/src/Renderer.h @@ -68,7 +68,6 @@ class Renderer { glClear(GL_STENCIL_BUFFER_BIT); glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); glDepthMask(GL_FALSE); - Shader::disable(); glFrontFace(GL_CCW); glStencilOp(GL_KEEP, GL_INCR, GL_KEEP); |