From 8797569d33c4917eb8f8a1dc2341aac7b5815315 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sun, 22 Jul 2012 22:05:12 +0200 Subject: 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 --- src/graphics/opengl/test/transform_test.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/graphics/opengl/test/transform_test.cpp') 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 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); -- cgit v1.2.3-1-g7c22