Commit 52ec2775 authored by Maciej Suminski's avatar Maciej Suminski

Fixed bug of displaying stroked rectangles on wrong layer depth.

parent 84239542
...@@ -819,10 +819,6 @@ void OPENGL_GAL::DrawRectangle( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) ...@@ -819,10 +819,6 @@ void OPENGL_GAL::DrawRectangle( VECTOR2D aStartPoint, VECTOR2D aEndPoint )
selectShader( -1 ); selectShader( -1 );
glPushMatrix();
glTranslated( 0, 0, layerDepth );
// Stroke the outline // Stroke the outline
if( isStrokeEnabled ) if( isStrokeEnabled )
{ {
...@@ -841,15 +837,13 @@ void OPENGL_GAL::DrawRectangle( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) ...@@ -841,15 +837,13 @@ void OPENGL_GAL::DrawRectangle( VECTOR2D aStartPoint, VECTOR2D aEndPoint )
{ {
glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a );
glBegin( GL_QUADS ); glBegin( GL_QUADS );
glVertex2d( aStartPoint.x, aStartPoint.y ); glVertex3d( aStartPoint.x, aStartPoint.y, layerDepth );
glVertex2d( diagonalPointA.x, diagonalPointA.y ); glVertex3d( diagonalPointA.x, diagonalPointA.y, layerDepth );
glVertex2d( aEndPoint.x, aEndPoint.y ); glVertex3d( aEndPoint.x, aEndPoint.y, layerDepth );
glVertex2d( diagonalPointB.x, diagonalPointB.y ); glVertex3d( diagonalPointB.x, diagonalPointB.y, layerDepth );
glEnd(); glEnd();
} }
glPopMatrix();
// Restore the stroke color // Restore the stroke color
glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a );
} }
......
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