diff options
Diffstat (limited to 'js/helper-classes/RDGE/GLWorld.js')
-rw-r--r-- | js/helper-classes/RDGE/GLWorld.js | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/js/helper-classes/RDGE/GLWorld.js b/js/helper-classes/RDGE/GLWorld.js index 819f89db..c97e29d4 100644 --- a/js/helper-classes/RDGE/GLWorld.js +++ b/js/helper-classes/RDGE/GLWorld.js | |||
@@ -225,19 +225,15 @@ function GLWorld( canvas, use3D ) | |||
225 | { | 225 | { |
226 | if (this._useWebGL) | 226 | if (this._useWebGL) |
227 | { | 227 | { |
228 | if (this._allMapsLoaded) | 228 | var ctx = g_Engine.getContext(); |
229 | var ctx1 = g_Engine.ctxMan.handleToObject(this._canvas.rdgeCtxHandle); | ||
230 | if (ctx1 != ctx) console.log( "***** different contexts (2) *****" ); | ||
231 | var aRenderer = ctx1.renderer; | ||
232 | var renderer = ctx.renderer; | ||
233 | if (renderer != aRenderer) console.log( "***** DIFFERENT RENDERERS *****" ); | ||
234 | |||
235 | if (renderer.unloadedTextureCount <= 0) | ||
229 | { | 236 | { |
230 | var ctx = g_Engine.getContext(); | ||
231 | //console.log( "RDGE state: " + ctx.ctxStateManager.currentState().name); | ||
232 | |||
233 | ///////////////////////////// | ||
234 | var ctx1 = g_Engine.ctxMan.handleToObject(this._canvas.rdgeCtxHandle); | ||
235 | if (ctx1 != ctx) console.log( "***** different contexts (2) *****" ); | ||
236 | var aRenderer = ctx1.renderer; | ||
237 | ////////////////////////////////////////// | ||
238 | |||
239 | var renderer = ctx.renderer; | ||
240 | if (renderer != aRenderer) console.log( "***** DIFFERENT RENDERERS *****" ); | ||
241 | renderer.disableCulling(); | 237 | renderer.disableCulling(); |
242 | this.myScene.render(); | 238 | this.myScene.render(); |
243 | //console.log( "render" ); | 239 | //console.log( "render" ); |
@@ -249,8 +245,8 @@ function GLWorld( canvas, use3D ) | |||
249 | if (!this.hasAnimatedMaterials()) | 245 | if (!this.hasAnimatedMaterials()) |
250 | { | 246 | { |
251 | //this.myScene.render(); | 247 | //this.myScene.render(); |
252 | //this._canvas.task.stop(); | 248 | this._canvas.task.stop(); |
253 | this._renderCount = 10; | 249 | //this._renderCount = 10; |
254 | } | 250 | } |
255 | } | 251 | } |
256 | else if (this._renderCount >= 0) | 252 | else if (this._renderCount >= 0) |
@@ -259,7 +255,6 @@ function GLWorld( canvas, use3D ) | |||
259 | if (this._renderCount <= 0) | 255 | if (this._renderCount <= 0) |
260 | this._canvas.task.stop(); | 256 | this._canvas.task.stop(); |
261 | } | 257 | } |
262 | |||
263 | } | 258 | } |
264 | } | 259 | } |
265 | else | 260 | else |