mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 20:53:39 +00:00
Removed all of the shader setters. This should be done via the WebGLShader class now.
This commit is contained in:
parent
4806224097
commit
f87bd7d384
1 changed files with 0 additions and 384 deletions
|
@ -2768,390 +2768,6 @@ var WebGLRenderer = new Class({
|
|||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets a 1f uniform value on the given shader.
|
||||
*
|
||||
* If the shader is not currently active, it is made active first.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat1
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
|
||||
* @param {string} name - The name of the uniform to look-up and modify.
|
||||
* @param {number} x - The 1f value to set on the named uniform.
|
||||
*
|
||||
* @return {this} This WebGL Renderer instance.
|
||||
*/
|
||||
setFloat1: function (program, name, x)
|
||||
{
|
||||
this.setProgram(program);
|
||||
|
||||
this.gl.uniform1f(this.gl.getUniformLocation(program, name), x);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the 2f uniform values on the given shader.
|
||||
*
|
||||
* If the shader is not currently active, it is made active first.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat2
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
|
||||
* @param {string} name - The name of the uniform to look-up and modify.
|
||||
* @param {number} x - The 2f x value to set on the named uniform.
|
||||
* @param {number} y - The 2f y value to set on the named uniform.
|
||||
*
|
||||
* @return {this} This WebGL Renderer instance.
|
||||
*/
|
||||
setFloat2: function (program, name, x, y)
|
||||
{
|
||||
this.setProgram(program);
|
||||
|
||||
this.gl.uniform2f(this.gl.getUniformLocation(program, name), x, y);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the 3f uniform values on the given shader.
|
||||
*
|
||||
* If the shader is not currently active, it is made active first.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat3
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
|
||||
* @param {string} name - The name of the uniform to look-up and modify.
|
||||
* @param {number} x - The 3f x value to set on the named uniform.
|
||||
* @param {number} y - The 3f y value to set on the named uniform.
|
||||
* @param {number} z - The 3f z value to set on the named uniform.
|
||||
*
|
||||
* @return {this} This WebGL Renderer instance.
|
||||
*/
|
||||
setFloat3: function (program, name, x, y, z)
|
||||
{
|
||||
this.setProgram(program);
|
||||
|
||||
this.gl.uniform3f(this.gl.getUniformLocation(program, name), x, y, z);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the 4f uniform values on the given shader.
|
||||
*
|
||||
* If the shader is not currently active, it is made active first.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat4
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
|
||||
* @param {string} name - The name of the uniform to look-up and modify.
|
||||
* @param {number} x - The 4f x value to set on the named uniform.
|
||||
* @param {number} y - The 4f y value to set on the named uniform.
|
||||
* @param {number} z - The 4f z value to set on the named uniform.
|
||||
* @param {number} w - The 4f w value to set on the named uniform.
|
||||
*
|
||||
* @return {this} This WebGL Renderer instance.
|
||||
*/
|
||||
setFloat4: function (program, name, x, y, z, w)
|
||||
{
|
||||
this.setProgram(program);
|
||||
|
||||
this.gl.uniform4f(this.gl.getUniformLocation(program, name), x, y, z, w);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the value of a 1fv uniform variable in the given WebGLProgram.
|
||||
*
|
||||
* If the shader is not currently active, it is made active first.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat1v
|
||||
* @since 3.13.0
|
||||
*
|
||||
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
|
||||
* @param {string} name - The name of the uniform to look-up and modify.
|
||||
* @param {Float32Array} arr - The new value to be used for the uniform variable.
|
||||
*
|
||||
* @return {this} This WebGL Renderer instance.
|
||||
*/
|
||||
setFloat1v: function (program, name, arr)
|
||||
{
|
||||
this.setProgram(program);
|
||||
|
||||
this.gl.uniform1fv(this.gl.getUniformLocation(program, name), arr);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the value of a 2fv uniform variable in the given WebGLProgram.
|
||||
*
|
||||
* If the shader is not currently active, it is made active first.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat2v
|
||||
* @since 3.13.0
|
||||
*
|
||||
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
|
||||
* @param {string} name - The name of the uniform to look-up and modify.
|
||||
* @param {Float32Array} arr - The new value to be used for the uniform variable.
|
||||
*
|
||||
* @return {this} This WebGL Renderer instance.
|
||||
*/
|
||||
setFloat2v: function (program, name, arr)
|
||||
{
|
||||
this.setProgram(program);
|
||||
|
||||
this.gl.uniform2fv(this.gl.getUniformLocation(program, name), arr);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the value of a 3fv uniform variable in the given WebGLProgram.
|
||||
*
|
||||
* If the shader is not currently active, it is made active first.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat3v
|
||||
* @since 3.13.0
|
||||
*
|
||||
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
|
||||
* @param {string} name - The name of the uniform to look-up and modify.
|
||||
* @param {Float32Array} arr - The new value to be used for the uniform variable.
|
||||
*
|
||||
* @return {this} This WebGL Renderer instance.
|
||||
*/
|
||||
setFloat3v: function (program, name, arr)
|
||||
{
|
||||
this.setProgram(program);
|
||||
|
||||
this.gl.uniform3fv(this.gl.getUniformLocation(program, name), arr);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the value of a 4fv uniform variable in the given WebGLProgram.
|
||||
*
|
||||
* If the shader is not currently active, it is made active first.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat4v
|
||||
* @since 3.13.0
|
||||
*
|
||||
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
|
||||
* @param {string} name - The name of the uniform to look-up and modify.
|
||||
* @param {Float32Array} arr - The new value to be used for the uniform variable.
|
||||
*
|
||||
* @return {this} This WebGL Renderer instance.
|
||||
*/
|
||||
|
||||
setFloat4v: function (program, name, arr)
|
||||
{
|
||||
this.setProgram(program);
|
||||
|
||||
this.gl.uniform4fv(this.gl.getUniformLocation(program, name), arr);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets a 1iv uniform value on the given shader.
|
||||
*
|
||||
* If the shader is not currently active, it is made active first.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.WebGLRenderer#setInt1iv
|
||||
* @since 3.50.0
|
||||
*
|
||||
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
|
||||
* @param {string} name - The name of the uniform to look-up and modify.
|
||||
* @param {Int32List} arr - The 1iv value to set on the named uniform.
|
||||
*
|
||||
* @return {this} This WebGL Renderer instance.
|
||||
*/
|
||||
setInt1iv: function (program, name, arr)
|
||||
{
|
||||
this.setProgram(program);
|
||||
|
||||
this.gl.uniform1iv(this.gl.getUniformLocation(program, name), arr);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets a 1i uniform value on the given shader.
|
||||
*
|
||||
* If the shader is not currently active, it is made active first.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.WebGLRenderer#setInt1
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
|
||||
* @param {string} name - The name of the uniform to look-up and modify.
|
||||
* @param {integer} x - The 1i value to set on the named uniform.
|
||||
*
|
||||
* @return {this} This WebGL Renderer instance.
|
||||
*/
|
||||
setInt1: function (program, name, x)
|
||||
{
|
||||
this.setProgram(program);
|
||||
|
||||
this.gl.uniform1i(this.gl.getUniformLocation(program, name), x);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the 2i uniform values on the given shader.
|
||||
*
|
||||
* If the shader is not currently active, it is made active first.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.WebGLRenderer#setInt2
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
|
||||
* @param {string} name - The name of the uniform to look-up and modify.
|
||||
* @param {integer} x - The 2i x value to set on the named uniform.
|
||||
* @param {integer} y - The 2i y value to set on the named uniform.
|
||||
*
|
||||
* @return {this} This WebGL Renderer instance.
|
||||
*/
|
||||
setInt2: function (program, name, x, y)
|
||||
{
|
||||
this.setProgram(program);
|
||||
|
||||
this.gl.uniform2i(this.gl.getUniformLocation(program, name), x, y);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the 3i uniform values on the given shader.
|
||||
*
|
||||
* If the shader is not currently active, it is made active first.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.WebGLRenderer#setInt3
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
|
||||
* @param {string} name - The name of the uniform to look-up and modify.
|
||||
* @param {integer} x - The 3i x value to set on the named uniform.
|
||||
* @param {integer} y - The 3i y value to set on the named uniform.
|
||||
* @param {integer} z - The 3i z value to set on the named uniform.
|
||||
*
|
||||
* @return {this} This WebGL Renderer instance.
|
||||
*/
|
||||
setInt3: function (program, name, x, y, z)
|
||||
{
|
||||
this.setProgram(program);
|
||||
|
||||
this.gl.uniform3i(this.gl.getUniformLocation(program, name), x, y, z);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the 4i uniform values on the given shader.
|
||||
*
|
||||
* If the shader is not currently active, it is made active first.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.WebGLRenderer#setInt4
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
|
||||
* @param {string} name - The name of the uniform to look-up and modify.
|
||||
* @param {integer} x - The 4i x value to set on the named uniform.
|
||||
* @param {integer} y - The 4i y value to set on the named uniform.
|
||||
* @param {integer} z - The 4i z value to set on the named uniform.
|
||||
* @param {integer} w - The 4i w value to set on the named uniform.
|
||||
*
|
||||
* @return {this} This WebGL Renderer instance.
|
||||
*/
|
||||
setInt4: function (program, name, x, y, z, w)
|
||||
{
|
||||
this.setProgram(program);
|
||||
|
||||
this.gl.uniform4i(this.gl.getUniformLocation(program, name), x, y, z, w);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the value of a matrix 2fv uniform variable in the given WebGLProgram.
|
||||
*
|
||||
* If the shader is not currently active, it is made active first.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix2
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
|
||||
* @param {string} name - The name of the uniform to look-up and modify.
|
||||
* @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false.
|
||||
* @param {Float32Array} matrix - A Float32Array or sequence of 4 float values.
|
||||
*
|
||||
* @return {this} This WebGL Renderer instance.
|
||||
*/
|
||||
setMatrix2: function (program, name, transpose, matrix)
|
||||
{
|
||||
this.setProgram(program);
|
||||
|
||||
this.gl.uniformMatrix2fv(this.gl.getUniformLocation(program, name), transpose, matrix);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the value of a matrix 3fv uniform variable in the given WebGLProgram.
|
||||
*
|
||||
* If the shader is not currently active, it is made active first.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix3
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
|
||||
* @param {string} name - The name of the uniform to look-up and modify.
|
||||
* @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false.
|
||||
* @param {Float32Array} matrix - A Float32Array or sequence of 9 float values.
|
||||
*
|
||||
* @return {this} This WebGL Renderer instance.
|
||||
*/
|
||||
setMatrix3: function (program, name, transpose, matrix)
|
||||
{
|
||||
this.setProgram(program);
|
||||
|
||||
this.gl.uniformMatrix3fv(this.gl.getUniformLocation(program, name), transpose, matrix);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the value of a matrix 4fv uniform variable in the given WebGLProgram.
|
||||
*
|
||||
* If the shader is not currently active, it is made active first.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix4
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
|
||||
* @param {string} name - The name of the uniform to look-up and modify.
|
||||
* @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false.
|
||||
* @param {Float32Array} matrix - A Float32Array or sequence of 16 float values.
|
||||
*
|
||||
* @return {this} This WebGL Renderer instance.
|
||||
*/
|
||||
setMatrix4: function (program, name, transpose, matrix)
|
||||
{
|
||||
this.setProgram(program);
|
||||
|
||||
this.gl.uniformMatrix4fv(this.gl.getUniformLocation(program, name), transpose, matrix);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the maximum number of texture units that can be used in a fragment shader.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue