Multitexture probably bug #4

Open
ghost opened this Issue Jul 3, 2012 · 0 comments

Comments

Projects
None yet
0 participants
@ghost

ghost commented Jul 3, 2012

webglu.js:2833

genMultiTextureAction = function DUA_genMultiTextureAction(texNum) {
        eval("var action = \n"+
"        function DUA_MultiTextureAction"+texNum+"(_ , object, material) {\n"+
"           try {\n"+
"               $W.GL.activeTexture($W.GL.TEXTURE0);\n"+
"               if (typeof(material.textures["+texNum+"]) === 'undefined') {\n"+
"                   $W.textures.wglu_internal_missing_texture.bind();\n"+
"               }else {\n"+
"                   $W.textures[material.textures["+texNum+"]].bind();\n"+
"               }\n"+
"               $W.GL.uniform1i(this.location, "+texNum+");\n"+
"           }catch (e) {\n"+
"               console.error('Material texture uniform error');\n"+
"               console.error(e);\n"+
"           }\n"+
"        }");
        return action;
    };

*Change this: *

$W.GL.activeTexture($W.GL.TEXTURE0);\n"

** put this : **

$W.GL.activeTexture($W.GL.TEXTURE"+texNum+");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment