Skip to content

Commit f87bd7d

Browse files
committed
Removed all of the shader setters. This should be done via the WebGLShader class now.
1 parent 4806224 commit f87bd7d

1 file changed

Lines changed: 0 additions & 384 deletions

File tree

src/renderer/webgl/WebGLRenderer.js

Lines changed: 0 additions & 384 deletions
Original file line numberDiff line numberDiff line change
@@ -2768,390 +2768,6 @@ var WebGLRenderer = new Class({
27682768
return this;
27692769
},
27702770

2771-
/**
2772-
* Sets a 1f uniform value on the given shader.
2773-
*
2774-
* If the shader is not currently active, it is made active first.
2775-
*
2776-
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat1
2777-
* @since 3.0.0
2778-
*
2779-
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
2780-
* @param {string} name - The name of the uniform to look-up and modify.
2781-
* @param {number} x - The 1f value to set on the named uniform.
2782-
*
2783-
* @return {this} This WebGL Renderer instance.
2784-
*/
2785-
setFloat1: function (program, name, x)
2786-
{
2787-
this.setProgram(program);
2788-
2789-
this.gl.uniform1f(this.gl.getUniformLocation(program, name), x);
2790-
2791-
return this;
2792-
},
2793-
2794-
/**
2795-
* Sets the 2f uniform values on the given shader.
2796-
*
2797-
* If the shader is not currently active, it is made active first.
2798-
*
2799-
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat2
2800-
* @since 3.0.0
2801-
*
2802-
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
2803-
* @param {string} name - The name of the uniform to look-up and modify.
2804-
* @param {number} x - The 2f x value to set on the named uniform.
2805-
* @param {number} y - The 2f y value to set on the named uniform.
2806-
*
2807-
* @return {this} This WebGL Renderer instance.
2808-
*/
2809-
setFloat2: function (program, name, x, y)
2810-
{
2811-
this.setProgram(program);
2812-
2813-
this.gl.uniform2f(this.gl.getUniformLocation(program, name), x, y);
2814-
2815-
return this;
2816-
},
2817-
2818-
/**
2819-
* Sets the 3f uniform values on the given shader.
2820-
*
2821-
* If the shader is not currently active, it is made active first.
2822-
*
2823-
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat3
2824-
* @since 3.0.0
2825-
*
2826-
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
2827-
* @param {string} name - The name of the uniform to look-up and modify.
2828-
* @param {number} x - The 3f x value to set on the named uniform.
2829-
* @param {number} y - The 3f y value to set on the named uniform.
2830-
* @param {number} z - The 3f z value to set on the named uniform.
2831-
*
2832-
* @return {this} This WebGL Renderer instance.
2833-
*/
2834-
setFloat3: function (program, name, x, y, z)
2835-
{
2836-
this.setProgram(program);
2837-
2838-
this.gl.uniform3f(this.gl.getUniformLocation(program, name), x, y, z);
2839-
2840-
return this;
2841-
},
2842-
2843-
/**
2844-
* Sets the 4f uniform values on the given shader.
2845-
*
2846-
* If the shader is not currently active, it is made active first.
2847-
*
2848-
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat4
2849-
* @since 3.0.0
2850-
*
2851-
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
2852-
* @param {string} name - The name of the uniform to look-up and modify.
2853-
* @param {number} x - The 4f x value to set on the named uniform.
2854-
* @param {number} y - The 4f y value to set on the named uniform.
2855-
* @param {number} z - The 4f z value to set on the named uniform.
2856-
* @param {number} w - The 4f w value to set on the named uniform.
2857-
*
2858-
* @return {this} This WebGL Renderer instance.
2859-
*/
2860-
setFloat4: function (program, name, x, y, z, w)
2861-
{
2862-
this.setProgram(program);
2863-
2864-
this.gl.uniform4f(this.gl.getUniformLocation(program, name), x, y, z, w);
2865-
2866-
return this;
2867-
},
2868-
2869-
/**
2870-
* Sets the value of a 1fv uniform variable in the given WebGLProgram.
2871-
*
2872-
* If the shader is not currently active, it is made active first.
2873-
*
2874-
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat1v
2875-
* @since 3.13.0
2876-
*
2877-
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
2878-
* @param {string} name - The name of the uniform to look-up and modify.
2879-
* @param {Float32Array} arr - The new value to be used for the uniform variable.
2880-
*
2881-
* @return {this} This WebGL Renderer instance.
2882-
*/
2883-
setFloat1v: function (program, name, arr)
2884-
{
2885-
this.setProgram(program);
2886-
2887-
this.gl.uniform1fv(this.gl.getUniformLocation(program, name), arr);
2888-
2889-
return this;
2890-
},
2891-
2892-
/**
2893-
* Sets the value of a 2fv uniform variable in the given WebGLProgram.
2894-
*
2895-
* If the shader is not currently active, it is made active first.
2896-
*
2897-
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat2v
2898-
* @since 3.13.0
2899-
*
2900-
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
2901-
* @param {string} name - The name of the uniform to look-up and modify.
2902-
* @param {Float32Array} arr - The new value to be used for the uniform variable.
2903-
*
2904-
* @return {this} This WebGL Renderer instance.
2905-
*/
2906-
setFloat2v: function (program, name, arr)
2907-
{
2908-
this.setProgram(program);
2909-
2910-
this.gl.uniform2fv(this.gl.getUniformLocation(program, name), arr);
2911-
2912-
return this;
2913-
},
2914-
2915-
/**
2916-
* Sets the value of a 3fv uniform variable in the given WebGLProgram.
2917-
*
2918-
* If the shader is not currently active, it is made active first.
2919-
*
2920-
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat3v
2921-
* @since 3.13.0
2922-
*
2923-
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
2924-
* @param {string} name - The name of the uniform to look-up and modify.
2925-
* @param {Float32Array} arr - The new value to be used for the uniform variable.
2926-
*
2927-
* @return {this} This WebGL Renderer instance.
2928-
*/
2929-
setFloat3v: function (program, name, arr)
2930-
{
2931-
this.setProgram(program);
2932-
2933-
this.gl.uniform3fv(this.gl.getUniformLocation(program, name), arr);
2934-
2935-
return this;
2936-
},
2937-
2938-
/**
2939-
* Sets the value of a 4fv uniform variable in the given WebGLProgram.
2940-
*
2941-
* If the shader is not currently active, it is made active first.
2942-
*
2943-
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat4v
2944-
* @since 3.13.0
2945-
*
2946-
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
2947-
* @param {string} name - The name of the uniform to look-up and modify.
2948-
* @param {Float32Array} arr - The new value to be used for the uniform variable.
2949-
*
2950-
* @return {this} This WebGL Renderer instance.
2951-
*/
2952-
2953-
setFloat4v: function (program, name, arr)
2954-
{
2955-
this.setProgram(program);
2956-
2957-
this.gl.uniform4fv(this.gl.getUniformLocation(program, name), arr);
2958-
2959-
return this;
2960-
},
2961-
2962-
/**
2963-
* Sets a 1iv uniform value on the given shader.
2964-
*
2965-
* If the shader is not currently active, it is made active first.
2966-
*
2967-
* @method Phaser.Renderer.WebGL.WebGLRenderer#setInt1iv
2968-
* @since 3.50.0
2969-
*
2970-
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
2971-
* @param {string} name - The name of the uniform to look-up and modify.
2972-
* @param {Int32List} arr - The 1iv value to set on the named uniform.
2973-
*
2974-
* @return {this} This WebGL Renderer instance.
2975-
*/
2976-
setInt1iv: function (program, name, arr)
2977-
{
2978-
this.setProgram(program);
2979-
2980-
this.gl.uniform1iv(this.gl.getUniformLocation(program, name), arr);
2981-
2982-
return this;
2983-
},
2984-
2985-
/**
2986-
* Sets a 1i uniform value on the given shader.
2987-
*
2988-
* If the shader is not currently active, it is made active first.
2989-
*
2990-
* @method Phaser.Renderer.WebGL.WebGLRenderer#setInt1
2991-
* @since 3.0.0
2992-
*
2993-
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
2994-
* @param {string} name - The name of the uniform to look-up and modify.
2995-
* @param {integer} x - The 1i value to set on the named uniform.
2996-
*
2997-
* @return {this} This WebGL Renderer instance.
2998-
*/
2999-
setInt1: function (program, name, x)
3000-
{
3001-
this.setProgram(program);
3002-
3003-
this.gl.uniform1i(this.gl.getUniformLocation(program, name), x);
3004-
3005-
return this;
3006-
},
3007-
3008-
/**
3009-
* Sets the 2i uniform values on the given shader.
3010-
*
3011-
* If the shader is not currently active, it is made active first.
3012-
*
3013-
* @method Phaser.Renderer.WebGL.WebGLRenderer#setInt2
3014-
* @since 3.0.0
3015-
*
3016-
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
3017-
* @param {string} name - The name of the uniform to look-up and modify.
3018-
* @param {integer} x - The 2i x value to set on the named uniform.
3019-
* @param {integer} y - The 2i y value to set on the named uniform.
3020-
*
3021-
* @return {this} This WebGL Renderer instance.
3022-
*/
3023-
setInt2: function (program, name, x, y)
3024-
{
3025-
this.setProgram(program);
3026-
3027-
this.gl.uniform2i(this.gl.getUniformLocation(program, name), x, y);
3028-
3029-
return this;
3030-
},
3031-
3032-
/**
3033-
* Sets the 3i uniform values on the given shader.
3034-
*
3035-
* If the shader is not currently active, it is made active first.
3036-
*
3037-
* @method Phaser.Renderer.WebGL.WebGLRenderer#setInt3
3038-
* @since 3.0.0
3039-
*
3040-
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
3041-
* @param {string} name - The name of the uniform to look-up and modify.
3042-
* @param {integer} x - The 3i x value to set on the named uniform.
3043-
* @param {integer} y - The 3i y value to set on the named uniform.
3044-
* @param {integer} z - The 3i z value to set on the named uniform.
3045-
*
3046-
* @return {this} This WebGL Renderer instance.
3047-
*/
3048-
setInt3: function (program, name, x, y, z)
3049-
{
3050-
this.setProgram(program);
3051-
3052-
this.gl.uniform3i(this.gl.getUniformLocation(program, name), x, y, z);
3053-
3054-
return this;
3055-
},
3056-
3057-
/**
3058-
* Sets the 4i uniform values on the given shader.
3059-
*
3060-
* If the shader is not currently active, it is made active first.
3061-
*
3062-
* @method Phaser.Renderer.WebGL.WebGLRenderer#setInt4
3063-
* @since 3.0.0
3064-
*
3065-
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
3066-
* @param {string} name - The name of the uniform to look-up and modify.
3067-
* @param {integer} x - The 4i x value to set on the named uniform.
3068-
* @param {integer} y - The 4i y value to set on the named uniform.
3069-
* @param {integer} z - The 4i z value to set on the named uniform.
3070-
* @param {integer} w - The 4i w value to set on the named uniform.
3071-
*
3072-
* @return {this} This WebGL Renderer instance.
3073-
*/
3074-
setInt4: function (program, name, x, y, z, w)
3075-
{
3076-
this.setProgram(program);
3077-
3078-
this.gl.uniform4i(this.gl.getUniformLocation(program, name), x, y, z, w);
3079-
3080-
return this;
3081-
},
3082-
3083-
/**
3084-
* Sets the value of a matrix 2fv uniform variable in the given WebGLProgram.
3085-
*
3086-
* If the shader is not currently active, it is made active first.
3087-
*
3088-
* @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix2
3089-
* @since 3.0.0
3090-
*
3091-
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
3092-
* @param {string} name - The name of the uniform to look-up and modify.
3093-
* @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false.
3094-
* @param {Float32Array} matrix - A Float32Array or sequence of 4 float values.
3095-
*
3096-
* @return {this} This WebGL Renderer instance.
3097-
*/
3098-
setMatrix2: function (program, name, transpose, matrix)
3099-
{
3100-
this.setProgram(program);
3101-
3102-
this.gl.uniformMatrix2fv(this.gl.getUniformLocation(program, name), transpose, matrix);
3103-
3104-
return this;
3105-
},
3106-
3107-
/**
3108-
* Sets the value of a matrix 3fv uniform variable in the given WebGLProgram.
3109-
*
3110-
* If the shader is not currently active, it is made active first.
3111-
*
3112-
* @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix3
3113-
* @since 3.0.0
3114-
*
3115-
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
3116-
* @param {string} name - The name of the uniform to look-up and modify.
3117-
* @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false.
3118-
* @param {Float32Array} matrix - A Float32Array or sequence of 9 float values.
3119-
*
3120-
* @return {this} This WebGL Renderer instance.
3121-
*/
3122-
setMatrix3: function (program, name, transpose, matrix)
3123-
{
3124-
this.setProgram(program);
3125-
3126-
this.gl.uniformMatrix3fv(this.gl.getUniformLocation(program, name), transpose, matrix);
3127-
3128-
return this;
3129-
},
3130-
3131-
/**
3132-
* Sets the value of a matrix 4fv uniform variable in the given WebGLProgram.
3133-
*
3134-
* If the shader is not currently active, it is made active first.
3135-
*
3136-
* @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix4
3137-
* @since 3.0.0
3138-
*
3139-
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
3140-
* @param {string} name - The name of the uniform to look-up and modify.
3141-
* @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false.
3142-
* @param {Float32Array} matrix - A Float32Array or sequence of 16 float values.
3143-
*
3144-
* @return {this} This WebGL Renderer instance.
3145-
*/
3146-
setMatrix4: function (program, name, transpose, matrix)
3147-
{
3148-
this.setProgram(program);
3149-
3150-
this.gl.uniformMatrix4fv(this.gl.getUniformLocation(program, name), transpose, matrix);
3151-
3152-
return this;
3153-
},
3154-
31552771
/**
31562772
* Returns the maximum number of texture units that can be used in a fragment shader.
31572773
*

0 commit comments

Comments
 (0)