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
23
25{
27public:
28
30 virtual void Setup() override;
31
33 ResourceInitOutput InitializeResource(const ResourceLoadJob& job, const Ptr<IO::Stream>& stream) override;
34
36 static void* AllocateConstantMemory(SizeT size);
42 static CoreGraphics::BufferId GetMaterialBuffer(const MaterialTemplates::MaterialProperties type);
44 static IndexT RegisterTerrainMaterial(const MaterialInterfaces::TerrainMaterial& terrain);
45private:
46
48 void Unload(const Resources::ResourceId id) override;
49};
50
51} // namespace Materials
Stream reader for binary XML files.
Definition bxmlreader.h:22
Definition materialloader.h:25
static IndexT RegisterTerrainMaterial(const MaterialInterfaces::TerrainMaterial &terrain)
Bit of a special way to register a terrain material.
Definition materialloader.cc:628
static void * AllocateConstantMemory(SizeT size)
Allocate constant memory explicitly.
Definition materialloader.cc:523
void Unload(const Resources::ResourceId id) override
unload resource (overload to implement resource deallocation)
Definition materialloader.cc:642
virtual void Setup() override
setup resource loader, initiates the placeholder and error resources if valid, so don't forget to run...
Definition materialloader.cc:235
static void FlushMaterialBuffers(const CoreGraphics::CmdBufferId id, const CoreGraphics::QueueType queue)
Update GPU buffers.
Definition materialloader.cc:532
static CoreGraphics::BufferId GetMaterialBuffer(const MaterialTemplates::MaterialProperties type)
Get material buffer.
Definition materialloader.cc:610
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:458
__DeclareClass(MaterialLoader)
static CoreGraphics::BufferId GetMaterialBindingBuffer()
Get material binding buffer.
Definition materialloader.cc:601
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:12
Compile time configuration options for the CoreGraphics subsystem.
Definition buffer.h:23
Definition commandbuffer.h:167
Definition resourceloader.h:143
Definition resourceloader.h:167
int SizeT
Definition types.h:49
int IndexT
Definition types.h:48