aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/RDGE/src/core/script
diff options
context:
space:
mode:
Diffstat (limited to 'js/helper-classes/RDGE/src/core/script')
-rw-r--r--js/helper-classes/RDGE/src/core/script/renderer.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/js/helper-classes/RDGE/src/core/script/renderer.js b/js/helper-classes/RDGE/src/core/script/renderer.js
index 04cb36a7..a50b8a68 100644
--- a/js/helper-classes/RDGE/src/core/script/renderer.js
+++ b/js/helper-classes/RDGE/src/core/script/renderer.js
@@ -371,7 +371,6 @@ _renderer = function(canvas) {
371 mips = true; 371 mips = true;
372 372
373 if (texture) { 373 if (texture) {
374 //console.log( "createTexture: " + url );
375 texture.image = new Image(); 374 texture.image = new Image();
376 texture.image.src = url; 375 texture.image.src = url;
377 texture.image.context = g_Engine.getContext(); 376 texture.image.context = g_Engine.getContext();
@@ -379,16 +378,16 @@ _renderer = function(canvas) {
379 texture.image.onload = function() { 378 texture.image.onload = function() {
380 var stateMan = this.context.ctxStateManager; 379 var stateMan = this.context.ctxStateManager;
381 stateMan.RDGEInitState.loadTexture(texture); 380 stateMan.RDGEInitState.loadTexture(texture);
382 //console.log( "loaded texture: " + texture.lookUpName );
383 if (texture.callback) texture.callback( texture );
384 this.context.renderer.unloadedTextureCount--; 381 this.context.renderer.unloadedTextureCount--;
382 //console.log( "loaded texture: " + texture.lookUpName + ",to: " + this.context.renderer._world._worldCount + ", textures remaining to load: " + this.context.renderer.unloadedTextureCount );
383 if (texture.callback) texture.callback( texture );
385 if (this.context.renderer.unloadedTextureCount < 0) 384 if (this.context.renderer.unloadedTextureCount < 0)
386 console.log( "more textures loaded then created..." ); 385 console.log( "more textures loaded then created..." );
387 }; 386 };
388 texture.image.onerror = function() { 387 texture.image.onerror = function() {
389 this.context.renderer.unloadedTextureCount--; 388 this.context.renderer.unloadedTextureCount--;
390 if (texture.callback) texture.callback( texture ); 389 if (texture.callback) texture.callback( texture );
391 console.log( "Error loading texture: " + texture.image.src ); 390 //console.log( "Error loading texture: " + texture.image.src );
392 if (this.context.renderer.unloadedTextureCount < 0) 391 if (this.context.renderer.unloadedTextureCount < 0)
393 console.log( "more textures loaded then created..." ); 392 console.log( "more textures loaded then created..." );
394 } 393 }
@@ -565,8 +564,10 @@ _renderer = function(canvas) {
565 */ 564 */
566rdgeDefaultShaderDefintion = { 565rdgeDefaultShaderDefintion = {
567 'shaders': { 566 'shaders': {
568 'defaultVShader':"assets/shaders/test_vshader.glsl", 567 //'defaultVShader':"assets/shaders/test_vshader.glsl",
569 'defaultFShader':"assets/shaders/test_fshader.glsl" 568 //'defaultFShader':"assets/shaders/test_fshader.glsl"
569 'defaultVShader':"assets/shaders/Basic.vert.glsl",
570 'defaultFShader':"assets/shaders/Basic.frag.glsl"
570 }, 571 },
571 'techniques': { 572 'techniques': {
572 'defaultTechnique':[{ 573 'defaultTechnique':[{