Fixed bug in gl.bindTexture which tried to use an undefined private var.

This commit is contained in:
photonstorm 2014-02-27 23:21:47 +00:00
parent e4bd364a9f
commit 1599b15c21

View file

@ -33,7 +33,6 @@ PIXI.PixiShader = function(gl)
'}'
];
/**
* @property {number} textureCount - A local texture counter for multi-texture shaders.
*/
@ -51,7 +50,6 @@ PIXI.PixiShader = function(gl)
*/
PIXI.PixiShader.prototype.init = function()
{
var gl = this.gl;
var program = PIXI.compileProgram(gl, this.vertexSrc || PIXI.PixiShader.defaultVertexSrc, this.fragmentSrc);
@ -185,7 +183,7 @@ PIXI.PixiShader.prototype.initSampler2D = function(uniform)
var gl = this.gl;
gl.activeTexture(gl['TEXTURE' + this.textureCount]);
gl.bindTexture(gl.TEXTURE_2D, uniform.value.baseTexture._glTexture);
gl.bindTexture(gl.TEXTURE_2D, uniform.value.baseTexture._glTextures[gl.id]);
// Extended texture data
if (uniform.textureData)
@ -259,7 +257,6 @@ PIXI.PixiShader.prototype.syncUniforms = function()
// This would probably be faster in an array and it would guarantee key order
for (var key in this.uniforms)
{
uniform = this.uniforms[key];
if (uniform.glValueLength === 1)
@ -306,7 +303,6 @@ PIXI.PixiShader.prototype.syncUniforms = function()
/**
* Destroys the shader
* @method destroy
*
*/
PIXI.PixiShader.prototype.destroy = function()
{
@ -318,7 +314,7 @@ PIXI.PixiShader.prototype.destroy = function()
};
/**
*
* The Default Vertex shader source
* @property defaultVertexSrc
* @type String
*/
@ -342,7 +338,3 @@ PIXI.PixiShader.defaultVertexSrc = [
' vColor = vec4(color * aColor.x, aColor.x);',
'}'
];