From ccd2ebefd3d011b6051a6dfe937ac354bf49b483 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 10 Apr 2013 09:09:48 +0200 Subject: [PATCH] Removed OpenGL different drawing modes, as they were not used. Removed DRAW_MODE_NORMAL, DRAW_MODE_PREPARE_EDGES, DRAW_MODE_DRAW_EDGES modes. --- include/gal/opengl/opengl_gal.h | 56 --------------------------------- 1 file changed, 56 deletions(-) diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 4606698e35..d3539cc19d 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -67,13 +67,6 @@ class OPENGL_GAL : public GAL, public wxGLCanvas { public: - /// Current drawing mode - enum DrawMode { - DRAW_MODE_NORMAL, ///< Normal drawing mode - DRAW_MODE_PREPARE_EDGES, ///< Prepare the object edges - DRAW_MODE_DRAW_EDGES ///< Draw anti-aliased object edges - }; - /** * @brief Constructor OPENGL_GAL * @@ -311,58 +304,11 @@ public: paintListener = aPaintListener; } - // Special methods for OpenGL only - void SetDrawMode( DrawMode aDrawMode ) - { - m_drawMode = aDrawMode; - - switch( aDrawMode ) - { - case DRAW_MODE_NORMAL: - glColorMask( true, true, true, true ); - glEnable( GL_DEPTH_TEST ); - glDepthFunc( GL_LESS ); - break; - - case DRAW_MODE_PREPARE_EDGES: - // We just manipulate the Z-buffer in this mode - glColorMask( false, false, false, false ); - glEnable( GL_DEPTH_TEST ); - glDepthFunc( GL_LESS ); - // Shift the depth of the edge points a very small value deeper - // this way we prevent that overlapping edge points are not drawn twice - // and brighter, if we have used transparency. - glTranslated( 0, 0, (depthRange.y - depthRange.x) * DEPTH_ADJUST_FACTOR ); - break; - - case DRAW_MODE_DRAW_EDGES: - glColorMask( true, true, true, true ); - glEnable( GL_DEPTH_TEST ); - glDepthFunc( GL_LESS ); - // Restore the shifted position - glTranslated( 0, 0, -(depthRange.y - depthRange.x) * DEPTH_ADJUST_FACTOR ); - break; - - default: - break; - } - } - void SetShaderPath( const std::string& aPath ) { shaderPath = aPath; } - /** - * @brief Get the current drawing mode. - * - * @return the current drawing mode. - */ - DrawMode GetDrawMode() - { - return m_drawMode; - } - protected: virtual void DrawGridLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ); @@ -370,8 +316,6 @@ private: /// Super class definition typedef GAL super; - DrawMode m_drawMode; ///< Current drawing mode - static const int CIRCLE_POINTS = 64; ///< The number of points for circle approximation static const int CURVE_POINTS = 32; ///< The number of points for curve approximation static const int SHADER_NUMBER = 2; ///< Number of the used shaders