|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.expr.DynamicScope
com.threerings.opengl.GlApp
public abstract class GlApp
A base class for OpenGL-based applications.
| Field Summary | |
|---|---|
protected Vector3f |
_at
Used to compute listener orientation. |
protected Quaternion |
_billboardRotation
The view rotation shared by all billboards aligned with the z axis and the view vector. |
protected CameraHandler |
_camhand
The camera handler. |
protected ConfigManager |
_cfgmgr
The configuration manager. |
protected ClipProvider |
_clipprov
The clip provider. |
protected ColorPository |
_colorpos
The color pository. |
protected boolean |
_compatibilityMode
Controls whether certain features are disabled for maximum compatibility. |
protected Compositor |
_compositor
The view compositor. |
protected MutableLong |
_epoch
A container for the application epoch. |
protected ImageCache |
_imgcache
The image cache. |
protected MessageManager |
_msgmgr
The message manager. |
protected MutableLong |
_now
A container for the current time as sampled at the beginning of the frame. |
protected boolean |
_renderEffects
Controls whether render effects are enabled. |
protected Renderer |
_renderer
The OpenGL renderer. |
protected String |
_renderScheme
The base render scheme (used to select material techniques). |
protected ResourceManager |
_rsrcmgr
The resource manager. |
protected ShaderCache |
_shadcache
The shader cache. |
protected SoundManager |
_soundmgr
The sound manager. |
protected MutableFloat |
_streamGain
A container for the global stream gain. |
protected Vector3f |
_up
Used to compute listener orientation. |
protected Transform3D |
_viewTransform
A scoped reference to the root view transform. |
protected TransformState |
_viewTransformState
A transform state containing the camera's view transform. |
protected Transform3D |
_worldTransform
A scoped reference to the root world transform. |
protected static PixelFormat[] |
PIXEL_FORMATS
Our supported pixel formats in order of preference. |
| Fields inherited from class com.threerings.expr.DynamicScope |
|---|
_compoundDepth, _listeners, _owner, _parentScope, _scopeName, _symbols, INVALID_SCOPE |
| Fields inherited from interface com.threerings.expr.Scope |
|---|
EPOCH, NOW |
| Constructor Summary | |
|---|---|
GlApp()
|
|
| Method Summary | |
|---|---|
protected void |
compositeView()
Gives the application a chance to composite anything it might want rendered. |
protected CameraHandler |
createCameraHandler()
Creates and returns the camera handler. |
abstract Root |
createRoot()
Creates a user interface root appropriate for this application. |
BufferedImage |
createSnapshot()
Creates and returns a snapshot image of the current frame. |
protected void |
didInit()
Override to perform custom initialization after the render context is valid. |
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. |
ClipProvider |
getClipProvider()
Returns a reference to the clip provider. |
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. |
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. |
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. |
SoundManager |
getSoundManager()
Returns a reference to the sound manager. |
MutableFloat |
getStreamGain()
Returns a reference to the stream gain. |
protected void |
init()
Initializes the view once the OpenGL context is available. |
protected abstract void |
initRenderer()
Initializes the renderer. |
protected void |
initSharedManagers()
Initializes the references to the resource manager, config manager, and color pository. |
protected void |
renderView()
Renders the entire view. |
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. |
protected boolean |
shouldCheckTimestamps()
Determines whether or not we should check resource file timestamps when we load them from the cache (in other words, whether we expect the files to be modified externally). |
abstract void |
shutdown()
Shuts down the application. |
abstract void |
startup()
Starts up the application. |
protected void |
updateView()
Performs any updates that are necessary even when not rendering. |
protected void |
updateView(float elapsed)
Performs any updates that are necessary even when not rendering. |
protected void |
willShutdown()
Override to perform cleanup before the application exits. |
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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.threerings.opengl.util.GlContext |
|---|
makeCurrent |
| Field Detail |
|---|
protected Renderer _renderer
protected Compositor _compositor
protected CameraHandler _camhand
protected ResourceManager _rsrcmgr
protected MessageManager _msgmgr
protected ConfigManager _cfgmgr
protected ColorPository _colorpos
protected ImageCache _imgcache
protected ShaderCache _shadcache
protected SoundManager _soundmgr
protected ClipProvider _clipprov
@Scoped protected MutableLong _now
@Scoped protected MutableLong _epoch
@Scoped protected String _renderScheme
@Scoped protected boolean _compatibilityMode
@Scoped protected boolean _renderEffects
@Scoped protected Transform3D _viewTransform
@Scoped protected Transform3D _worldTransform
@Scoped protected TransformState _viewTransformState
@Scoped protected Quaternion _billboardRotation
@Scoped protected MutableFloat _streamGain
protected Vector3f _at
protected Vector3f _up
protected static final PixelFormat[] PIXEL_FORMATS
| Constructor Detail |
|---|
public GlApp()
| Method Detail |
|---|
public abstract RunQueue getRunQueue()
public void setRenderScheme(String scheme)
public String getRenderScheme()
public void setCompatibilityMode(boolean enabled)
public boolean getCompatibilityMode()
public void setRenderEffects(boolean enabled)
public boolean getRenderEffects()
public MutableFloat getStreamGain()
public abstract Root createRoot()
public abstract void startup()
public abstract void shutdown()
public String xlate(String bundle,
String msg)
public BufferedImage createSnapshot()
public GlApp getApp()
GlContext
getApp in interface GlContextpublic DynamicScope getScope()
GlContext
getScope in interface AlContextgetScope in interface GlContextpublic ResourceManager getResourceManager()
GlContext
getResourceManager in interface EditorContextgetResourceManager in interface AlContextgetResourceManager in interface GlContextpublic ConfigManager getConfigManager()
GlContext
getConfigManager in interface EditorContextgetConfigManager in interface AlContextgetConfigManager in interface GlContextpublic SoundManager getSoundManager()
AlContext
getSoundManager in interface AlContextpublic ClipProvider getClipProvider()
AlContext
getClipProvider in interface AlContextpublic void setRenderer(Renderer renderer)
GlContext
setRenderer in interface GlContextpublic Renderer getRenderer()
GlContext
getRenderer in interface GlContextpublic Compositor getCompositor()
GlContext
getCompositor in interface GlContextpublic void setCameraHandler(CameraHandler camhand)
GlContext
setCameraHandler in interface GlContextpublic CameraHandler getCameraHandler()
GlContext
getCameraHandler in interface GlContextpublic MessageManager getMessageManager()
GlContext
getMessageManager in interface EditorContextgetMessageManager in interface GlContextpublic ColorPository getColorPository()
GlContext
getColorPository in interface EditorContextgetColorPository in interface GlContextpublic ImageCache getImageCache()
GlContext
getImageCache in interface GlContextpublic ShaderCache getShaderCache()
GlContext
getShaderCache in interface GlContextpublic void enqueue()
Enqueueable
enqueue in interface Enqueueableprotected void initSharedManagers()
protected boolean shouldCheckTimestamps()
protected void init()
protected abstract void initRenderer()
protected CameraHandler createCameraHandler()
protected void didInit()
protected void willShutdown()
protected void updateView()
protected void updateView(float elapsed)
elapsed - the elapsed time since the last update, in seconds.protected void renderView()
protected void compositeView()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||