diff options
Diffstat (limited to 'js/helper-classes/RDGE/GLRectangle.js')
-rw-r--r-- | js/helper-classes/RDGE/GLRectangle.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/helper-classes/RDGE/GLRectangle.js b/js/helper-classes/RDGE/GLRectangle.js index f6f5a899..595a5b48 100644 --- a/js/helper-classes/RDGE/GLRectangle.js +++ b/js/helper-classes/RDGE/GLRectangle.js | |||
@@ -210,8 +210,11 @@ function GLRectangle() | |||
210 | // get the world | 210 | // get the world |
211 | var world = this.getWorld(); | 211 | var world = this.getWorld(); |
212 | if (!world) throw( "null world in buildBuffers" ); | 212 | if (!world) throw( "null world in buildBuffers" ); |
213 | 213 | //console.log( "GLRectangle.buildBuffers " + world._worldCount ); | |
214 | if (!world._useWebGL) return; | 214 | if (!world._useWebGL) return; |
215 | |||
216 | // make sure RDGE has the correct context | ||
217 | g_Engine.setContext( world.getCanvas().uuid ); | ||
215 | 218 | ||
216 | // create the gl buffer | 219 | // create the gl buffer |
217 | var gl = world.getGLContext(); | 220 | var gl = world.getGLContext(); |
@@ -284,6 +287,7 @@ function GLRectangle() | |||
284 | xFill -= strokeSize; | 287 | xFill -= strokeSize; |
285 | yFill -= strokeSize; | 288 | yFill -= strokeSize; |
286 | var fillMaterial = this.makeFillMaterial(); | 289 | var fillMaterial = this.makeFillMaterial(); |
290 | //console.log( "fillMaterial: " + fillMaterial.getName() ); | ||
287 | var fillPrim = this.createFill([x,y], 2*xFill, 2*yFill, tlRadius, blRadius, brRadius, trRadius, fillMaterial); | 291 | var fillPrim = this.createFill([x,y], 2*xFill, 2*yFill, tlRadius, blRadius, brRadius, trRadius, fillMaterial); |
288 | this._primArray.push( fillPrim ); | 292 | this._primArray.push( fillPrim ); |
289 | this._materialNodeArray.push( fillMaterial.getMaterialNode() ); | 293 | this._materialNodeArray.push( fillMaterial.getMaterialNode() ); |