Nebula
Loading...
Searching...
No Matches
materialloader.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
9//------------------------------------------------------------------------------
12#include "coregraphics/config.h"
13#include "materials/materialtemplates.h"
14
15namespace IO
16{
17class BXmlReader;
18}
19
20namespace Materials
21{
22
24{
26public:
27
29 virtual void Setup() override;
30
32 ResourceInitOutput InitializeResource(const ResourceLoadJob& job, const Ptr<IO::Stream>& stream) override;
33
35 static void* AllocateConstantMemory(SizeT size);
41 static CoreGraphics::BufferId GetMaterialBuffer(const MaterialTemplates::MaterialProperties type);
43 static IndexT RegisterTerrainMaterial(const MaterialInterfaces::TerrainMaterial& terrain);
44private:
45
47 void Unload(const Resources::ResourceId id) override;
48};
49
50} // namespace Materials
Definition materialloader.h:24
static IndexT RegisterTerrainMaterial(const MaterialInterfaces::TerrainMaterial &terrain)
Bit of a special way to register a terrain material.
Definition materialloader.cc:622
static void * AllocateConstantMemory(SizeT size)
Allocate constant memory explicitly.
Definition materialloader.cc:535
void Unload(const Resources::ResourceId id) override
unload resource (overload to implement resource deallocation)
Definition materialloader.cc:636
virtual void Setup() override
setup resource loader, initiates the placeholder and error resources if valid, so don't forget to run...
Definition materialloader.cc:267
static void FlushMaterialBuffers(const CoreGraphics::CmdBufferId id, const CoreGraphics::QueueType queue)
Update GPU buffers.
Definition materialloader.cc:544
static CoreGraphics::BufferId GetMaterialBuffer(const MaterialTemplates::MaterialProperties type)
Get material buffer.
Definition materialloader.cc:604
ResourceInitOutput InitializeResource(const ResourceLoadJob &job, const Ptr< IO::Stream > &stream) override
update reserved resource, the info struct is loader dependent (overload to implement resource dealloc...
Definition materialloader.cc:467
__DeclareClass(MaterialLoader)
static CoreGraphics::BufferId GetMaterialBindingBuffer()
Get material binding buffer.
Definition materialloader.cc:595
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Definition resourceloader.h:60
QueueType
Definition config.h:40
Instances of wrapped stream classes.
Definition orientation.cc:10
Material special version of variant.
Definition material.cc:11
Compile time configuration options for the CoreGraphics subsystem.
Definition buffer.h:23
Definition commandbuffer.h:155
Definition resourceloader.h:140
Definition resourceloader.h:164
int SizeT
Definition types.h:49
int IndexT
Definition types.h:48