aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/RDGE/GLCircle.js
diff options
context:
space:
mode:
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();