aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/RDGE/src/core/script/renderer.js
diff options
context:
space:
mode:
authorJohn Mayhew2012-04-02 15:29:52 -0700
committerJohn Mayhew2012-04-02 15:29:52 -0700
commitdb70fc673e385e2e80f7b82b8f2a050314769928 (patch)
treeb7155f6ad309b8bd013d7cb97b959ddc72996f57 /js/helper-classes/RDGE/src/core/script/renderer.js
parentfb0a659c9ca3479fd6799325498b11f074689936 (diff)
downloadninja-db70fc673e385e2e80f7b82b8f2a050314769928.tar.gz
Fixed compiler warnings
Diffstat (limited to 'js/helper-classes/RDGE/src/core/script/renderer.js')
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/renderer.js19
1 files changed, 9 insertions, 10 deletions
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) {