bind texture when switching material

This commit is contained in:
Josh Holtrop 2011-05-26 22:20:01 -04:00
parent 3209ec83c5
commit da09c3f3ba

View File

@ -552,6 +552,7 @@ void Engine::Object::draw()
WFObj::Material & m = it->second;
if (m.flags & WFObj::Material::TEXTURE_BIT)
{
glBindTexture(GL_TEXTURE_2D, m.texture);
if (program != m_engine.m_programs[PROG_OBJ_TEX])
{
program = m_engine.m_programs[PROG_OBJ_TEX];