Commit 1d6a7fbb authored by Christopher Tenter's avatar Christopher Tenter
Browse files

Fixed solid textured drawmode for meshes

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@16861 383ad7c9-94d9-4d36-a494-682f7c89f535
parent c5e3e16a
......@@ -511,9 +511,17 @@ draw(GLState& _state, const DrawModes::DrawMode& _drawMode) {
drawMesh_->disableColors();
drawMesh_->usePerVertexTexcoords();
// texture environment: fragment color = texture sample
GLint prevTexEnvMode = 0;
glGetTexEnviv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, &prevTexEnvMode);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
draw_faces();
ACG::GLState::depthRange(0.0, 1.0);
ACG::GLState::disable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, prevTexEnvMode);
}
if ( ( _drawMode & DrawModes::SOLID_TEXTURED_SHADED ) && mesh_.has_vertex_texcoords2D() && mesh_.has_vertex_normals())
......
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