From 856c345feca062fdfc0b177e0de25489fb1b0c06 Mon Sep 17 00:00:00 2001 From: "chirs241097@gmail.com" Date: Sat, 15 Mar 2014 02:29:19 +0000 Subject: Extend hge with a 3D Rotation method, it's not tested yet. Fix probable compile errors due to includes. --- hge/graphics.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'hge/graphics.cpp') diff --git a/hge/graphics.cpp b/hge/graphics.cpp index 0bab75a..9688024 100644 --- a/hge/graphics.cpp +++ b/hge/graphics.cpp @@ -253,6 +253,22 @@ void CALL HGE_Impl::Gfx_SetTransform(float x, float y, float dx, float dy, float } } +void CALL HGE_Impl::Gfx_SetTDRotate(float ang, float x, float y, float z) +{ + if (!bTransforming) + { + if ((x == 0.0f) && (y == 0.0f) && (z == 0.0f) && (ang == 0.0f)) + return; // nothing to do here, don't call into the GL. + } + + _render_batch(); + + bTransforming = true; + + pOpenGLDevice->glMatrixMode(GL_MODELVIEW); + pOpenGLDevice->glRotatef(ang, x, y, z); +} + bool CALL HGE_Impl::Gfx_BeginScene(HTARGET targ) { CRenderTargetList *target=(CRenderTargetList *)targ; -- cgit v1.2.3