 			if (stage.stageHeight)
 				height = stage.stageHeight;
 			
-			resetContext3D();
+			resetStage3D();
 		}
 		
 		private function contextCreatedHandler(event : Event) : void
 		{
-			_context = stage.stage3Ds[0].context3D;
-			resetContext3D();
-		}
-		
-		private function resetContext3D(event : Event = null) : void
-		{
-			if (_context)
+			_stage3d = stage.stage3Ds[0];
+			
+			resetStage3D();
+		}
+		
+		private function resetStage3D(event : Event = null) : void
+		{
+			if (_stage3d)
 			{
 				updateRectangle();
-				_context.configureBackBuffer(_width, _height, _aa, true);
-				
-				_renderer = new DirectRenderer(this, _context);
+				_stage3d.context3D.configureBackBuffer(_width, _height, _aa, true);
+				
+				_renderer = new DirectRenderer(this, _stage3d.context3D);
 				
 				_wdExtracterQuery = new WorldDataExtracterVisitor();
 				_renderingQuery = new RenderingVisitor(_renderer);

				_height = value;
				++_version;
				
				resetContext3D();
			}
		}
		

			}
			
			showLogo();
		}
		
		private function addedHandler(event : Event) : void
		{
			updateRectangle();
		}
		
		private function stageResizeHandler(event : Event) : void
