bind texture when switching material
This commit is contained in:
parent
3209ec83c5
commit
da09c3f3ba
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user