From e87fbdcaaf3537c984b164da7378d125c961ec8f Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Tue, 15 Jul 2014 15:49:01 -0300 Subject: [PATCH] Fixed the default line join mode to be 'miter' instead of an undefined value. --- src/modules/graphics/opengl/Graphics.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/graphics/opengl/Graphics.cpp b/src/modules/graphics/opengl/Graphics.cpp index e92fee095..151d48da7 100644 --- a/src/modules/graphics/opengl/Graphics.cpp +++ b/src/modules/graphics/opengl/Graphics.cpp @@ -46,6 +46,7 @@ namespace opengl Graphics::Graphics() : currentFont(0) , lineStyle(LINE_SMOOTH) + , lineJoin(LINE_JOIN_MITER) , lineWidth(1) , matrixLimit(0) , userMatrices(0) @@ -89,7 +90,8 @@ DisplayState Graphics::saveState() s.blendMode = getBlendMode(); //get line style - s.lineStyle = lineStyle; + s.lineStyle = getLineStyle(); + s.lineJoin = getLineJoin(); //get the point size glGetFloatv(GL_POINT_SIZE, &s.pointSize); //get point style @@ -115,6 +117,7 @@ void Graphics::restoreState(const DisplayState &s) setBlendMode(s.blendMode); setLineWidth(lineWidth); setLineStyle(s.lineStyle); + setLineJoin(s.lineJoin); setPointSize(s.pointSize); setPointStyle(s.pointStyle); if (s.scissor)