diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-12-24 04:01:19 +0100 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-12-24 04:01:19 +0100 |
commit | 0f6fb2617e5234480994f954125f5c45d6d29e0b (patch) | |
tree | a99421984b3a3125788a325330fdc205e7fa7934 /src | |
parent | a7a5ae60e49f135fed64700e73fa378273afcefe (diff) | |
download | zoom++-0f6fb2617e5234480994f954125f5c45d6d29e0b.tar zoom++-0f6fb2617e5234480994f954125f5c45d6d29e0b.zip |
Don't disable shaders when rendering shadow volumes
Diffstat (limited to 'src')
-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); |