Skip to content

Commit f42f0ce

Browse files
committed
Shader needs attributes
1 parent 8092460 commit f42f0ce

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src/renderer/webgl/WebGLShader.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
var Class = require('../../utils/Class');
8+
var Utils = require('./Utils');
89

910
/**
1011
* @classdesc
@@ -19,13 +20,14 @@ var Class = require('../../utils/Class');
1920
* @param {string} name - The name of this Shader.
2021
* @param {string} vertexShader - The vertex shader source code as a single string.
2122
* @param {string} fragmentShader - The fragment shader source code as a single string.
23+
* @param {string[]} attributes -
2224
* @param {string[]} [uniforms] - An array of shader uniform names that will be looked-up to get the locations for.
2325
*/
2426
var WebGLShader = new Class({
2527

2628
initialize:
2729

28-
function WebGLShader (pipeline, name, vertexShader, fragmentShader, uniforms)
30+
function WebGLShader (pipeline, name, vertexShader, fragmentShader, attributes, uniforms)
2931
{
3032
/**
3133
* A reference to the WebGLPipeline that owns this Shader.
@@ -74,6 +76,15 @@ var WebGLShader = new Class({
7476
*/
7577
this.program = this.renderer.createProgram(vertexShader, fragmentShader);
7678

79+
/**
80+
* Array of objects that describe the vertex attributes.
81+
*
82+
* @name Phaser.Renderer.WebGL.WebGLPipeline#attributes
83+
* @type {Phaser.Types.Renderer.WebGL.WebGLPipelineAttributesConfig}
84+
* @since 3.50.0
85+
*/
86+
this.attributes = attributes;
87+
7788
/**
7889
* The uniforms that this shader requires, as set via the configuration object.
7990
*

0 commit comments

Comments
 (0)