bind texture when switching material
This commit is contained in:
1 parent
3209ec83c5
commit
da09c3f3ba
1 file changed
+1
@@ -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];
|
||||
|
||||
Reference in new issue
Block a user