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 d48bf98b..e8c94b64 100755
--- a/js/lib/geom/circle.js
+++ b/js/lib/geom/circle.js
@@ -178,7 +178,7 @@ var Circle = function GLCircle() {
178 if (!world._useWebGL) return; 178 if (!world._useWebGL) return;
179 179
180 // make sure RDGE has the correct context 180 // make sure RDGE has the correct context
181 g_Engine.setContext( world.getCanvas().rdgeid ); 181 RDGE.globals.engine.setContext( world.getCanvas().rdgeid );
182 182
183 // create the gl buffer 183 // create the gl buffer
184 var gl = world.getGLContext(); 184 var gl = world.getGLContext();
@@ -350,7 +350,7 @@ var Circle = function GLCircle() {
350 350
351 this.recalcTexMapCoords( vrts, uvs ); 351 this.recalcTexMapCoords( vrts, uvs );
352 352
353 return ShapePrimitive.create(vrts, nrms, uvs, indices, g_Engine.getContext().renderer.TRIANGLES, index); 353 return ShapePrimitive.create(vrts, nrms, uvs, indices, RDGE.globals.engine.getContext().renderer.TRIANGLES, index);
354 }; 354 };
355 355
356 this.generateOvalRing = function(xOff, yOff, rotationMat, innerScaleMat, outerScaleMat, nTriangles) { 356 this.generateOvalRing = function(xOff, yOff, rotationMat, innerScaleMat, outerScaleMat, nTriangles) {
@@ -407,7 +407,7 @@ var Circle = function GLCircle() {
407 407
408 this.recalcTexMapCoords( vrts, uvs ); 408 this.recalcTexMapCoords( vrts, uvs );
409 409
410 return ShapePrimitive.create(vrts, nrms, uvs, indices, g_Engine.getContext().renderer.TRIANGLE_STRIP, indices.length); 410 return ShapePrimitive.create(vrts, nrms, uvs, indices, RDGE.globals.engine.getContext().renderer.TRIANGLE_STRIP, indices.length);
411 }; 411 };
412 412
413 this.render = function() { 413 this.render = function() {
diff --git a/js/lib/geom/line.js b/js/lib/geom/line.js
index e839e229..1af02bcd 100755
--- a/js/lib/geom/line.js
+++ b/js/lib/geom/line.js
@@ -220,7 +220,7 @@ var Line = function GLLine( world, xOffset, yOffset, width, height, slope, strok
220 if (!world._useWebGL) return; 220 if (!world._useWebGL) return;
221 221
222 // make sure RDGE has the correct context 222 // make sure RDGE has the correct context
223 g_Engine.setContext( world.getCanvas().rdgeid ); 223 RDGE.globals.engine.setContext( world.getCanvas().rdgeid );
224 224
225 // create the gl buffer 225 // create the gl buffer
226 var gl = world.getGLContext(); 226 var gl = world.getGLContext();
@@ -381,7 +381,7 @@ var Line = function GLLine( world, xOffset, yOffset, width, height, slope, strok
381 indices.push( index ); index++; 381 indices.push( index ); index++;
382 } 382 }
383 383
384 var prim = ShapePrimitive.create(strokeVertices, strokeNormals, strokeTextures, indices, g_Engine.getContext().renderer.TRIANGLES, indices.length); 384 var prim = ShapePrimitive.create(strokeVertices, strokeNormals, strokeTextures, indices, RDGE.globals.engine.getContext().renderer.TRIANGLES, indices.length);
385 385
386 var strokeMaterial = this.makeStrokeMaterial(); 386 var strokeMaterial = this.makeStrokeMaterial();
387 387
diff --git a/js/lib/geom/rectangle.js b/js/lib/geom/rectangle.js
index e511d5f4..46876ba7 100755
--- a/js/lib/geom/rectangle.js
+++ b/js/lib/geom/rectangle.js
@@ -352,7 +352,7 @@ var Rectangle = function GLRectangle() {
352 if (!world._useWebGL) return; 352 if (!world._useWebGL) return;
353 353
354 // make sure RDGE has the correct context 354 // make sure RDGE has the correct context
355 g_Engine.setContext( world.getCanvas().rdgeid ); 355 RDGE.globals.engine.setContext( world.getCanvas().rdgeid );
356 356
357 // create the gl buffer 357 // create the gl buffer
358 var gl = world.getGLContext(); 358 var gl = world.getGLContext();
@@ -952,7 +952,7 @@ RectangleFill.create = function( rectCtr, width, height, tlRad, blRad, brRad,
952// } 952// }
953 953
954 // create the RDGE primitive 954 // create the RDGE primitive
955 return ShapePrimitive.create(this.vertices, this.normals, this.uvs, this.indices, g_Engine.getContext().renderer.TRIANGLES, nVertices); 955 return ShapePrimitive.create(this.vertices, this.normals, this.uvs, this.indices, RDGE.globals.engine.getContext().renderer.TRIANGLES, nVertices);
956}; 956};
957 957
958RectangleFill.pushVertex = function( x, y, z ) { 958RectangleFill.pushVertex = function( x, y, z ) {
@@ -1184,7 +1184,7 @@ RectangleStroke.create = function( rectCtr, width, height, strokeWidth, tlRad,
1184// } 1184// }
1185 1185
1186 // create the RDGE primitive 1186 // create the RDGE primitive
1187 return ShapePrimitive.create(this.vertices, this.normals, this.uvs, this.indices, g_Engine.getContext().renderer.TRIANGLES, nVertices); 1187 return ShapePrimitive.create(this.vertices, this.normals, this.uvs, this.indices, RDGE.globals.engine.getContext().renderer.TRIANGLES, nVertices);
1188}; 1188};
1189 1189
1190RectangleStroke.getRoundedCorner = function( ctr, insidePt, outsidePt ) { 1190RectangleStroke.getRoundedCorner = function( ctr, insidePt, outsidePt ) {
@@ -1270,7 +1270,7 @@ RectangleGeometry.create = function( ctr, width, height, material ) {
1270// } 1270// }
1271 1271
1272 // create the RDGE primitive 1272 // create the RDGE primitive
1273 return ShapePrimitive.create(this.vertices, this.normals, this.uvs, this.indices, g_Engine.getContext().renderer.TRIANGLES, nVertices); 1273 return ShapePrimitive.create(this.vertices, this.normals, this.uvs, this.indices, RDGE.globals.engine.getContext().renderer.TRIANGLES, nVertices);
1274}; 1274};
1275 1275
1276RectangleGeometry.pushVertex = RectangleFill.pushVertex; 1276RectangleGeometry.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