Package com.jme3.renderer
Class Statistics
java.lang.Object
com.jme3.renderer.Statistics
Allows tracking of real-time rendering statistics.
 
The Statistics can be retrieved by using Renderer.getStatistics().
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected booleanEnables or disables updates.IDs of all FBOs in use.protected intID of the most recently used shader.protected intNumber of active frame buffers.protected intNumber of active shaders.protected intNumber of active textures.protected intNumber of FBO switches during the current frame.protected intNumber of object used during the current frame.protected intNumber of shader switches during the current frame.protected intNumber of texture binds during the current frame.protected intNumber of mesh primitives rendered during the current frame.protected intNumber of uniforms set during the current frame.protected intNumber of mesh vertices rendered during the current frame.IDs of all shaders in use.IDs of all textures in use.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidClears all frame-specific statistics such as objects used per frame.voidCalled when video memory is cleared.voidgetData(int[] data) Retrieves the statistics data into the given array.String[]Returns a list of labels corresponding to each statistic.booleanTests whether updates are enabled.voidCalled by the Renderer when it deletes a framebuffer.voidCalled by the Renderer when it deletes a shader.voidCalled by the Renderer when it deletes a texture.voidonFrameBufferUse(FrameBuffer fb, boolean wasSwitched) Called by the Renderer when a framebuffer has been set.voidonMeshDrawn(Mesh mesh, int lod) Called by the Renderer when a mesh has been drawn.voidonMeshDrawn(Mesh mesh, int lod, int count) Called by the Renderer when a mesh has been drawn.voidCalled by the Renderer when it creates a new framebuffer.voidCalled by the Renderer when it creates a new shader.voidCalled by the Renderer when it creates a new texture.voidonShaderUse(Shader shader, boolean wasSwitched) Called by the Renderer when a shader has been utilized.voidonTextureUse(Image image, boolean wasSwitched) Called by the Renderer when a texture has been set.voidCalled by the Renderer when a uniform was set.voidsetEnabled(boolean f) Enables or disables updates.
- 
Field Details- 
enabledprotected boolean enabledEnables or disables updates.
- 
numObjectsprotected int numObjectsNumber of object used during the current frame.
- 
numTrianglesprotected int numTrianglesNumber of mesh primitives rendered during the current frame.
- 
numVerticesprotected int numVerticesNumber of mesh vertices rendered during the current frame.
- 
numShaderSwitchesprotected int numShaderSwitchesNumber of shader switches during the current frame.
- 
numTextureBindsprotected int numTextureBindsNumber of texture binds during the current frame.
- 
numFboSwitchesprotected int numFboSwitchesNumber of FBO switches during the current frame.
- 
numUniformsSetprotected int numUniformsSetNumber of uniforms set during the current frame.
- 
memoryShadersprotected int memoryShadersNumber of active shaders.
- 
memoryFrameBuffersprotected int memoryFrameBuffersNumber of active frame buffers.
- 
memoryTexturesprotected int memoryTexturesNumber of active textures.
- 
shadersUsedIDs of all shaders in use.
- 
texturesUsedIDs of all textures in use.
- 
fbosUsedIDs of all FBOs in use.
- 
lastShaderprotected int lastShaderID of the most recently used shader.
 
- 
- 
Constructor Details- 
Statisticspublic Statistics()
 
- 
- 
Method Details- 
getLabelsReturns a list of labels corresponding to each statistic.- Returns:
- a list of labels corresponding to each statistic.
- See Also:
 
- 
getDatapublic void getData(int[] data) Retrieves the statistics data into the given array. The array should be as large as the array given ingetLabels().- Parameters:
- data- The data array to write to
 
- 
onMeshDrawnCalled by the Renderer when a mesh has been drawn.- Parameters:
- mesh- the Mesh that was drawn (not null)
- lod- which level of detail
- count- multiplier for triangles and vertices
 
- 
onMeshDrawnCalled by the Renderer when a mesh has been drawn.- Parameters:
- mesh- the Mesh that was drawn (not null)
- lod- which level of detail
 
- 
onShaderUseCalled by the Renderer when a shader has been utilized.- Parameters:
- shader- The shader that was used
- wasSwitched- If true, the shader has required a state switch
 
- 
onUniformSetpublic void onUniformSet()Called by the Renderer when a uniform was set.
- 
onTextureUseCalled by the Renderer when a texture has been set.- Parameters:
- image- The image that was set
- wasSwitched- If true, the texture has required a state switch
 
- 
onFrameBufferUseCalled by the Renderer when a framebuffer has been set.- Parameters:
- fb- The framebuffer that was set
- wasSwitched- If true, the framebuffer required a state switch
 
- 
clearFramepublic void clearFrame()Clears all frame-specific statistics such as objects used per frame.
- 
onNewShaderpublic void onNewShader()Called by the Renderer when it creates a new shader.
- 
onNewTexturepublic void onNewTexture()Called by the Renderer when it creates a new texture.
- 
onNewFrameBufferpublic void onNewFrameBuffer()Called by the Renderer when it creates a new framebuffer.
- 
onDeleteShaderpublic void onDeleteShader()Called by the Renderer when it deletes a shader.
- 
onDeleteTexturepublic void onDeleteTexture()Called by the Renderer when it deletes a texture.
- 
onDeleteFrameBufferpublic void onDeleteFrameBuffer()Called by the Renderer when it deletes a framebuffer.
- 
clearMemorypublic void clearMemory()Called when video memory is cleared.
- 
setEnabledpublic void setEnabled(boolean f) Enables or disables updates.- Parameters:
- f- true to enable, false to disable
 
- 
isEnabledpublic boolean isEnabled()Tests whether updates are enabled.- Returns:
- true if enabled, otherwise false
 
 
-