aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/geom')
-rwxr-xr-xjs/lib/geom/circle.js6
-rwxr-xr-xjs/lib/geom/line.js4
-rwxr-xr-xjs/lib/geom/rectangle.js8
-rw-r--r--js/lib/geom/shape-primitive.js4
4 files changed, 11 insertions, 11 deletions
diff --git a/js/lib/geom/circle.js b/js/lib/geom/circle.js
index dd82a4cc..52c2d449 100755
--- a/js/lib/geom/circle.js
+++ b/js/lib/geom/circle.js
@@ -176,7 +176,7 @@ var Circle = function GLCircle() {
176 if (!world._useWebGL) return; 176 if (!world._useWebGL) return;
177 177
178 // make sure RDGE has the correct context 178 // make sure RDGE has the correct context
179 g_Engine.setContext( world.getCanvas().rdgeid ); 179 RDGE.globals.engine.setContext( world.getCanvas().rdgeid );
180 180
181 // create the gl buffer 181 // create the gl buffer
182 var gl = world.getGLContext(); 182 var gl = world.getGLContext();
@@ -348,7 +348,7 @@ var Circle = function GLCircle() {
348 348
349 this.recalcTexMapCoords( vrts, uvs ); 349 this.recalcTexMapCoords( vrts, uvs );
350 350
351 return ShapePrimitive.create(vrts, nrms, uvs, indices, g_Engine.getContext().renderer.TRIANGLES, index); 351 return ShapePrimitive.create(vrts, nrms, uvs, indices, RDGE.globals.engine.getContext().renderer.TRIANGLES, index);
352 }; 352 };
353 353
354 this.generateOvalRing = function(xOff, yOff, rotationMat, innerScaleMat, outerScaleMat, nTriangles) { 354 this.generateOvalRing = function(xOff, yOff, rotationMat, innerScaleMat, outerScaleMat, nTriangles) {
@@ -405,7 +405,7 @@ var Circle = function GLCircle() {
405 405
406 this.recalcTexMapCoords( vrts, uvs ); 406 this.recalcTexMapCoords( vrts, uvs );
407 407
408 return ShapePrimitive.create(vrts, nrms, uvs, indices, g_Engine.getContext().renderer.TRIANGLE_STRIP, indices.length); 408 return ShapePrimitive.create(vrts, nrms, uvs, indices, RDGE.globals.engine.getContext().renderer.TRIANGLE_STRIP, indices.length);
409 }; 409 };
410 410
411 this.render = function() { 411 this.render = function() {
diff --git a/js/lib/geom/line.js b/js/lib/geom/line.js
index da63b21c..e8d967f0 100755
--- a/js/lib/geom/line.js
+++ b/js/lib/geom/line.js
@@ -167,7 +167,7 @@ var Line = function GLLine( world, xOffset, yOffset, width, height, slope, strok
167 if (!world._useWebGL) return; 167 if (!world._useWebGL) return;
168 168
169 // make sure RDGE has the correct context 169 // make sure RDGE has the correct context
170 g_Engine.setContext( world.getCanvas().rdgeid ); 170 RDGE.globals.engine.setContext( world.getCanvas().rdgeid );
171 171
172 // create the gl buffer 172 // create the gl buffer
173 var gl = world.getGLContext(); 173 var gl = world.getGLContext();
@@ -328,7 +328,7 @@ var Line = function GLLine( world, xOffset, yOffset, width, height, slope, strok
328 indices.push( index ); index++; 328 indices.push( index ); index++;
329 } 329 }
330 330
331 var prim = ShapePrimitive.create(strokeVertices, strokeNormals, strokeTextures, indices, g_Engine.getContext().renderer.TRIANGLES, indices.length); 331 var prim = ShapePrimitive.create(strokeVertices, strokeNormals, strokeTextures, indices, RDGE.globals.engine.getContext().renderer.TRIANGLES, indices.length);
332 332
333 var strokeMaterial = this.makeStrokeMaterial(); 333 var strokeMaterial = this.makeStrokeMaterial();
334 334
diff --git a/js/lib/geom/rectangle.js b/js/lib/geom/rectangle.js
index 81b385b3..98621a98 100755
--- a/js/lib/geom/rectangle.js
+++ b/js/lib/geom/rectangle.js
@@ -276,7 +276,7 @@ var Rectangle = function GLRectangle() {
276 if (!world._useWebGL) return; 276 if (!world._useWebGL) return;
277 277
278 // make sure RDGE has the correct context 278 // make sure RDGE has the correct context
279 g_Engine.setContext( world.getCanvas().rdgeid ); 279 RDGE.globals.engine.setContext( world.getCanvas().rdgeid );
280 280
281 // create the gl buffer 281 // create the gl buffer
282 var gl = world.getGLContext(); 282 var gl = world.getGLContext();
@@ -826,7 +826,7 @@ RectangleFill.create = function( rectCtr, width, height, tlRad, blRad, brRad,
826// } 826// }
827 827
828 // create the RDGE primitive 828 // create the RDGE primitive
829 return ShapePrimitive.create(this.vertices, this.normals, this.uvs, this.indices, g_Engine.getContext().renderer.TRIANGLES, nVertices); 829 return ShapePrimitive.create(this.vertices, this.normals, this.uvs, this.indices, RDGE.globals.engine.getContext().renderer.TRIANGLES, nVertices);
830}; 830};
831 831
832RectangleFill.pushVertex = function( x, y, z ) { 832RectangleFill.pushVertex = function( x, y, z ) {
@@ -1058,7 +1058,7 @@ RectangleStroke.create = function( rectCtr, width, height, strokeWidth, tlRad,
1058// } 1058// }
1059 1059
1060 // create the RDGE primitive 1060 // create the RDGE primitive
1061 return ShapePrimitive.create(this.vertices, this.normals, this.uvs, this.indices, g_Engine.getContext().renderer.TRIANGLES, nVertices); 1061 return ShapePrimitive.create(this.vertices, this.normals, this.uvs, this.indices, RDGE.globals.engine.getContext().renderer.TRIANGLES, nVertices);
1062}; 1062};
1063 1063
1064RectangleStroke.getRoundedCorner = function( ctr, insidePt, outsidePt ) { 1064RectangleStroke.getRoundedCorner = function( ctr, insidePt, outsidePt ) {
@@ -1144,7 +1144,7 @@ RectangleGeometry.create = function( ctr, width, height, material ) {
1144// } 1144// }
1145 1145
1146 // create the RDGE primitive 1146 // create the RDGE primitive
1147 return ShapePrimitive.create(this.vertices, this.normals, this.uvs, this.indices, g_Engine.getContext().renderer.TRIANGLES, nVertices); 1147 return ShapePrimitive.create(this.vertices, this.normals, this.uvs, this.indices, RDGE.globals.engine.getContext().renderer.TRIANGLES, nVertices);
1148}; 1148};
1149 1149
1150RectangleGeometry.pushVertex = RectangleFill.pushVertex; 1150RectangleGeometry.pushVertex = RectangleFill.pushVertex;
diff --git a/js/lib/geom/shape-primitive.js b/js/lib/geom/shape-primitive.js
index bf0087b2..97873d32 100644
--- a/js/lib/geom/shape-primitive.js
+++ b/js/lib/geom/shape-primitive.js
@@ -8,11 +8,11 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
8var ShapePrimitive = {}; 8var ShapePrimitive = {};
9 9
10ShapePrimitive.create = function(coords, normals, uvs, indices, primType, vertexCount) { 10ShapePrimitive.create = function(coords, normals, uvs, indices, primType, vertexCount) {
11 var renderer = g_Engine.getContext().renderer; 11 var renderer = RDGE.globals.engine.getContext().renderer;
12 12
13 // to setup a primitive you must define it 13 // to setup a primitive you must define it
14 // create a new primitive definition here to then fill out 14 // create a new primitive definition here to then fill out
15 var prim = new rdgePrimitiveDefinition(); 15 var prim = new RDGE.rdgePrimitiveDefinition();
16 16
17 // the vertex definition declares how the data will be delivered to the shader 17 // the vertex definition declares how the data will be delivered to the shader
18 // the position of an element in array determines which attribute in a shader the 18 // the position of an element in array determines which attribute in a shader the