Commit b9db80e0 authored by Jan Möbius's avatar Jan Möbius
Browse files

Enable backface culling in old style planenode

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17388 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 9ec93a5a
......@@ -145,11 +145,14 @@ void PlaneNode::drawPlane( ACG::GLState& _state) {
// Remember blending state
bool blending = _state.blending();
bool culling = _state.isStateEnabled(GL_CULL_FACE);
//then the red front side
ACG::GLState::enable (GL_BLEND);
ACG::GLState::blendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
ACG::GLState::enable (GL_CULL_FACE);
_state.set_color(ACG::Vec4f( 0.6f, 0.15f, 0.2f, 0.5f));
glDrawArrays(GL_QUADS,0,4);
......@@ -157,11 +160,14 @@ void PlaneNode::drawPlane( ACG::GLState& _state) {
//finally the green back side
_state.set_color(ACG::Vec4f(0.1f, 0.8f, 0.2f, 0.5f ));
glDrawArrays(GL_QUADS,4,4);
glDrawArrays(GL_QUADS,5,4);
if ( !blending )
ACG::GLState::disable(GL_BLEND);
if ( !culling )
ACG::GLState::disable(GL_CULL_FACE);
// deactivate vertex arrays after drawing
_state.disableClientState(GL_VERTEX_ARRAY);
......
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