diff --git a/irr/src/OpenGL/Driver.cpp b/irr/src/OpenGL/Driver.cpp index e650edfc8cb3..5954eb4de512 100644 --- a/irr/src/OpenGL/Driver.cpp +++ b/irr/src/OpenGL/Driver.cpp @@ -1197,17 +1197,6 @@ void COpenGL3DriverBase::setRenderStates3DMode() //! Can be called by an IMaterialRenderer to make its work easier. void COpenGL3DriverBase::setBasicRenderStates(const SMaterial &material, const SMaterial &lastmaterial, bool resetAllRenderStates) { - // fillmode - if (Version.Spec != OpenGLSpec::ES && // not supported in gles - (resetAllRenderStates || - (lastmaterial.Wireframe != material.Wireframe) || - (lastmaterial.PointCloud != material.PointCloud))) { - GL.PolygonMode(GL_FRONT_AND_BACK, - material.Wireframe ? GL_LINE : - material.PointCloud ? GL_POINT : - GL_FILL); - } - // ZBuffer switch (material.ZBuffer) { case ECFN_DISABLED: @@ -1322,6 +1311,17 @@ void COpenGL3DriverBase::setBasicRenderStates(const SMaterial &material, const S getGLBlend(srcAlphaFact), getGLBlend(dstAlphaFact)); } + // fillmode + if (Version.Spec != OpenGLSpec::ES && // not supported in gles + (resetAllRenderStates || + (lastmaterial.Wireframe != material.Wireframe) || + (lastmaterial.PointCloud != material.PointCloud))) { + GL.PolygonMode(GL_FRONT_AND_BACK, + material.Wireframe ? GL_LINE : + material.PointCloud ? GL_POINT : + GL_FILL); + } + // Polygon Offset if (resetAllRenderStates || lastmaterial.PolygonOffsetDepthBias != material.PolygonOffsetDepthBias ||