public class Statistics
extends java.lang.Object
The Statistics
can be retrieved by using Renderer.getStatistics()
.
Modifier and Type | Field and Description |
---|---|
protected boolean |
enabled |
protected IntMap<java.lang.Void> |
fbosUsed |
protected int |
lastShader |
protected int |
memoryFrameBuffers |
protected int |
memoryShaders |
protected int |
memoryTextures |
protected int |
numFboSwitches |
protected int |
numObjects |
protected int |
numShaderSwitches |
protected int |
numTextureBinds |
protected int |
numTriangles |
protected int |
numUniformsSet |
protected int |
numVertices |
protected IntMap<java.lang.Void> |
shadersUsed |
protected IntMap<java.lang.Void> |
texturesUsed |
Constructor and Description |
---|
Statistics() |
Modifier and Type | Method and Description |
---|---|
void |
clearFrame()
Clears all frame-specific statistics such as objects used per frame.
|
void |
clearMemory()
Called when video memory is cleared.
|
void |
getData(int[] data)
Retrieves the statistics data into the given array.
|
java.lang.String[] |
getLabels()
Returns a list of labels corresponding to each statistic.
|
boolean |
isEnabled() |
void |
onDeleteFrameBuffer()
Called by the Renderer when it deletes a framebuffer
|
void |
onDeleteShader()
Called by the Renderer when it deletes a shader
|
void |
onDeleteTexture()
Called by the Renderer when it deletes a texture
|
void |
onFrameBufferUse(FrameBuffer fb,
boolean wasSwitched)
Called by the Renderer when a framebuffer has been set.
|
void |
onMeshDrawn(Mesh mesh,
int lod)
Called by the Renderer when a mesh has been drawn.
|
void |
onMeshDrawn(Mesh mesh,
int lod,
int count)
Called by the Renderer when a mesh has been drawn.
|
void |
onNewFrameBuffer()
Called by the Renderer when it creates a new framebuffer
|
void |
onNewShader()
Called by the Renderer when it creates a new shader
|
void |
onNewTexture()
Called by the Renderer when it creates a new texture
|
void |
onShaderUse(Shader shader,
boolean wasSwitched)
Called by the Renderer when a shader has been utilized.
|
void |
onTextureUse(Image image,
boolean wasSwitched)
Called by the Renderer when a texture has been set.
|
void |
onUniformSet()
Called by the Renderer when a uniform was set.
|
void |
setEnabled(boolean f) |
protected boolean enabled
protected int numObjects
protected int numTriangles
protected int numVertices
protected int numShaderSwitches
protected int numTextureBinds
protected int numFboSwitches
protected int numUniformsSet
protected int memoryShaders
protected int memoryFrameBuffers
protected int memoryTextures
protected IntMap<java.lang.Void> shadersUsed
protected IntMap<java.lang.Void> texturesUsed
protected IntMap<java.lang.Void> fbosUsed
protected int lastShader
public java.lang.String[] getLabels()
getData(int[])
public void getData(int[] data)
getLabels()
.data
- The data array to write topublic void onMeshDrawn(Mesh mesh, int lod, int count)
public void onMeshDrawn(Mesh mesh, int lod)
public void onShaderUse(Shader shader, boolean wasSwitched)
shader
- The shader that was usedwasSwitched
- If true, the shader has required a state switchpublic void onUniformSet()
public void onTextureUse(Image image, boolean wasSwitched)
image
- The image that was setwasSwitched
- If true, the texture has required a state switchpublic void onFrameBufferUse(FrameBuffer fb, boolean wasSwitched)
fb
- The framebuffer that was setwasSwitched
- If true, the framebuffer required a state switchpublic void clearFrame()
public void onNewShader()
public void onNewTexture()
public void onNewFrameBuffer()
public void onDeleteShader()
public void onDeleteTexture()
public void onDeleteFrameBuffer()
public void clearMemory()
public void setEnabled(boolean f)
public boolean isEnabled()