@@ -504,9 +504,9 @@ var Shader = new Class({
504504 var program = renderer . createProgram ( this . shader . vertexSrc , this . shader . fragmentSrc ) ;
505505
506506 // The default uniforms available within the vertex shader
507- renderer . setMatrix4 ( program , 'uViewMatrix' , false , this . viewMatrix ) ;
508- renderer . setMatrix4 ( program , 'uProjectionMatrix' , false , this . projectionMatrix ) ;
509- renderer . setFloat2 ( program , 'uResolution' , this . width , this . height ) ;
507+ gl . uniformMatrix4fv ( gl . getUniformLocation ( program , 'uViewMatrix' ) , false , this . viewMatrix ) ;
508+ gl . uniformMatrix4fv ( gl . getUniformLocation ( program , 'uProjectionMatrix' ) , false , this . projectionMatrix ) ;
509+ gl . uniform2f ( gl . getUniformLocation ( program , 'uResolution' ) , this . width , this . height ) ;
510510
511511 this . program = program ;
512512
@@ -602,7 +602,12 @@ var Shader = new Class({
602602
603603 var program = this . program ;
604604
605- this . renderer . setMatrix4 ( program , 'uProjectionMatrix' , false , this . projectionMatrix ) ;
605+ var gl = this . gl ;
606+ var renderer = this . renderer ;
607+
608+ renderer . setProgram ( program ) ;
609+
610+ gl . uniformMatrix4fv ( gl . getUniformLocation ( program , 'uProjectionMatrix' ) , false , this . projectionMatrix ) ;
606611
607612 this . _rendererWidth = right ;
608613 this . _rendererHeight = bottom ;
0 commit comments