summaryrefslogtreecommitdiffstats
path: root/src/Game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Game.cpp')
-rw-r--r--src/Game.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/Game.cpp b/src/Game.cpp
index 487019c..8f5af26 100644
--- a/src/Game.cpp
+++ b/src/Game.cpp
@@ -30,7 +30,7 @@
namespace Zoom {
Game::Game(bool multisample) : playerPos(vmml::vec3f::ZERO), playerRot(vmml::mat4f::IDENTITY),
- input(NONE), lightPos(0) {
+ input(0), lightPos(0) {
glClearColor(0.0, 0.0, 0.0, 1.0);
glClearDepth(1.0);
glEnable(GL_DEPTH_TEST);
@@ -80,6 +80,8 @@ void Game::run(int delta) {
lightPos += delta;
lightPos %= 24000;
+ playerRot.rotate_y(delta*M_PI/180/40);
+
if(input & FORWARD) {
playerPos -= playerRot*vmml::vec3f::UNIT_Z*0.01*delta;
}
@@ -127,7 +129,20 @@ void Game::render() {
glLoadMatrixf(inverse.array);
glLightfv(GL_LIGHT0, GL_POSITION, light);
+
renderer.render(triangles);
+
+ /*glBegin(GL_LINES);
+
+ glColor3f(0, 0, 1);
+ glVertex4f(-1, -0.5, -2, 1);
+ glVertex4f(1, -0.5, -2, 1);
+
+ glColor3f(1, 0, 0);
+ glVertex4f(0, -0.5, -2, 1);
+ glVertex4f(1, 0, 0, 0);
+
+ glEnd();*/
}
}