Interface Renderer
-
- All Known Implementing Classes:
AbstractRenderer,GDXRenderer,HeadlessRenderer,Java2DRenderer,TeaRenderer
public interface RendererRenders audiovisual data to that can be used to display multimedia applications. ARendererinstance acts as the access point for platform resources such as graphics, sound, and input devices.When started, the renderer will create the display system and then start the animation loop. Frame updates will be scheduled to match the desired framerate, although this might not be possible depending on the current platform and the amount and complexity of graphics that are drawn.
All interaction with the renderer should be done from callbacks that are called during the animation loop. The
Sceneinterface splits the application into different phases.The renderer has two concepts of display size: the screen and the canvas. The screen is the entire available drawing surface, excluding any title and status bars and borders. The screen size can change, for example when the window is resized or when the device changes orientation. The canvas is the drawing area that the game uses. Transitioning between these two sets of coordinates is handled by the
Canvas.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddRenderCallback(Renderable callback)voidaddUpdateCallback(Updatable callback)ApplicationDatagetApplicationData(java.lang.String appName)CanvasgetCanvas()InputDevicegetInputDevice()InternetAccessgetInternetAccess()MediaLoadergetMediaLoader()nl.colorize.util.PlatformFamilygetPlatform()java.lang.StringtakeScreenshot()Takes a screenshots of the renderer's current graphics, and saves it to an image.
-
-
-
Method Detail
-
getCanvas
Canvas getCanvas()
-
getInputDevice
InputDevice getInputDevice()
-
getMediaLoader
MediaLoader getMediaLoader()
-
getApplicationData
ApplicationData getApplicationData(java.lang.String appName)
-
getInternetAccess
InternetAccess getInternetAccess()
-
addUpdateCallback
void addUpdateCallback(Updatable callback)
-
addRenderCallback
void addRenderCallback(Renderable callback)
-
takeScreenshot
java.lang.String takeScreenshot()
Takes a screenshots of the renderer's current graphics, and saves it to an image. The image is returned as a data URL for a PNG image.
-
getPlatform
nl.colorize.util.PlatformFamily getPlatform()
-
-