Nebula
Loading...
Searching...
No Matches
shaderstatenode.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
10//------------------------------------------------------------------------------
11#include "modelnode.h"
13#include "transformnode.h"
15
16namespace Models
17{
19{
20public:
24 virtual ~ShaderStateNode();
25
26 struct DrawPacket;
27 static const uint NumMaxOffsets = 4; // object, instancing, skeleton, particles
28
44
46 const Materials::MaterialId GetMaterial() const { return this->material; };
47
50
51protected:
52 friend class ModelContext;
53 friend class ModelLoader;
54
56 bool Load(const Util::FourCC& fourcc, const Util::StringAtom& tag, const Ptr<IO::BinaryReader>& reader, bool immediate) override;
58 virtual void Unload() override;
60 virtual void OnFinishedLoading(ModelStreamingData* streamingData) override;
61
62 Resources::ResourceId materialRes;
65
67};
68
69} // namespace Models
Nebula's bounding box class.
Definition bbox.h:24
Definition modelcontext.h:58
Definition modelloader.h:27
Util::StringAtom tag
Definition modelnode.h:110
Definition shaderstatenode.h:19
Resources::ResourceId materialRes
Definition shaderstatenode.h:62
const Materials::MaterialId GetMaterial() const
get surface
Definition shaderstatenode.h:46
virtual void Unload() override
unload data
Definition shaderstatenode.cc:86
static Util::FixedArray< CoreGraphics::ResourceTableId > CreateResourceTables()
Create resource table.
Definition shaderstatenode.cc:40
Util::FixedArray< CoreGraphics::ResourceTableId > resourceTables
Definition shaderstatenode.h:66
ShaderStateNode()
constructor
Definition shaderstatenode.cc:22
Materials::MaterialId material
Definition shaderstatenode.h:63
static const uint NumMaxOffsets
Definition shaderstatenode.h:27
virtual void OnFinishedLoading(ModelStreamingData *streamingData) override
called when loading finished
Definition shaderstatenode.cc:100
virtual ~ShaderStateNode()
destructor
Definition shaderstatenode.cc:31
Resources::ResourceName materialName
Definition shaderstatenode.h:64
Definition transformnode.h:15
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Implements a fixed size one-dimensional array.
Definition fixedarray.h:20
A four-character-code is a quasi-human-readable 32-bit-id.
Definition fourcc.h:19
A StringAtom.
Definition stringatom.h:22
A model resource consists of nodes, each of which inhibit some information read from an ....
Definition model.cc:10
A resource table declares a list of resources (ResourceTable in DX12, DescriptorSet in Vulkan)
Definition commandbuffer.h:155
Definition resourcetable.h:95
Definition material.h:30
Definition material.h:31
Definition model.h:54
Definition shaderstatenode.h:30
CoreGraphics::ResourceTableId table
Definition shaderstatenode.h:36
void Apply(const CoreGraphics::CmdBufferId cmdBuf, IndexT batchIndex, IndexT bufferIndex)
Apply the resource table.
Definition shaderstatenode.cc:119
uint8 slot
Definition shaderstatenode.h:39
uint32 offsets[NumMaxOffsets]
Definition shaderstatenode.h:37
uint8 numOffsets
Definition shaderstatenode.h:38
uint32_t nodeInstanceHash
Definition shaderstatenode.h:33
Math::bbox boundingBox
Definition shaderstatenode.h:32
Materials::MaterialInstanceId materialInstance
Definition shaderstatenode.h:35
uint8_t uint8
Definition types.h:42
unsigned int uint
Definition types.h:31
uint32_t uint32
Definition types.h:38
int IndexT
Definition types.h:48