summaryrefslogtreecommitdiffstats
path: root/src/graphics/opengl/test/transform_test.cpp
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-07-22 22:05:12 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-07-22 22:05:12 +0200
commit8797569d33c4917eb8f8a1dc2341aac7b5815315 (patch)
tree839aca030b0d3ed36cef15b051fbfd4bf8ecb754 /src/graphics/opengl/test/transform_test.cpp
parent86ea086790a677d6de6a836e7562814d3ba30bd1 (diff)
downloadcolobot-8797569d33c4917eb8f8a1dc2341aac7b5815315.tar.gz
colobot-8797569d33c4917eb8f8a1dc2341aac7b5815315.tar.bz2
colobot-8797569d33c4917eb8f8a1dc2341aac7b5815315.zip
Texture & mouse functions; refactoring & fixes
- cleaned up and added documentation to engine.h - refactored CEngine interface and associated structs - added mouse handling functions in CApplication & CEngine - fixed bugs in projection matrix setting - changed texture loading & handling - added const-values in CDevice & CGLDevice - changed event management in CApplication - other minor changes & bugfixes
Diffstat (limited to 'src/graphics/opengl/test/transform_test.cpp')
-rw-r--r--src/graphics/opengl/test/transform_test.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/graphics/opengl/test/transform_test.cpp b/src/graphics/opengl/test/transform_test.cpp
index 5982c4e..4decaa0 100644
--- a/src/graphics/opengl/test/transform_test.cpp
+++ b/src/graphics/opengl/test/transform_test.cpp
@@ -38,13 +38,13 @@ void Init(Gfx::CGLDevice *device)
device->SetRenderState(Gfx::RENDER_STATE_DEPTH_TEST, true);
device->SetShadeModel(Gfx::SHADE_SMOOTH);
}
-
+#include <GL/gl.h>
void Render(Gfx::CGLDevice *device)
{
device->BeginScene();
Math::Matrix persp;
- Math::LoadProjectionMatrix(persp, Math::PI / 4.0f, (600.0f) / (800.0f), 0.1f, 100.0f);
+ Math::LoadProjectionMatrix(persp, Math::PI / 4.0f, (800.0f) / (600.0f), 0.1f, 100.0f);
device->SetTransform(Gfx::TRANSFORM_PROJECTION, persp);
@@ -71,6 +71,8 @@ void Render(Gfx::CGLDevice *device)
Gfx::VertexCol line[2] = { Gfx::VertexCol() };
+ glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+
for (int x = -40; x <= 40; ++x)
{
line[0].color = Gfx::Color(0.7f + x / 120.0f, 0.0f, 0.0f);