예제 #1
0
 /** Prepare the picking graphics context for picking */
 public void render() {
   // set up for rendering the pick buffer
   renderer.pushDelegate(picking_context);
   renderer.beginDraw();
   renderer.clear();
   renderer.ortho();
   // render the pick buffer
   SMT.getRootZone().invokePickDraw();
   renderer.endDraw();
   renderer.flush();
   // If fast picking disabled, use loadPixels() which is really slow (max 70 fps on a high end
   // card vs 200+ fps with readPixels) as a backup.
   PGL pgl = renderer.beginPGL();
   if (!SMT.fastPickingEnabled() || pgl == null) renderer.loadPixels();
   renderer.endPGL();
   renderer.popDelegate();
 }