diff options
Diffstat (limited to 'js/helper-classes/RDGE/src/core')
6 files changed, 11 insertions, 18 deletions
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) { | |||
64 | RDGE.RenderObject.prototype.addUniformArray = function (name, value, type, size) { | 64 | RDGE.RenderObject.prototype.addUniformArray = function (name, value, type, size) { |
65 | var uniform = RDGE.globals.gl.getUniformLocation(this.shader, name); | 65 | var uniform = RDGE.globals.gl.getUniformLocation(this.shader, name); |
66 | if (uniform) { | 66 | if (uniform) { |
67 | for (var index = 0; index < size; index) { | 67 | for (var index = 0; index < size; index++) { |
68 | uniform.debugName = name + index; | 68 | uniform.debugName = name + index; |
69 | this.bindings.uniforms.push(new RDGE.UniformPair(uniform, value[index], type)); | 69 | this.bindings.uniforms.push(new RDGE.UniformPair(uniform, value[index], type)); |
70 | uniform += value[index].length; | 70 | 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) { | |||
331 | context.id = canvas.rdgeid; | 331 | context.id = canvas.rdgeid; |
332 | context.renderer = canvas.renderer; | 332 | context.renderer = canvas.renderer; |
333 | context.ctxStateManager = stateMan; | 333 | context.ctxStateManager = stateMan; |
334 | context.startUpState; | ||
335 | 334 | ||
336 | context.renderer.mvMatrix = RDGE.mat4.identity(); | 335 | context.renderer.mvMatrix = RDGE.mat4.identity(); |
337 | context.renderer.invMvMatrix = RDGE.mat4.identity(); | 336 | 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) { | |||
237 | this.requestComplete = false; | 237 | this.requestComplete = false; |
238 | this.sceneProcessor = new RDGE.SetupScene(); | 238 | this.sceneProcessor = new RDGE.SetupScene(); |
239 | this.doSceneRequest = false; | 239 | this.doSceneRequest = false; |
240 | this.rawData; | ||
241 | this.scene; | ||
242 | 240 | ||
243 | /* | 241 | /* |
244 | * @return - returns true when all meshes for the request are done | 242 | * @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 () { | |||
91 | enableNormalMapping = true; | 91 | enableNormalMapping = true; |
92 | this.lights = [null, null, null, null]; | 92 | this.lights = [null, null, null, null]; |
93 | 93 | ||
94 | // the camera | ||
95 | this.cam; | ||
96 | |||
97 | // state settings - set functions in the array that set states or 'other' so long as it makes since | 94 | // state settings - set functions in the array that set states or 'other' so long as it makes since |
98 | this.stateSettings = []; | 95 | this.stateSettings = []; |
99 | }; | 96 | }; |
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 () { | |||
14 | depthBuffer: 0x00000100, | 14 | depthBuffer: 0x00000100, |
15 | stencilBuffer: 0x00000400, | 15 | stencilBuffer: 0x00000400, |
16 | 16 | ||
17 | // buffer types | ||
18 | BUFFER_STATIC: 0, | ||
19 | BUFFER_DYNAMIC: 1, | ||
20 | BUFFER_STREAM: 2, | ||
21 | |||
22 | // primitive types | 17 | // primitive types |
23 | POINTS: 0, | 18 | POINTS: 0, |
24 | LINES: 1, | 19 | LINES: 1, |
@@ -82,14 +77,18 @@ RDGE._renderer = function (canvas) { | |||
82 | /* | 77 | /* |
83 | * Initialize the context associated with this canvas | 78 | * Initialize the context associated with this canvas |
84 | */ | 79 | */ |
85 | this.ctx; | ||
86 | |||
87 | try { | 80 | try { |
88 | this.ctx = canvas.getContext("experimental-webgl", { preserveDrawingBuffer: true }); // true, true, false, true, true); | 81 | this.ctx = canvas.getContext("experimental-webgl", { preserveDrawingBuffer: true }); // true, true, false, true, true); |
89 | 82 | ||
90 | if (!this.ctx) this.ctx = canvas.getContext("webgl", { preserveDrawingBuffer: true }); | 83 | if (!this.ctx) { |
91 | if (!this.ctx) this.ctx = canvas.getContext("webkit-3d", { preserveDrawingBuffer: true }); | 84 | this.ctx = canvas.getContext("webgl", { preserveDrawingBuffer: true }); |
92 | if (!this.ctx) this.ctx = canvas.getContext("moz-webgl", { preserveDrawingBuffer: true }); | 85 | } |
86 | if (!this.ctx) { | ||
87 | this.ctx = canvas.getContext("webkit-3d", { preserveDrawingBuffer: true }); | ||
88 | } | ||
89 | if (!this.ctx) { | ||
90 | this.ctx = canvas.getContext("moz-webgl", { preserveDrawingBuffer: true }); | ||
91 | } | ||
93 | } | 92 | } |
94 | catch (err) { } | 93 | catch (err) { } |
95 | if (!this.ctx) { | 94 | 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) { | |||
364 | var len = channelNumber.length; | 364 | var len = channelNumber.length; |
365 | 365 | ||
366 | for (var i = 0; i < len; ++i) { | 366 | for (var i = 0; i < len; ++i) { |
367 | if (channelNumber[i], MATERIAL_MAX_LIGHTS) | 367 | if (channelNumber[i] < MATERIAL_MAX_LIGHTS) |
368 | matNode.lightChannel[channelNumber[i]] = null; | 368 | matNode.lightChannel[channelNumber[i]] = null; |
369 | } | 369 | } |
370 | } | 370 | } |