Nebula
|
#include <decalcontext.h>
Inherits Graphics::GraphicsContext.
Public Member Functions | |
DecalContext () | |
constructor | |
virtual | ~DecalContext () |
destructor | |
Public Member Functions inherited from Graphics::GraphicsContext | |
GraphicsContext () | |
constructor | |
virtual | ~GraphicsContext () |
destructor | |
Static Public Member Functions | |
static void | Create () |
setup decal context | |
static void | Discard () |
discard decal context | |
static void | SetupDecalPBR (const Graphics::GraphicsEntityId id, const Math::mat4 transform, const Resources::ResourceId albedo, const Resources::ResourceId normal, const Resources::ResourceId material) |
setup as albedo-normal-material decal | |
static void | SetupDecalEmissive (const Graphics::GraphicsEntityId id, const Math::mat4 transform, const Resources::ResourceId emissive) |
setup as emissive decal | |
static void | SetAlbedoTexture (const Graphics::GraphicsEntityId id, const Resources::ResourceId albedo) |
set albedo texture for a PBR decal | |
static void | SetNormalTexture (const Graphics::GraphicsEntityId id, const Resources::ResourceId normal) |
set normal texture for a PBR decal | |
static void | SetMaterialTexture (const Graphics::GraphicsEntityId id, const Resources::ResourceId material) |
set material texture for a PBR decal | |
static void | SetEmissiveTexture (const Graphics::GraphicsEntityId id, const Resources::ResourceId emissive) |
set emissive texture for a PBR decal | |
static void | SetTransform (const Graphics::GraphicsEntityId id, const Math::mat4 transform) |
set transform of decal | |
static Math::mat4 | GetTransform (const Graphics::GraphicsEntityId id) |
get transform of decal | |
static void | UpdateViewDependentResources (const Ptr< Graphics::View > &view, const Graphics::FrameContext &ctx) |
update view dependent resources | |
static void | OnRenderDebug (uint32_t flags) |
render debug | |
Private Types | |
enum | DecalType { PBRDecal , EmissiveDecal } |
enum | { Decal_Transform , Decal_Type , Decal_TypedId } |
enum | { DecalPBR_Albedo , DecalPBR_Normal , DecalPBR_Material } |
enum | { DecalEmissive_Emissive } |
typedef Ids::IdAllocator< Math::mat4, DecalType, Ids::Id32 > | GenericDecalAllocator |
typedef Ids::IdAllocator< Resources::ResourceId, Resources::ResourceId, Resources::ResourceId > | PBRDecalAllocator |
typedef Ids::IdAllocator< Resources::ResourceId > | EmissiveDecalAllocator |
Private Member Functions | |
__DeclareContext () | |
Static Private Member Functions | |
static Graphics::ContextEntityId | Alloc () |
allocate a new slice for this context | |
static void | Dealloc (Graphics::ContextEntityId id) |
deallocate a slice | |
Static Private Attributes | |
static GenericDecalAllocator | genericDecalAllocator |
static PBRDecalAllocator | pbrDecalAllocator |
static EmissiveDecalAllocator | emissiveDecalAllocator |
Additional Inherited Members | |
Static Protected Member Functions inherited from Graphics::GraphicsContext | |
static void | InternalRegisterEntity (const Graphics::GraphicsEntityId id, Graphics::GraphicsContextState &&state) |
static void | InternalDeregisterEntity (const Graphics::GraphicsEntityId id, Graphics::GraphicsContextState &&state) |
template<class ID_ALLOCATOR > | |
static void | InternalDefragment (ID_ALLOCATOR &allocator, Graphics::GraphicsContextState &&state) |
|
private |
|
private |
|
private |
|
private |
Decals::DecalContext::DecalContext | ( | ) |
constructor
|
virtual |
destructor
|
private |
|
staticprivate |
allocate a new slice for this context
|
static |
setup decal context
|
staticprivate |
deallocate a slice
|
static |
discard decal context
|
static |
get transform of decal
|
static |
render debug
Todo: Right now, we just render a box, but probably we want some type of mesh to illustrate this is a decal, and not some 'empty' object.
|
static |
set albedo texture for a PBR decal
|
static |
set emissive texture for a PBR decal
|
static |
set material texture for a PBR decal
|
static |
set normal texture for a PBR decal
|
static |
set transform of decal
|
static |
setup as emissive decal
|
static |
setup as albedo-normal-material decal
|
static |
update view dependent resources
|
staticprivate |
|
staticprivate |
|
staticprivate |