From 064d74fb2694318615f513c83772276cec34bb86 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Wed, 8 Feb 2012 13:41:52 -0800 Subject: Fixed context switching problems in rdge --- js/helper-classes/RDGE/GLRectangle.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'js/helper-classes/RDGE/GLRectangle.js') 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() // get the world var world = this.getWorld(); if (!world) throw( "null world in buildBuffers" ); - + //console.log( "GLRectangle.buildBuffers " + world._worldCount ); if (!world._useWebGL) return; + + // make sure RDGE has the correct context + g_Engine.setContext( world.getCanvas().uuid ); // create the gl buffer var gl = world.getGLContext(); @@ -284,6 +287,7 @@ function GLRectangle() xFill -= strokeSize; yFill -= strokeSize; var fillMaterial = this.makeFillMaterial(); + //console.log( "fillMaterial: " + fillMaterial.getName() ); var fillPrim = this.createFill([x,y], 2*xFill, 2*yFill, tlRadius, blRadius, brRadius, trRadius, fillMaterial); this._primArray.push( fillPrim ); this._materialNodeArray.push( fillMaterial.getMaterialNode() ); -- cgit v1.2.3