From db70fc673e385e2e80f7b82b8f2a050314769928 Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Mon, 2 Apr 2012 15:29:52 -0700 Subject: Fixed compiler warnings --- js/helper-classes/RDGE/src/core/script/RenderProcs.js | 2 +- js/helper-classes/RDGE/src/core/script/engine.js | 1 - js/helper-classes/RDGE/src/core/script/init_state.js | 2 -- .../RDGE/src/core/script/rendercontext.js | 3 --- js/helper-classes/RDGE/src/core/script/renderer.js | 19 +++++++++---------- .../RDGE/src/core/script/scenegraphNodes.js | 2 +- 6 files changed, 11 insertions(+), 18 deletions(-) (limited to 'js/helper-classes/RDGE/src/core') diff --git a/js/helper-classes/RDGE/src/core/script/RenderProcs.js b/js/helper-classes/RDGE/src/core/script/RenderProcs.js index 4d7c055c..8961ac74 100755 --- a/js/helper-classes/RDGE/src/core/script/RenderProcs.js +++ b/js/helper-classes/RDGE/src/core/script/RenderProcs.js @@ -64,7 +64,7 @@ RDGE.RenderObject.prototype.addUniform = function (name, value, type) { RDGE.RenderObject.prototype.addUniformArray = function (name, value, type, size) { var uniform = RDGE.globals.gl.getUniformLocation(this.shader, name); if (uniform) { - for (var index = 0; index < size; index) { + for (var index = 0; index < size; index++) { uniform.debugName = name + index; this.bindings.uniforms.push(new RDGE.UniformPair(uniform, value[index], type)); uniform += value[index].length; diff --git a/js/helper-classes/RDGE/src/core/script/engine.js b/js/helper-classes/RDGE/src/core/script/engine.js index 0975fcef..e935767d 100755 --- a/js/helper-classes/RDGE/src/core/script/engine.js +++ b/js/helper-classes/RDGE/src/core/script/engine.js @@ -331,7 +331,6 @@ RDGE.Engine.prototype.registerCanvas = function (canvas, runState) { context.id = canvas.rdgeid; context.renderer = canvas.renderer; context.ctxStateManager = stateMan; - context.startUpState; context.renderer.mvMatrix = RDGE.mat4.identity(); context.renderer.invMvMatrix = RDGE.mat4.identity(); diff --git a/js/helper-classes/RDGE/src/core/script/init_state.js b/js/helper-classes/RDGE/src/core/script/init_state.js index c695f41b..24d92956 100755 --- a/js/helper-classes/RDGE/src/core/script/init_state.js +++ b/js/helper-classes/RDGE/src/core/script/init_state.js @@ -237,8 +237,6 @@ RDGE.sceneRequestDef = function (addr, sceneName) { this.requestComplete = false; this.sceneProcessor = new RDGE.SetupScene(); this.doSceneRequest = false; - this.rawData; - this.scene; /* * @return - returns true when all meshes for the request are done diff --git a/js/helper-classes/RDGE/src/core/script/rendercontext.js b/js/helper-classes/RDGE/src/core/script/rendercontext.js index 83c64473..02e185d8 100755 --- a/js/helper-classes/RDGE/src/core/script/rendercontext.js +++ b/js/helper-classes/RDGE/src/core/script/rendercontext.js @@ -91,9 +91,6 @@ RDGE.RenderContext = function () { enableNormalMapping = true; this.lights = [null, null, null, null]; - // the camera - this.cam; - // state settings - set functions in the array that set states or 'other' so long as it makes since this.stateSettings = []; }; diff --git a/js/helper-classes/RDGE/src/core/script/renderer.js b/js/helper-classes/RDGE/src/core/script/renderer.js index 06e9885e..2d794b6b 100755 --- a/js/helper-classes/RDGE/src/core/script/renderer.js +++ b/js/helper-classes/RDGE/src/core/script/renderer.js @@ -14,11 +14,6 @@ RDGE.rdgeConstants = (function () { depthBuffer: 0x00000100, stencilBuffer: 0x00000400, - // buffer types - BUFFER_STATIC: 0, - BUFFER_DYNAMIC: 1, - BUFFER_STREAM: 2, - // primitive types POINTS: 0, LINES: 1, @@ -82,14 +77,18 @@ RDGE._renderer = function (canvas) { /* * Initialize the context associated with this canvas */ - this.ctx; - try { this.ctx = canvas.getContext("experimental-webgl", { preserveDrawingBuffer: true }); // true, true, false, true, true); - if (!this.ctx) this.ctx = canvas.getContext("webgl", { preserveDrawingBuffer: true }); - if (!this.ctx) this.ctx = canvas.getContext("webkit-3d", { preserveDrawingBuffer: true }); - if (!this.ctx) this.ctx = canvas.getContext("moz-webgl", { preserveDrawingBuffer: true }); + if (!this.ctx) { + this.ctx = canvas.getContext("webgl", { preserveDrawingBuffer: true }); + } + if (!this.ctx) { + this.ctx = canvas.getContext("webkit-3d", { preserveDrawingBuffer: true }); + } + if (!this.ctx) { + this.ctx = canvas.getContext("moz-webgl", { preserveDrawingBuffer: true }); + } } catch (err) { } if (!this.ctx) { diff --git a/js/helper-classes/RDGE/src/core/script/scenegraphNodes.js b/js/helper-classes/RDGE/src/core/script/scenegraphNodes.js index 56199556..035e30d1 100755 --- a/js/helper-classes/RDGE/src/core/script/scenegraphNodes.js +++ b/js/helper-classes/RDGE/src/core/script/scenegraphNodes.js @@ -364,7 +364,7 @@ RDGE.materialNodeTemplate = function (matNode) { var len = channelNumber.length; for (var i = 0; i < len; ++i) { - if (channelNumber[i], MATERIAL_MAX_LIGHTS) + if (channelNumber[i] < MATERIAL_MAX_LIGHTS) matNode.lightChannel[channelNumber[i]] = null; } } -- cgit v1.2.3