File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -285,8 +285,6 @@ var Shader = new Class({
285285
286286 this . setShader ( fragSource , vertSource ) ;
287287
288- this . initUniforms ( ) ;
289-
290288 this . projOrtho ( 0 , renderer . width , renderer . height , 0 ) ;
291289 } ,
292290
@@ -311,6 +309,8 @@ var Shader = new Class({
311309 this . fragSource = fragSource ;
312310 this . vertSource = vertSource ;
313311
312+ this . initUniforms ( ) ;
313+
314314 return this ;
315315 } ,
316316
@@ -369,8 +369,6 @@ var Shader = new Class({
369369 var type = uniform . type ;
370370 var data = map [ type ] ;
371371
372- uniform . uniformLocation = gl . getUniformLocation ( program , key ) ;
373-
374372 if ( type === 'sampler2D' )
375373 {
376374 // this.initSampler2D(uniform);
@@ -380,6 +378,7 @@ var Shader = new Class({
380378 uniform . glMatrix = data . matrix ;
381379 uniform . glValueLength = data . length ;
382380 uniform . glFunc = data . func ;
381+ uniform . uniformLocation = gl . getUniformLocation ( program , key ) ;
383382 }
384383 }
385384 } ,
You can’t perform that action at this time.
0 commit comments