public interface R2SceneOpaquesConsumerType
The type of consumers of opaque scene instances.
Instances are batched in a manner that is intended to require the minimum number of state changes for rendering, based upon the relative cost of state changes.
In NVIDIA's Beyond Porting slides, the relative cost of rendering state changes are given:
It is beneficial, for example, to organize instances such that shaders are changed less frequently than array objects, etc.
Modifier and Type | Method and Description |
---|---|
void |
onFinish()
Called when rendering of instances is finished.
|
void |
onFinishGroup(int group)
Called when rendering of a group is finished.
|
<M> void |
onInstanceBatched(R2MaterialOpaqueBatchedType<M> material,
R2InstanceBatchedType i)
Called when a batched instance should be rendered.
|
<M> void |
onInstanceBatchedMaterialFinish(R2MaterialOpaqueBatchedType<M> material)
Called after the current set of batched instances have finished rendering
with the current material.
|
<M> void |
onInstanceBatchedMaterialStart(R2MaterialOpaqueBatchedType<M> material)
Called when new material settings should be assigned, for batched
instances.
|
<M> void |
onInstanceBatchedShaderFinish(R2ShaderInstanceBatchedUsableType<M> s)
Called when the current shader should be deactivated.
|
<M> void |
onInstanceBatchedShaderStart(R2ShaderInstanceBatchedUsableType<M> s)
Called when a new shader should be activated in order to start rendering
batched instances.
|
void |
onInstanceBatchedUpdate(R2InstanceBatchedType i)
Called when a batched instance should upload batch data to the GPU.
|
<M> void |
onInstanceBillboarded(R2MaterialOpaqueBillboardedType<M> material,
R2InstanceBillboardedType i)
Called when a batched instance should be rendered.
|
<M> void |
onInstanceBillboardedMaterialFinish(R2MaterialOpaqueBillboardedType<M> material)
Called after the current set of batched instances have finished rendering
with the current material.
|
<M> void |
onInstanceBillboardedMaterialStart(R2MaterialOpaqueBillboardedType<M> material)
Called when new material settings should be assigned, for batched
instances.
|
<M> void |
onInstanceBillboardedShaderFinish(R2ShaderInstanceBillboardedUsableType<M> s)
Called when the current shader should be deactivated.
|
<M> void |
onInstanceBillboardedShaderStart(R2ShaderInstanceBillboardedUsableType<M> s)
Called when a new shader should be activated in order to start rendering
batched instances.
|
void |
onInstanceBillboardedUpdate(R2InstanceBillboardedType i)
Called when a batched instance should upload batch data to the GPU.
|
<M> void |
onInstanceSingle(R2MaterialOpaqueSingleType<M> material,
R2InstanceSingleType i)
Called when a single instance should be rendered.
|
void |
onInstanceSingleArrayStart(R2InstanceSingleType i)
Called when a new array object should be bound, for single instances.
|
<M> void |
onInstanceSingleMaterialFinish(R2MaterialOpaqueSingleType<M> material)
Called after the current set of single instances have finished rendering
with the current material.
|
<M> void |
onInstanceSingleMaterialStart(R2MaterialOpaqueSingleType<M> material)
Called when new material settings should be assigned, for single
instances.
|
<M> void |
onInstanceSingleShaderFinish(R2ShaderInstanceSingleUsableType<M> s)
Called when the current shader should be deactivated.
|
<M> void |
onInstanceSingleShaderStart(R2ShaderInstanceSingleUsableType<M> s)
Called when a new shader should be activated in order to start rendering
single instances.
|
void |
onStart()
Called when rendering of instances begins.
|
void |
onStartGroup(int group)
Called when rendering of a group begins.
|
void onStart()
void onStartGroup(int group)
group
- The groupvoid onInstanceBatchedUpdate(R2InstanceBatchedType i)
i
- The batched instance<M> void onInstanceBatchedShaderStart(R2ShaderInstanceBatchedUsableType<M> s)
M
- The type of shader parameterss
- The shader<M> void onInstanceBatchedMaterialStart(R2MaterialOpaqueBatchedType<M> material)
M
- The type of shader parametersmaterial
- The current material<M> void onInstanceBatched(R2MaterialOpaqueBatchedType<M> material, R2InstanceBatchedType i)
M
- The type of shader parametersmaterial
- The current materiali
- The current instance<M> void onInstanceBatchedMaterialFinish(R2MaterialOpaqueBatchedType<M> material)
M
- The type of shader parametersmaterial
- The current material<M> void onInstanceBatchedShaderFinish(R2ShaderInstanceBatchedUsableType<M> s)
M
- The type of shader parameterss
- The shadervoid onInstanceBillboardedUpdate(R2InstanceBillboardedType i)
i
- The batched instance<M> void onInstanceBillboardedShaderStart(R2ShaderInstanceBillboardedUsableType<M> s)
M
- The type of shader parameterss
- The shader<M> void onInstanceBillboardedMaterialStart(R2MaterialOpaqueBillboardedType<M> material)
M
- The type of shader parametersmaterial
- The current material<M> void onInstanceBillboarded(R2MaterialOpaqueBillboardedType<M> material, R2InstanceBillboardedType i)
M
- The type of shader parametersmaterial
- The current materiali
- The current instance<M> void onInstanceBillboardedMaterialFinish(R2MaterialOpaqueBillboardedType<M> material)
M
- The type of shader parametersmaterial
- The current material<M> void onInstanceBillboardedShaderFinish(R2ShaderInstanceBillboardedUsableType<M> s)
M
- The type of shader parameterss
- The shader<M> void onInstanceSingleShaderStart(R2ShaderInstanceSingleUsableType<M> s)
M
- The type of shader parameterss
- The shader<M> void onInstanceSingleMaterialStart(R2MaterialOpaqueSingleType<M> material)
M
- The type of shader parametersmaterial
- The current materialvoid onInstanceSingleArrayStart(R2InstanceSingleType i)
i
- The current instance<M> void onInstanceSingle(R2MaterialOpaqueSingleType<M> material, R2InstanceSingleType i)
M
- The type of shader parametersmaterial
- The current materiali
- The current instance<M> void onInstanceSingleMaterialFinish(R2MaterialOpaqueSingleType<M> material)
M
- The type of shader parametersmaterial
- The current material<M> void onInstanceSingleShaderFinish(R2ShaderInstanceSingleUsableType<M> s)
M
- The type of shader parameterss
- The shadervoid onFinishGroup(int group)
group
- The groupvoid onFinish()
Copyright © 2017 <code@io7m.com> http://io7m.com