Lowered the default size of WebGLSpriteBatch

This commit is contained in:
Mat Groves 2014-03-01 16:46:22 +00:00
parent 710b0fbe5e
commit ad73c5fa20
3 changed files with 9 additions and 16 deletions

View file

@ -4,7 +4,7 @@
* Copyright (c) 2012-2014, Mat Groves
* http://goodboydigital.com/
*
* Compiled: 2014-02-23
* Compiled: 2014-03-01
*
* pixi.js is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license.php
@ -4453,7 +4453,6 @@ PIXI.PixiShader = function(gl)
'}'
];
/**
* @property {number} textureCount - A local texture counter for multi-texture shaders.
*/
@ -4471,7 +4470,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);
@ -4605,7 +4603,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)
@ -4679,7 +4677,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)
@ -4726,7 +4723,6 @@ PIXI.PixiShader.prototype.syncUniforms = function()
/**
* Destroys the shader
* @method destroy
*
*/
PIXI.PixiShader.prototype.destroy = function()
{
@ -4738,7 +4734,7 @@ PIXI.PixiShader.prototype.destroy = function()
};
/**
*
* The Default Vertex shader source
* @property defaultVertexSrc
* @type String
*/
@ -4763,10 +4759,6 @@ PIXI.PixiShader.defaultVertexSrc = [
'}'
];
/**
* @author Mat Groves http://matgroves.com/ @Doormat23
* @author Richard Davey http://www.photonstorm.com @photonstorm
@ -6500,7 +6492,7 @@ PIXI.WebGLSpriteBatch = function(gl)
* @property size
* @type Number
*/
this.size = 10000;//Math.pow(2, 16) / this.vertSize;
this.size = 2000;//Math.pow(2, 16) / this.vertSize;
//the total number of floats in our batch
var numVerts = this.size * 4 * this.vertSize;
@ -9733,7 +9725,7 @@ PIXI.Rope.prototype.setTexture = function(texture)
* A tiling sprite is a fast way of rendering a tiling image
*
* @class TilingSprite
* @extends DisplayObjectContainer
* @extends Sprite
* @constructor
* @param texture {Texture} the texture of the tiling sprite
* @param width {Number} the width of the tiling sprite
@ -9750,6 +9742,7 @@ PIXI.TilingSprite = function(texture, width, height)
* @type Number
*/
this.width = width || 100;
/**
* The height of the tiling sprite
*

File diff suppressed because one or more lines are too long

View file

@ -32,7 +32,7 @@ PIXI.WebGLSpriteBatch = function(gl)
* @property size
* @type Number
*/
this.size = 10000;//Math.pow(2, 16) / this.vertSize;
this.size = 2000;//Math.pow(2, 16) / this.vertSize;
//the total number of floats in our batch
var numVerts = this.size * 4 * this.vertSize;