Commit 0fc4c3e7 authored by hybrid's avatar hybrid

Avoid setting texture settings when no texture is active

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3496 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 68b6a2fd
...@@ -2624,6 +2624,8 @@ void COpenGLDriver::setWrapMode(const SMaterial& material) ...@@ -2624,6 +2624,8 @@ void COpenGLDriver::setWrapMode(const SMaterial& material)
// Has to be checked always because it depends on the textures // Has to be checked always because it depends on the textures
for (u32 u=0; u<MaxTextureUnits; ++u) for (u32 u=0; u<MaxTextureUnits; ++u)
{ {
if (!CurrentTexture[u])
continue;
if (MultiTextureExtension) if (MultiTextureExtension)
extGlActiveTexture(GL_TEXTURE0_ARB + u); extGlActiveTexture(GL_TEXTURE0_ARB + u);
else if (u>0) else if (u>0)
...@@ -2741,6 +2743,8 @@ void COpenGLDriver::setBasicRenderStates(const SMaterial& material, const SMater ...@@ -2741,6 +2743,8 @@ void COpenGLDriver::setBasicRenderStates(const SMaterial& material, const SMater
// Filtering has to be set for each texture layer // Filtering has to be set for each texture layer
for (u32 i=0; i<MaxTextureUnits; ++i) for (u32 i=0; i<MaxTextureUnits; ++i)
{ {
if (!CurrentTexture[i])
continue;
if (MultiTextureExtension) if (MultiTextureExtension)
extGlActiveTexture(GL_TEXTURE0_ARB + i); extGlActiveTexture(GL_TEXTURE0_ARB + i);
else if (i>0) else if (i>0)
......
Markdown is supported
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