Package com.ardor3d.framework
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 Summary
Modifier and TypeMethodDescriptionCreates a new renderer for this canvas rendererboolean
draw()
Draw the current state of the scene.Returns the camera being used by this canvas renderer.int
Returns the renderer being used by this canvas renderer.getScene()
Returns the scene being used by this canvas renderer.void
init
(DisplaySettings settings, boolean doSwap) void
Have the CanvasRenderer claim the graphics context.void
Have the CanvasRenderer release the graphics context.void
Replaces the camera being used by this canvas renderer.void
setFrameClear
(int buffers) void
Replaces the scene being used by this canvas renderer.
-
Method Details
-
init
-
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 returnedCamera
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
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
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
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
-