Capítulo 662 de 859

Chapter 662: Info

Core Idea

This renderer module provides a series of statistical information about the GPU memory and the rendering process. Useful for debugging and monitoring.

Key Concepts

  • autoReset : boolean: Whether frame related metrics should automatically be resetted or not. This property should be set to false by apps which manage their ow…
  • calls : number (readonly): The number of render calls since the app has been started.
  • compute : Object (readonly): Compute related metrics.
  • frame : number (readonly): The current frame ID. This ID is managed by NodeFrame.
  • memory : Object (readonly): Memory related metrics.
  • render : Object (readonly): Render related metrics.

Reference Tables

Constructor

Signature
new Info()

Properties

PropertyDescription
.autoReset : booleanWhether frame related metrics should automatically be resetted or not. This property should be set to false by apps which manage their own animation loop. They must then call `renderer.info.reset()…
.calls : number (readonly)The number of render calls since the app has been started.
.compute : Object (readonly)Compute related metrics.
.frame : number (readonly)The current frame ID. This ID is managed by NodeFrame.
.memory : Object (readonly)Memory related metrics.
.render : Object (readonly)Render related metrics.

Methods

MethodDescription
.createAttribute( attribute : BufferAttribute )Tracks a regular attribute memory explicitly.
.createIndexAttribute( attribute : BufferAttribute )Tracks an index attribute memory explicitly.
.createIndirectStorageAttribute( attribute : BufferAttribute )Tracks an indirect storage attribute memory explicitly.
.createProgram( program : ProgrammableStage )Tracks program memory explicitly, updating counts and byte tracking.
.createReadbackBuffer( readbackBuffer : ReadbackBuffer )Tracks a readback buffer memory explicitly.
.createStorageAttribute( attribute : BufferAttribute )Tracks a storage attribute memory explicitly.
.createTexture( texture : Texture )Tracks texture memory explicitly, updating counts and byte tracking.
.createUniformBuffer( uniformBuffer : UniformBuffer )Tracks a uniform buffer memory explicitly.
.destroyAttribute( attribute : BufferAttribute )Tracks attribute memory explicitly, updating counts and byte tracking.
.destroyProgram( program : Object )Tracks program memory explicitly, updating counts and byte tracking.
.destroyReadbackBuffer( readbackBuffer : ReadbackBuffer )Tracks a readback buffer memory explicitly.
.destroyTexture( texture : Texture )Tracks texture memory explicitly, updating counts and byte tracking.
.destroyUniformBuffer( uniformBuffer : UniformBuffer )Tracks a uniform buffer memory explicitly.
.dispose()Performs a complete reset of the object.
.reset()Resets frame related metrics.
.update( object : Object3D, count : number, instanceCount : number )This method should be executed per draw call and updates the corresponding metrics.

Key Takeaways

  1. Most relevant properties: autoReset, calls, compute, frame.
  2. Key methods: createAttribute, createIndexAttribute, createIndirectStorageAttribute, createProgram.

Connects To