Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::BatchDrawKey Struct Reference

Non-geometry attributes of a batch draw — everything needed to build the sort key + DrawCommand. More...

#include <BatchBuilder.hpp>

Public Attributes

RenderStage stage = RenderStage::Transparent
i32 layer = 0
i32 order = 0
u32 shaderId = 0
u32 depthShaderId = 0
BlendMode blend = BlendMode::Normal
u32 textureId = 0
u32 normalTextureId = 0
u32 shadowTextureId = 0
u32 envTextureId = 0
f32 depth = 0.0f
f32 y = 0.0f
u32 cullBit = 0
Entity entity = INVALID_ENTITY
RenderType type = RenderType::Sprite
u32 materialId = 0
bool depthTest = false
bool depthWrite = true
u8 cull = 0
 CullMode: 0 = none, 1 = back, 2 = front.
i16 depthBias = 0
 Depth-buffer units toward the eye.
GfxTopology topology = GfxTopology::Triangles
 How the indices assemble.
LayoutId layoutId = LayoutId::Batch
u32 instanceCount = 0
u32 instanceStride = 0
BufferHandle instanceBuffer = BufferHandle::Invalid
BufferHandle vertexBuffer = BufferHandle::Invalid
BufferHandle indexBuffer = BufferHandle::Invalid
VertexLayoutHandle vertexLayout = VertexLayoutHandle::Invalid
u32 skinOffset = 0
u32 skinCount = 0
u32 morphIndex = 0
u32 morphTextureId = 0
u32 probeIndex = 0
u32 planarIndex = 0
u32 lightmapTextureId = 0
u32 probeGridTextureId = 0

Detailed Description

Non-geometry attributes of a batch draw — everything needed to build the sort key + DrawCommand.

Definition at line 80 of file BatchBuilder.hpp.

Member Data Documentation

◆ blend

◆ cull

◆ cullBit

u32 esengine::BatchDrawKey::cullBit = 0

◆ depth

f32 esengine::BatchDrawKey::depth = 0.0f

Definition at line 106 of file BatchBuilder.hpp.

Referenced by esengine::pushBatchDraw().

◆ depthBias

i16 esengine::BatchDrawKey::depthBias = 0

◆ depthShaderId

u32 esengine::BatchDrawKey::depthShaderId = 0

Definition at line 89 of file BatchBuilder.hpp.

Referenced by esengine::MeshPlugin::collect(), and esengine::pushBatchDraw().

◆ depthTest

◆ depthWrite

◆ entity

◆ envTextureId

u32 esengine::BatchDrawKey::envTextureId = 0

Definition at line 102 of file BatchBuilder.hpp.

Referenced by esengine::MeshPlugin::collect(), and esengine::pushBatchDraw().

◆ indexBuffer

◆ instanceBuffer

BufferHandle esengine::BatchDrawKey::instanceBuffer = BufferHandle::Invalid

Definition at line 133 of file BatchBuilder.hpp.

Referenced by esengine::ParticlePlugin::collect(), and esengine::pushBatchDraw().

◆ instanceCount

u32 esengine::BatchDrawKey::instanceCount = 0

◆ instanceStride

u32 esengine::BatchDrawKey::instanceStride = 0

Definition at line 130 of file BatchBuilder.hpp.

Referenced by esengine::MeshPlugin::collect(), and esengine::pushBatchDraw().

◆ layer

i32 esengine::BatchDrawKey::layer = 0

◆ layoutId

◆ lightmapTextureId

u32 esengine::BatchDrawKey::lightmapTextureId = 0

The baked atlas this draw reads, on the last slot a draw's own stream has. Part of the key and not only of the command: two objects sharing a mesh but baked into different atlases are two draws.

Definition at line 158 of file BatchBuilder.hpp.

Referenced by esengine::MeshPlugin::collect(), and esengine::pushBatchDraw().

◆ materialId

◆ morphIndex

u32 esengine::BatchDrawKey::morphIndex = 0

Definition at line 148 of file BatchBuilder.hpp.

Referenced by esengine::MeshPlugin::collect(), and esengine::pushBatchDraw().

◆ morphTextureId

u32 esengine::BatchDrawKey::morphTextureId = 0

Definition at line 149 of file BatchBuilder.hpp.

Referenced by esengine::MeshPlugin::collect(), and esengine::pushBatchDraw().

◆ normalTextureId

u32 esengine::BatchDrawKey::normalTextureId = 0

Definition at line 95 of file BatchBuilder.hpp.

Referenced by esengine::pushBatchDraw().

◆ order

i32 esengine::BatchDrawKey::order = 0

Definition at line 86 of file BatchBuilder.hpp.

Referenced by esengine::pushBatchDraw().

◆ planarIndex

u32 esengine::BatchDrawKey::planarIndex = 0

Definition at line 154 of file BatchBuilder.hpp.

Referenced by esengine::MeshPlugin::collect(), and esengine::pushBatchDraw().

◆ probeGridTextureId

u32 esengine::BatchDrawKey::probeGridTextureId = 0

The frame's probe atlas, for a draw that reads its probe volume per pixel. On the lightmap's unit, which such a draw never needs: a draw reading a bake asks no volume for its light.

Definition at line 161 of file BatchBuilder.hpp.

Referenced by esengine::MeshPlugin::collect(), and esengine::pushBatchDraw().

◆ probeIndex

u32 esengine::BatchDrawKey::probeIndex = 0

The indirect light where this draw stands: 1 + its block in the frame's pool (0 = no volume holds it). Not part of the key — a volume does not change what program or buffer a draw needs, only what it reads.

Definition at line 153 of file BatchBuilder.hpp.

Referenced by esengine::MeshPlugin::collect(), and esengine::pushBatchDraw().

◆ shaderId

◆ shadowTextureId

u32 esengine::BatchDrawKey::shadowTextureId = 0

Definition at line 99 of file BatchBuilder.hpp.

Referenced by esengine::MeshPlugin::collect(), and esengine::pushBatchDraw().

◆ skinCount

u32 esengine::BatchDrawKey::skinCount = 0

Definition at line 144 of file BatchBuilder.hpp.

Referenced by esengine::MeshPlugin::collect(), and esengine::pushBatchDraw().

◆ skinOffset

u32 esengine::BatchDrawKey::skinOffset = 0

Definition at line 143 of file BatchBuilder.hpp.

Referenced by esengine::MeshPlugin::collect(), and esengine::pushBatchDraw().

◆ stage

RenderStage esengine::BatchDrawKey::stage = RenderStage::Transparent

Definition at line 81 of file BatchBuilder.hpp.

Referenced by esengine::MeshPlugin::collect(), and esengine::pushBatchDraw().

◆ textureId

u32 esengine::BatchDrawKey::textureId = 0

Definition at line 91 of file BatchBuilder.hpp.

Referenced by esengine::ParticlePlugin::collect(), and esengine::pushBatchDraw().

◆ topology

GfxTopology esengine::BatchDrawKey::topology = GfxTopology::Triangles

How the indices assemble.

See also
PipelineDesc.

Definition at line 121 of file BatchBuilder.hpp.

Referenced by esengine::MeshPlugin::collect(), and esengine::pushBatchDraw().

◆ type

RenderType esengine::BatchDrawKey::type = RenderType::Sprite

Definition at line 114 of file BatchBuilder.hpp.

Referenced by esengine::pushBatchDraw().

◆ vertexBuffer

◆ vertexLayout

◆ y

f32 esengine::BatchDrawKey::y = 0.0f

Definition at line 109 of file BatchBuilder.hpp.

Referenced by esengine::pushBatchDraw().


The documentation for this struct was generated from the following file: