Browse Source

Fixed the default line join mode to be 'miter' instead of an undefined value.

Alex Szpakowski 11 years ago
parent
commit
e87fbdcaaf
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/modules/graphics/opengl/Graphics.cpp

+ 4 - 1
src/modules/graphics/opengl/Graphics.cpp

@@ -46,6 +46,7 @@ namespace opengl
 Graphics::Graphics()
 Graphics::Graphics()
 	: currentFont(0)
 	: currentFont(0)
 	, lineStyle(LINE_SMOOTH)
 	, lineStyle(LINE_SMOOTH)
+	, lineJoin(LINE_JOIN_MITER)
 	, lineWidth(1)
 	, lineWidth(1)
 	, matrixLimit(0)
 	, matrixLimit(0)
 	, userMatrices(0)
 	, userMatrices(0)
@@ -89,7 +90,8 @@ DisplayState Graphics::saveState()
 
 
 	s.blendMode = getBlendMode();
 	s.blendMode = getBlendMode();
 	//get line style
 	//get line style
-	s.lineStyle = lineStyle;
+	s.lineStyle = getLineStyle();
+	s.lineJoin = getLineJoin();
 	//get the point size
 	//get the point size
 	glGetFloatv(GL_POINT_SIZE, &s.pointSize);
 	glGetFloatv(GL_POINT_SIZE, &s.pointSize);
 	//get point style
 	//get point style
@@ -115,6 +117,7 @@ void Graphics::restoreState(const DisplayState &s)
 	setBlendMode(s.blendMode);
 	setBlendMode(s.blendMode);
 	setLineWidth(lineWidth);
 	setLineWidth(lineWidth);
 	setLineStyle(s.lineStyle);
 	setLineStyle(s.lineStyle);
+	setLineJoin(s.lineJoin);
 	setPointSize(s.pointSize);
 	setPointSize(s.pointSize);
 	setPointStyle(s.pointStyle);
 	setPointStyle(s.pointStyle);
 	if (s.scissor)
 	if (s.scissor)