diff options
author | Nick Samarin <nicks1987@bigmir.net> | 2010-06-10 04:25:04 +0400 |
---|---|---|
committer | Nick Samarin <nicks1987@bigmir.net> | 2010-06-10 04:25:04 +0400 |
commit | 12b33ca099c57ec793c09b188f6fa1ab2c08beaa (patch) | |
tree | c9cd1e2b76299d3aa1835d806a6df3ea706c9931 /source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h | |
parent | 0183d551089c727724db13a67537156f157ae262 (diff) |
Added debug circle rendering (extended OglDebugLine to OglDebugShape, created new function KX_RasterizerDrawDebugCircle)
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h index 6bbf65f72a4..fe63a854275 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h @@ -44,10 +44,15 @@ using namespace std; #define RAS_MAX_TEXCO 8 // match in BL_Material #define RAS_MAX_ATTRIB 16 // match in BL_BlenderShader -struct OglDebugLine +struct OglDebugShape { - MT_Vector3 m_from; - MT_Vector3 m_to; + enum SHAPE_TYPE{ + LINE, CIRCLE + }; + SHAPE_TYPE m_type; + MT_Vector3 m_pos; + MT_Vector3 m_param; + MT_Vector3 m_param2; MT_Vector3 m_color; }; @@ -249,18 +254,13 @@ public: virtual void SetPolygonOffset(float mult, float add); - virtual void FlushDebugLines(); + virtual void FlushDebugShapes(); + virtual void DrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color); + virtual void DrawDebugCircle(const MT_Vector3& center, const MT_Scalar radius, const MT_Vector3& color, + const MT_Vector3& normal, int nsector); - virtual void DrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color) - { - OglDebugLine line; - line.m_from = from; - line.m_to = to; - line.m_color = color; - m_debugLines.push_back(line); - } - - std::vector <OglDebugLine> m_debugLines; + + std::vector <OglDebugShape> m_debugShapes; virtual void SetTexCoordNum(int num); virtual void SetAttribNum(int num); |