com.threerings.opengl.util
Class Stats

java.lang.Object
  extended by com.threerings.opengl.util.SimpleRenderable
      extended by com.threerings.opengl.util.SimpleOverlay
          extended by com.threerings.opengl.util.Stats
All Implemented Interfaces:
Compositable, Enqueueable

public class Stats
extends SimpleOverlay

Displays rendering statistics.


Field Summary
protected  int _frameCount
          The number of frames rendered since the last update.
protected  long _lastUpdate
          The time at which we last updated the stats.
protected  Text _stats
          The stats display text.
protected  CharacterTextFactory _textFactory
          Used to create text objects.
protected static long REPORT_INTERVAL
          The interval at which we update the stats.
 
Fields inherited from class com.threerings.opengl.util.SimpleRenderable
_batch, _ctx, _priority, _queue
 
Constructor Summary
Stats(GlContext ctx)
          Creates a new stats display.
 
Method Summary
 void composite()
          Adds this object's Dependencys and Enqueueables to the compositor in preparation for rendering.
protected  void draw()
          Draws the geometry in immediate mode.
protected  int getY()
          Returns the y coordinate at which to render the stats.
 
Methods inherited from class com.threerings.opengl.util.SimpleOverlay
createStates
 
Methods inherited from class com.threerings.opengl.util.SimpleRenderable
createBatch, enqueue, getStates
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_textFactory

protected CharacterTextFactory _textFactory
Used to create text objects.


_stats

protected Text _stats
The stats display text.


_lastUpdate

protected long _lastUpdate
The time at which we last updated the stats.


_frameCount

protected int _frameCount
The number of frames rendered since the last update.


REPORT_INTERVAL

protected static final long REPORT_INTERVAL
The interval at which we update the stats.

See Also:
Constant Field Values
Constructor Detail

Stats

public Stats(GlContext ctx)
Creates a new stats display.

Method Detail

composite

public void composite()
Description copied from interface: Compositable
Adds this object's Dependencys and Enqueueables to the compositor in preparation for rendering.

Specified by:
composite in interface Compositable
Overrides:
composite in class SimpleOverlay

draw

protected void draw()
Description copied from class: SimpleRenderable
Draws the geometry in immediate mode.

Overrides:
draw in class SimpleRenderable

getY

protected int getY()
Returns the y coordinate at which to render the stats.