32 const Resources::ResourceId albedo,
33 const Resources::ResourceId normal,
34 const Resources::ResourceId material,
41 const Resources::ResourceId emissive,
96 Resources::ResourceId,
97 Resources::ResourceId,
107 Resources::ResourceId
DecalType
Definition decalcontext.h:70
@ EmissiveDecal
Definition decalcontext.h:72
@ PBRDecal
Definition decalcontext.h:71
@ DecalEmissive_Emissive
Definition decalcontext.h:104
static void Dealloc(Graphics::ContextEntityId id)
deallocate a slice
Definition decalcontext.cc:410
static void Create()
setup decal context
Definition decalcontext.cc:65
Ids::IdAllocator< Math::mat4, DecalType, Ids::Id32, Graphics::StageMask > GenericDecalAllocator
Definition decalcontext.h:86
@ Decal_Type
Definition decalcontext.h:77
@ Decal_TypedId
Definition decalcontext.h:78
@ Decal_Transform
Definition decalcontext.h:76
@ Decal_StageMask
Definition decalcontext.h:79
static Math::mat4 GetTransform(const Graphics::GraphicsEntityId id)
get transform of decal
Definition decalcontext.cc:263
virtual ~DecalContext()
destructor
Definition decalcontext.cc:57
static void SetAlbedoTexture(const Graphics::GraphicsEntityId id, const Resources::ResourceId albedo)
set albedo texture for a PBR decal
Definition decalcontext.cc:190
static void SetupDecalEmissive(const Graphics::GraphicsEntityId id, const Math::mat4 transform, const Resources::ResourceId emissive, const Graphics::StageMask stageMask=Graphics::PRIMARY_STAGE_MASK)
setup as emissive decal
Definition decalcontext.cc:169
static Graphics::ContextEntityId Alloc()
allocate a new slice for this context
Definition decalcontext.cc:401
static void SetupDecalPBR(const Graphics::GraphicsEntityId id, const Math::mat4 transform, const Resources::ResourceId albedo, const Resources::ResourceId normal, const Resources::ResourceId material, const Graphics::StageMask stageMask=Graphics::PRIMARY_STAGE_MASK)
setup as albedo-normal-material decal
Definition decalcontext.cc:140
static void OnRenderDebug(uint32_t flags)
render debug
Definition decalcontext.cc:364
Ids::IdAllocator< Resources::ResourceId > EmissiveDecalAllocator
Definition decalcontext.h:108
static GenericDecalAllocator genericDecalAllocator
Definition decalcontext.h:87
Ids::IdAllocator< Resources::ResourceId, Resources::ResourceId, Resources::ResourceId > PBRDecalAllocator
Definition decalcontext.h:99
@ DecalPBR_Albedo
Definition decalcontext.h:91
@ DecalPBR_Normal
Definition decalcontext.h:92
@ DecalPBR_Material
Definition decalcontext.h:93
static void UpdateDecals(const Graphics::FrameContext &ctx)
update view dependent resources
Definition decalcontext.cc:273
DecalContext()
constructor
Definition decalcontext.cc:50
static void SetNormalTexture(const Graphics::GraphicsEntityId id, const Resources::ResourceId normal)
set normal texture for a PBR decal
Definition decalcontext.cc:205
static EmissiveDecalAllocator emissiveDecalAllocator
Definition decalcontext.h:109
static void Discard()
discard decal context
Definition decalcontext.cc:132
static void SetMaterialTexture(const Graphics::GraphicsEntityId id, const Resources::ResourceId material)
set material texture for a PBR decal
Definition decalcontext.cc:220
static void SetEmissiveTexture(const Graphics::GraphicsEntityId id, const Resources::ResourceId emissive)
set emissive texture for a PBR decal
Definition decalcontext.cc:235
static PBRDecalAllocator pbrDecalAllocator
Definition decalcontext.h:100
static void SetTransform(const Graphics::GraphicsEntityId id, const Math::mat4 transform)
set transform of decal
Definition decalcontext.cc:250
Definition graphicscontext.h:175
An ID allocator associates an id with a slice in an N number of arrays.
Definition idallocator.h:39
The Decal context manages the decal system and entities and rendering.
Definition decalcontext.cc:23
static constexpr StageMask PRIMARY_STAGE_MASK
Definition view.h:24
uint16_t StageMask
Definition view.h:23
uint32_t Id32
Definition id.h:138
Definition graphicscontext.h:143
Definition graphicsserver.h:31
The graphics entity is only an Id, to which we can attach GraphicsContexts.
Definition graphicsentity.h:16
A 4x4 single point precision float matrix.
Definition mat4.h:49