@@ -128,6 +128,76 @@ var EffectLayer = new Class({
128128 return ;
129129
130130 dstShader . setConstantFloat4 ( this . getUniformLocation ( uniformName ) , x , y , z , w ) ;
131+ } ,
132+
133+ setInt : function ( uniformName , x )
134+ {
135+ var dstShader = this . dstShader ;
136+
137+ if ( dstShader === null )
138+ return ;
139+
140+ dstShader . setConstantInt1 ( this . getUniformLocation ( uniformName ) , x ) ;
141+ } ,
142+
143+ setInt2 : function ( uniformName , x , y )
144+ {
145+ var dstShader = this . dstShader ;
146+
147+ if ( dstShader === null )
148+ return ;
149+
150+ dstShader . setConstantInt2 ( this . getUniformLocation ( uniformName ) , x , y ) ;
151+ } ,
152+
153+ setInt3 : function ( uniformName , x , y , z )
154+ {
155+ var dstShader = this . dstShader ;
156+
157+ if ( dstShader === null )
158+ return ;
159+
160+ dstShader . setConstantInt3 ( this . getUniformLocation ( uniformName ) , x , y , z ) ;
161+ } ,
162+
163+ setInt4 : function ( uniformName , x , y , z , w )
164+ {
165+ var dstShader = this . dstShader ;
166+
167+ if ( dstShader === null )
168+ return ;
169+
170+ dstShader . setConstantInt4 ( this . getUniformLocation ( uniformName ) , x , y , z , w ) ;
171+ } ,
172+
173+ setMatrix2x2 : function ( uniformName , matrix )
174+ {
175+ var dstShader = this . dstShader ;
176+
177+ if ( dstShader === null )
178+ return ;
179+
180+ dstShader . setConstantMatrix2x2 ( this . getUniformLocation ( uniformName ) , matrix ) ;
181+ } ,
182+
183+ setMatrix3x3 : function ( uniformName , matrix )
184+ {
185+ var dstShader = this . dstShader ;
186+
187+ if ( dstShader === null )
188+ return ;
189+
190+ dstShader . setConstantMatrix3x3 ( this . getUniformLocation ( uniformName ) , matrix ) ;
191+ } ,
192+
193+ setMatrix4x4 : function ( uniformName , matrix )
194+ {
195+ var dstShader = this . dstShader ;
196+
197+ if ( dstShader === null )
198+ return ;
199+
200+ dstShader . setConstantMatrix4x4 ( this . getUniformLocation ( uniformName ) , matrix ) ;
131201 }
132202
133203} ) ;
0 commit comments