@@ -34,10 +34,10 @@ var LightLayer = new Class({
3434 {
3535 GameObject . call ( this , scene , 'LightLayer' ) ;
3636
37- var resourceManager = scene . game . renderer . resourceManager ;
37+ var resourceManager = scene . sys . game . renderer . resourceManager ;
3838 this . _isDeferred = WebGLSupportedExtensions . has ( 'WEBGL_draw_buffers' ) ;
3939
40- this . renderer = scene . game . renderer ;
40+ this . renderer = scene . sys . game . renderer ;
4141 this . passShader = null ;
4242 this . gl = null ;
4343 this . ambientLightColorR = 0.0 ;
@@ -52,7 +52,7 @@ var LightLayer = new Class({
5252
5353 if ( resourceManager !== undefined && ! this . _isDeferred )
5454 {
55- this . gl = scene . game . renderer . gl ;
55+ this . gl = scene . sys . game . renderer . gl ;
5656 this . passShader = resourceManager . createShader ( 'Phong2DShaderForward' , { vert : TexturedAndNormalizedTintedShader . vert , frag : `
5757 precision mediump float;
5858
@@ -120,8 +120,8 @@ var LightLayer = new Class({
120120 }
121121 else
122122 {
123- var gl = this . gl = scene . game . renderer . gl ;
124- this . ext = scene . game . renderer . getExtension ( 'WEBGL_draw_buffers' ) ;
123+ var gl = this . gl = scene . sys . game . renderer . gl ;
124+ this . ext = scene . sys . game . renderer . getExtension ( 'WEBGL_draw_buffers' ) ;
125125 this . gBufferShaderPass = resourceManager . createShader ( 'GBufferShader' , { vert : TexturedAndNormalizedTintedShader . vert , frag : `
126126 #extension GL_EXT_draw_buffers : require
127127
@@ -236,14 +236,14 @@ var LightLayer = new Class({
236236
237237 gl . bindFramebuffer ( gl . FRAMEBUFFER , this . gBufferFbo ) ;
238238 gl . bindTexture ( gl . TEXTURE_2D , this . gBufferColorTex ) ;
239- gl . texImage2D ( gl . TEXTURE_2D , 0 , gl . RGBA , scene . game . renderer . width , scene . game . renderer . height , 0 , gl . RGBA , gl . UNSIGNED_BYTE , null ) ;
239+ gl . texImage2D ( gl . TEXTURE_2D , 0 , gl . RGBA , scene . sys . game . renderer . width , scene . sys . game . renderer . height , 0 , gl . RGBA , gl . UNSIGNED_BYTE , null ) ;
240240 gl . texParameteri ( gl . TEXTURE_2D , gl . TEXTURE_MAG_FILTER , gl . NEAREST ) ;
241241 gl . texParameteri ( gl . TEXTURE_2D , gl . TEXTURE_MIN_FILTER , gl . NEAREST ) ;
242242 gl . texParameteri ( gl . TEXTURE_2D , gl . TEXTURE_WRAP_S , gl . CLAMP_TO_EDGE ) ;
243243 gl . texParameteri ( gl . TEXTURE_2D , gl . TEXTURE_WRAP_T , gl . CLAMP_TO_EDGE ) ;
244244
245245 gl . bindTexture ( gl . TEXTURE_2D , this . gBufferNormalTex ) ;
246- gl . texImage2D ( gl . TEXTURE_2D , 0 , gl . RGBA , scene . game . renderer . width , scene . game . renderer . height , 0 , gl . RGBA , gl . UNSIGNED_BYTE , null ) ;
246+ gl . texImage2D ( gl . TEXTURE_2D , 0 , gl . RGBA , scene . sys . game . renderer . width , scene . sys . game . renderer . height , 0 , gl . RGBA , gl . UNSIGNED_BYTE , null ) ;
247247 gl . texParameteri ( gl . TEXTURE_2D , gl . TEXTURE_MAG_FILTER , gl . NEAREST ) ;
248248 gl . texParameteri ( gl . TEXTURE_2D , gl . TEXTURE_MIN_FILTER , gl . NEAREST ) ;
249249 gl . texParameteri ( gl . TEXTURE_2D , gl . TEXTURE_WRAP_S , gl . CLAMP_TO_EDGE ) ;
0 commit comments