summaryrefslogtreecommitdiff
path: root/engine/engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engine/engine.cpp')
-rw-r--r--engine/engine.cpp43
1 files changed, 1 insertions, 42 deletions
diff --git a/engine/engine.cpp b/engine/engine.cpp
index 2e681e7..e67ead3 100644
--- a/engine/engine.cpp
+++ b/engine/engine.cpp
@@ -101,51 +101,10 @@ void Engine::update() {
float v_w = Config::window_h * Config::viewport_w;
float v_h = Config::window_h * Config::viewport_h;
- glViewport(
- v_x - v_w * 0.5,
- v_y - v_h * 0.5,
- v_w * 2,
- v_h * 2);
+ glViewport(v_x - v_w * 0.5, v_y - v_h * 0.5, v_w * 2, v_h * 2);
glScissor(v_x, v_y, v_w, v_h);
glEnable(GL_SCISSOR_TEST);
- glClearColor(0.2, 0.2, 0.2, 0);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- gluPerspective(45, (float)660 / (float)740, 1, 100);
-
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
-
- float f = tick * 0.0005;
-
- gluLookAt(
- 5 * sinf(f), 1, 5 * cosf(f),
- 0, 0, 0,
- 5 * sinf(f), 2, 5 * cosf(f));
-
- glBegin(GL_LINES);
- for(int i = -10; i < 11; i++) {
- if(i % 5 == 0)
- glColor3f(1, 1, 1);
- else
- glColor3f(.5, .5, .5);
- glVertex3f(i, 0, -10);
- glVertex3f(i, 0, 10);
- glVertex3f(-10, 0, i);
- glVertex3f(10, 0, i);
- }
- glEnd();
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(-0.5, 1.5, -Config::viewport_aspect * 0.5, Config::viewport_aspect * 1.5, 0, 10);
-
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
-
stage->draw();
glDisable(GL_SCISSOR_TEST);