Interface CanvasRenderer

All Known Implementing Classes:
JoglCanvasRenderer

public interface CanvasRenderer
Represents a class that knows how to render a scene using a specific Open GL implementation.
  • Method Details

    • init

      void init(DisplaySettings settings, boolean doSwap)
    • draw

      boolean draw()
      Draw the current state of the scene.
      Returns:
      true if it has been drawn
    • getCamera

      Camera getCamera()
      Returns the camera being used by this canvas renderer. Modifying the returned Camera instance effects the view being rendered, so this method can be used to move the camera, etc.
      Returns:
      the camera used by this canvas renderer
    • setCamera

      void setCamera(Camera camera)
      Replaces the camera being used by this canvas renderer.
      Parameters:
      camera - the camera to use
    • getScene

      Scene getScene()
      Returns the scene being used by this canvas renderer.
      Returns:
      the camera used by this canvas renderer
    • setScene

      void setScene(Scene scene)
      Replaces the scene being used by this canvas renderer.
      Parameters:
      scene - the scene to use
    • createRenderer

      Renderer createRenderer()
      Creates a new renderer for this canvas renderer
      Returns:
      a new renderer
    • getRenderer

      Renderer getRenderer()
      Returns the renderer being used by this canvas renderer.
      Returns:
      the renderer used by this canvas renderer
    • makeCurrentContext

      void makeCurrentContext() throws Ardor3dException
      Have the CanvasRenderer claim the graphics context.
      Throws:
      Ardor3dException - if we can not claim the context.
    • releaseCurrentContext

      void releaseCurrentContext()
      Have the CanvasRenderer release the graphics context.
    • getRenderContext

      RenderContext getRenderContext()
      Returns:
      the Ardor3D RenderContext associated with this CanvasRenderer.
    • getFrameClear

      int getFrameClear()
      Returns:
      an int representing the buffers to clear at the start of each frame. Default is Renderer.BUFFER_COLOR_AND_DEPTH
    • setFrameClear

      void setFrameClear(int buffers)
      Parameters:
      buffers - an int representing the buffers to clear at the start of each frame. Default is Renderer.BUFFER_COLOR_AND_DEPTH