Commit 8673f47d authored by Marlin Frickenschmidt's avatar Marlin Frickenschmidt
Browse files

Moved depth_func_ from BaseNode to GL_State since most nodes don't use this....

Moved depth_func_ from BaseNode to GL_State since most nodes don't use this. Therefore some object nodes had to be updated to reflect this.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10094 383ad7c9-94d9-4d36-a494-682f7c89f535
parent ad262b15
......@@ -111,9 +111,7 @@ template <class BSplineCurve>
void
BSplineCurveNodeT<BSplineCurve>::
draw(GLState& _state, DrawModes::DrawMode _drawMode)
{
glDepthFunc(depthFunc());
{
glPushAttrib(GL_ENABLE_BIT);
if (_drawMode & DrawModes::WIREFRAME)
......@@ -144,7 +142,7 @@ draw(GLState& _state, DrawModes::DrawMode _drawMode)
render( _state, false, _drawMode);
}
glDepthFunc(GL_LESS);
glPopAttrib();
}
......
......@@ -111,7 +111,8 @@ void
BSplineSurfaceNodeT<BSplineSurface>::
draw(GLState& _state, DrawModes::DrawMode _drawMode)
{
glDepthFunc(depthFunc());
GLint prev_depth;
glGetIntegerv (GL_DEPTH_FUNC, &prev_depth);
glPushAttrib(GL_ENABLE_BIT);
......@@ -162,7 +163,7 @@ draw(GLState& _state, DrawModes::DrawMode _drawMode)
render( _state, false);
glDepthFunc(depthFunc());
glDepthFunc(prev_depth);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
......@@ -245,8 +246,6 @@ draw(GLState& _state, DrawModes::DrawMode _drawMode)
glDisable(GL_BLEND);
}
glDepthFunc(GL_LESS);
glPopAttrib();
}
......
Supports Markdown
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