Added texture samplers

I hate Git branchs


Former-commit-id: 6978f1489cdc841d36fbcd6f1a8e01a4adbfcb8a
This commit is contained in:
Lynix
2012-12-17 14:56:29 +01:00
parent dc30b918a1
commit 8b67d17e38
13 changed files with 669 additions and 341 deletions

View File

@@ -51,14 +51,8 @@ bool NzGLSLShader::BindTextures()
for (auto it = m_textures.begin(); it != m_textures.end(); ++it)
{
TextureSlot& slot = it->second;
if (slot.enabled && !slot.updated)
{
glActiveTexture(GL_TEXTURE0 + slot.unit);
if (!slot.texture->Prepare())
NazaraWarning("Failed to prepare texture");
slot.updated = true;
}
if (slot.enabled)
NzRenderer::SetTexture(slot.unit, slot.texture);
}
return true;