Kaydet (Commit) 9741870c authored tarafından Markus Mohrhard's avatar Markus Mohrhard

extract the Z_STEP value into a define

Change-Id: I38ccce4c35f6cdaa2df0dfc250fcea72a8b79049
üst f3444316
...@@ -62,6 +62,8 @@ using namespace std; ...@@ -62,6 +62,8 @@ using namespace std;
#define WGL_SAMPLES_ARB 0x2042 #define WGL_SAMPLES_ARB 0x2042
#endif #endif
#define Z_STEP 0.001;
// end shaders // end shaders
static GLfloat squareVertices[] = { static GLfloat squareVertices[] = {
...@@ -497,7 +499,7 @@ int OpenGLRender::SetLine2DShapePoint(float x, float y, int listLength) ...@@ -497,7 +499,7 @@ int OpenGLRender::SetLine2DShapePoint(float x, float y, int listLength)
int OpenGLRender::RenderLine2FBO(int) int OpenGLRender::RenderLine2FBO(int)
{ {
m_fZStep += 0.001f; m_fZStep += Z_STEP;
CHECK_GL_ERROR(); CHECK_GL_ERROR();
glLineWidth(m_fLineWidth); glLineWidth(m_fLineWidth);
size_t listNum = m_Line2DShapePointList.size(); size_t listNum = m_Line2DShapePointList.size();
...@@ -1276,7 +1278,7 @@ int OpenGLRender::RectangleShapePoint(float x, float y, float directionX, float ...@@ -1276,7 +1278,7 @@ int OpenGLRender::RectangleShapePoint(float x, float y, float directionX, float
int OpenGLRender::RenderRectangleShape(bool bBorder, bool bFill) int OpenGLRender::RenderRectangleShape(bool bBorder, bool bFill)
{ {
m_fZStep += 0.001f; m_fZStep += Z_STEP;
size_t listNum = m_RectangleShapePointList.size(); size_t listNum = m_RectangleShapePointList.size();
for (size_t i = 0; i < listNum; i++) for (size_t i = 0; i < listNum; i++)
{ {
...@@ -1477,7 +1479,7 @@ int OpenGLRender::CreateTextTexture(const BitmapEx& rBitmapEx, awt::Point aPos, ...@@ -1477,7 +1479,7 @@ int OpenGLRender::CreateTextTexture(const BitmapEx& rBitmapEx, awt::Point aPos,
int OpenGLRender::RenderTextShape() int OpenGLRender::RenderTextShape()
{ {
CHECK_GL_ERROR(); CHECK_GL_ERROR();
m_fZStep += 0.01f; m_fZStep += Z_STEP;
size_t listNum = m_TextInfoList.size(); size_t listNum = m_TextInfoList.size();
for (size_t i = 0; i < listNum; i++) for (size_t i = 0; i < listNum; i++)
{ {
...@@ -1591,7 +1593,7 @@ int OpenGLRender::RenderArea2DShape() ...@@ -1591,7 +1593,7 @@ int OpenGLRender::RenderArea2DShape()
m_Area2DShapePointList.pop_front(); m_Area2DShapePointList.pop_front();
} }
glEnable(GL_MULTISAMPLE); glEnable(GL_MULTISAMPLE);
m_fZStep += 0.01f; m_fZStep += Z_STEP;
CHECK_GL_ERROR(); CHECK_GL_ERROR();
...@@ -1719,11 +1721,12 @@ int OpenGLRender::RenderPieSegment2DShape(float fSize, float fPosX, float fPosY) ...@@ -1719,11 +1721,12 @@ int OpenGLRender::RenderPieSegment2DShape(float fSize, float fPosX, float fPosY)
CHECK_GL_ERROR(); CHECK_GL_ERROR();
} }
m_fZStep += 0.01f; m_fZStep += Z_STEP;
CHECK_GL_ERROR(); CHECK_GL_ERROR();
return 0; return 0;
} }
int OpenGLRender::RenderSymbol2DShape(float x, float y, float width, float height, sal_Int32) int OpenGLRender::RenderSymbol2DShape(float x, float y, float width, float height, sal_Int32)
{ {
CHECK_GL_ERROR(); CHECK_GL_ERROR();
...@@ -1766,9 +1769,8 @@ int OpenGLRender::RenderSymbol2DShape(float x, float y, float width, float heigh ...@@ -1766,9 +1769,8 @@ int OpenGLRender::RenderSymbol2DShape(float x, float y, float width, float heigh
glUseProgram(0); glUseProgram(0);
glEnable(GL_MULTISAMPLE); glEnable(GL_MULTISAMPLE);
glEnable(GL_POINT_SMOOTH); glEnable(GL_POINT_SMOOTH);
m_fZStep += 0.01f;
CHECK_GL_ERROR(); CHECK_GL_ERROR();
m_fZStep += Z_STEP;
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment