public void dispose(JoGLDrawingTools drawingTools, Renderer renderer) { if ((renderer != null) && (renderer instanceof JoGLRenderer)) { JoGLRenderer localRenderer = (JoGLRenderer) renderer; localRenderer.dispose(drawingTools.getGl().getGL2()); rendererSet.remove(localRenderer); deadRendererSet.push(localRenderer); } }
/** * Ask all {@link JoGLRenderer} to reload. This is needed when the OpenGl context has been lost. */ public void glReload() { for (JoGLRenderer renderer : rendererSet) { renderer.reload(); } }
/** * Perform a draw with the given renderer to the given canvas.. * * @param drawingTools the given drawing tools. * @param renderer the given renderer. */ public void draw(JoGLDrawingTools drawingTools, Renderer renderer) { if ((renderer != null) && (renderer instanceof JoGLRenderer)) { ((JoGLRenderer) renderer).draw(drawingTools); } }