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

Don't texture edges, halfedges and points in meshnode

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@12513 383ad7c9-94d9-4d36-a494-682f7c89f535
parent c2f184b2
......@@ -230,6 +230,14 @@ draw(GLState& _state, const DrawModes::DrawMode& _drawMode) {
glPushAttrib(GL_ENABLE_BIT);
/// get bound texture buffer and target
GLuint lastBuffer = ACG::GLState::getBoundTextureBuffer();
GLenum lastTarget = ACG::GLState::getBoundTextureTarget();
// Unbind to avoid painting textures on non textured primitives
ACG::GLState::bindTexture(lastTarget,0);
if ( (_drawMode & DrawModes::POINTS) || (_drawMode & DrawModes::POINTS_COLORED) || (_drawMode & DrawModes::POINTS_SHADED ) ) {
ACG::GLState::shadeModel(GL_FLAT);
......@@ -441,6 +449,8 @@ draw(GLState& _state, const DrawModes::DrawMode& _drawMode) {
_state.set_base_color(base_color_backup);
}
// Rebind the previous texture
ACG::GLState::bindTexture(lastTarget,lastBuffer);
if ( ( _drawMode & DrawModes::SOLID_TEXTURED ) && mesh_.has_vertex_texcoords2D())
{
......
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