com.threerings.opengl
Class GlApp

java.lang.Object
  extended by com.threerings.expr.DynamicScope
      extended by com.threerings.opengl.GlApp
All Implemented Interfaces:
EditorContext, Scope, ScopeUpdateListener, AlContext, Enqueueable, GlContext
Direct Known Subclasses:
GlCanvasApp, GlDisplayApp

public abstract class GlApp
extends DynamicScope
implements GlContext, EditorContext, Enqueueable

A base class for OpenGL-based applications.


Field Summary
 
Fields inherited from interface com.threerings.expr.Scope
EPOCH, NOW
 
Constructor Summary
GlApp()
           
 
Method Summary
abstract  Root createRoot()
          Creates a user interface root appropriate for this application.
 BufferedImage createSnapshot()
          Creates and returns a snapshot image of the current frame.
 void enqueue()
          Enqueues this object for rendering.
 GlApp getApp()
          Returns a reference to the application object.
 CameraHandler getCameraHandler()
          Returns a reference to the camera handler.
 com.threerings.openal.ClipProvider getClipProvider()
          Returns a reference to the clip provider.
 com.threerings.media.image.ColorPository getColorPository()
          Returns a reference to the color pository.
 boolean getCompatibilityMode()
          Checks whether compatibility mode is enabled.
 Compositor getCompositor()
          Returns a reference to the compositor.
 ConfigManager getConfigManager()
          Returns a reference to the configuration manager.
 ImageCache getImageCache()
          Returns a reference to the image cache.
 com.threerings.util.MessageManager getMessageManager()
          Returns a reference to the message manager.
 boolean getRenderEffects()
          Checks whether render effects are enabled.
 Renderer getRenderer()
          Returns a reference to the renderer.
 String getRenderScheme()
          Returns the name of the configured render scheme.
 com.threerings.resource.ResourceManager getResourceManager()
          Returns a reference to the resource manager.
abstract  RunQueue getRunQueue()
          Returns a reference to the application's run queue.
 DynamicScope getScope()
          Returns a reference to the scope.
 ShaderCache getShaderCache()
          Returns a reference to the shader cache.
 com.threerings.openal.SoundManager getSoundManager()
          Returns a reference to the sound manager.
 MutableFloat getStreamGain()
          Returns a reference to the stream gain.
 void setCameraHandler(CameraHandler camhand)
          Sets the camera handler reference.
 void setCompatibilityMode(boolean enabled)
          Enables or disables compatibility mode, which disables certain features for maximum compatibility.
 void setRenderEffects(boolean enabled)
          Enables or disables render effects.
 void setRenderer(Renderer renderer)
          Sets the renderer reference.
 void setRenderScheme(String scheme)
          Sets the render scheme.
abstract  void shutdown()
          Shuts down the application.
abstract  void startup()
          Starts up the application.
 String xlate(String bundle, String msg)
          Convenience method for translation.
 
Methods inherited from class com.threerings.expr.DynamicScope
addListener, dispose, endCompoundUpdate, get, getParentScope, getScopeName, put, remove, removeListener, scopeUpdated, setParentScope, startCompoundUpdate, wasUpdated
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.threerings.opengl.util.GlContext
makeCurrent
 

Constructor Detail

GlApp

public GlApp()
Method Detail

getRunQueue

public abstract RunQueue getRunQueue()
Returns a reference to the application's run queue.


setRenderScheme

public void setRenderScheme(String scheme)
Sets the render scheme.


getRenderScheme

public String getRenderScheme()
Returns the name of the configured render scheme.


setCompatibilityMode

public void setCompatibilityMode(boolean enabled)
Enables or disables compatibility mode, which disables certain features for maximum compatibility.


getCompatibilityMode

public boolean getCompatibilityMode()
Checks whether compatibility mode is enabled.


setRenderEffects

public void setRenderEffects(boolean enabled)
Enables or disables render effects.


getRenderEffects

public boolean getRenderEffects()
Checks whether render effects are enabled.


getStreamGain

public MutableFloat getStreamGain()
Returns a reference to the stream gain.


createRoot

public abstract Root createRoot()
Creates a user interface root appropriate for this application.


startup

public abstract void startup()
Starts up the application.


shutdown

public abstract void shutdown()
Shuts down the application.


xlate

public String xlate(String bundle,
                    String msg)
Convenience method for translation.


createSnapshot

public BufferedImage createSnapshot()
Creates and returns a snapshot image of the current frame.


getApp

public GlApp getApp()
Description copied from interface: GlContext
Returns a reference to the application object.

Specified by:
getApp in interface GlContext

getScope

public DynamicScope getScope()
Description copied from interface: GlContext
Returns a reference to the scope.

Specified by:
getScope in interface AlContext
Specified by:
getScope in interface GlContext

getResourceManager

public com.threerings.resource.ResourceManager getResourceManager()
Description copied from interface: GlContext
Returns a reference to the resource manager.

Specified by:
getResourceManager in interface EditorContext
Specified by:
getResourceManager in interface AlContext
Specified by:
getResourceManager in interface GlContext

getConfigManager

public ConfigManager getConfigManager()
Description copied from interface: GlContext
Returns a reference to the configuration manager.

Specified by:
getConfigManager in interface EditorContext
Specified by:
getConfigManager in interface AlContext
Specified by:
getConfigManager in interface GlContext

getSoundManager

public com.threerings.openal.SoundManager getSoundManager()
Description copied from interface: AlContext
Returns a reference to the sound manager.

Specified by:
getSoundManager in interface AlContext

getClipProvider

public com.threerings.openal.ClipProvider getClipProvider()
Description copied from interface: AlContext
Returns a reference to the clip provider.

Specified by:
getClipProvider in interface AlContext

setRenderer

public void setRenderer(Renderer renderer)
Description copied from interface: GlContext
Sets the renderer reference.

Specified by:
setRenderer in interface GlContext

getRenderer

public Renderer getRenderer()
Description copied from interface: GlContext
Returns a reference to the renderer.

Specified by:
getRenderer in interface GlContext

getCompositor

public Compositor getCompositor()
Description copied from interface: GlContext
Returns a reference to the compositor.

Specified by:
getCompositor in interface GlContext

setCameraHandler

public void setCameraHandler(CameraHandler camhand)
Description copied from interface: GlContext
Sets the camera handler reference.

Specified by:
setCameraHandler in interface GlContext

getCameraHandler

public CameraHandler getCameraHandler()
Description copied from interface: GlContext
Returns a reference to the camera handler.

Specified by:
getCameraHandler in interface GlContext

getMessageManager

public com.threerings.util.MessageManager getMessageManager()
Description copied from interface: GlContext
Returns a reference to the message manager.

Specified by:
getMessageManager in interface EditorContext
Specified by:
getMessageManager in interface GlContext

getColorPository

public com.threerings.media.image.ColorPository getColorPository()
Description copied from interface: GlContext
Returns a reference to the color pository.

Specified by:
getColorPository in interface EditorContext
Specified by:
getColorPository in interface GlContext

getImageCache

public ImageCache getImageCache()
Description copied from interface: GlContext
Returns a reference to the image cache.

Specified by:
getImageCache in interface GlContext

getShaderCache

public ShaderCache getShaderCache()
Description copied from interface: GlContext
Returns a reference to the shader cache.

Specified by:
getShaderCache in interface GlContext

enqueue

public void enqueue()
Description copied from interface: Enqueueable
Enqueues this object for rendering.

Specified by:
enqueue in interface Enqueueable


Copyright © 2011. All Rights Reserved.