aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/RDGE/GLCircle.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-02-09 10:09:13 -0800
committerNivesh Rajbhandari2012-02-09 10:09:13 -0800
commit191cb96b3b4e1e5aa805211e5ab8dbd6aa075881 (patch)
treedb6ebd5061c482110ae21f9898ff26d5c6fd7f7b /js/helper-classes/RDGE/GLCircle.js
parent64524c693e09646a0db05d772311247a56194ac9 (diff)
downloadninja-191cb96b3b4e1e5aa805211e5ab8dbd6aa075881.tar.gz
Merging WebGL changes that allow users to modify different shape instances. Also, merging in changes that improve rendering performance by not updating static materials.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/helper-classes/RDGE/GLCircle.js')
-rw-r--r--js/helper-classes/RDGE/GLCircle.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/js/helper-classes/RDGE/GLCircle.js b/js/helper-classes/RDGE/GLCircle.js
index e6bcba89..08057778 100644
--- a/js/helper-classes/RDGE/GLCircle.js
+++ b/js/helper-classes/RDGE/GLCircle.js
@@ -55,14 +55,16 @@ function GLCircle()
55 55
56 this.m_world = world; 56 this.m_world = world;
57 57
58
58 if(strokeMaterial) 59 if(strokeMaterial)
59 {
60 this._strokeMaterial = strokeMaterial; 60 this._strokeMaterial = strokeMaterial;
61 } 61 else
62 this._strokeMaterial = new FlatMaterial();
63
62 if(fillMaterial) 64 if(fillMaterial)
63 {
64 this._fillMaterial = fillMaterial; 65 this._fillMaterial = fillMaterial;
65 } 66 else
67 this._fillMaterial = new FlatMaterial();
66 } 68 }
67 69
68 /////////////////////////////////////////////////////////////////////// 70 ///////////////////////////////////////////////////////////////////////
@@ -131,6 +133,9 @@ function GLCircle()
131 if (!world) throw( "null world in buildBuffers" ); 133 if (!world) throw( "null world in buildBuffers" );
132 134
133 if (!world._useWebGL) return; 135 if (!world._useWebGL) return;
136
137 // make sure RDGE has the correct context
138 g_Engine.setContext( world.getCanvas().uuid );
134 139
135 // create the gl buffer 140 // create the gl buffer
136 var gl = world.getGLContext(); 141 var gl = world.getGLContext();