Nebula
Loading...
Searching...
No Matches
meshloader.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
9//------------------------------------------------------------------------------
13#include "coregraphics/mesh.h"
14namespace CoreGraphics
15{
16
18{
20public:
22 MeshLoader();
24 virtual ~MeshLoader();
25
27 {
29 };
30
31private:
32
38
40 ResourceInitOutput InitializeResource(const ResourceLoadJob& job, const Ptr<IO::Stream>& stream) override;
44 void Unload(const Resources::ResourceId id) override;
46 uint LodMask(const _StreamData& stream, float lod, bool async) const override;
47
49 void UpdateLoaderSyncState() override;
50
55
64
74
75
77
78};
79
80} // namespace CoreGraphics
Definition meshloader.h:18
CoreGraphics::CmdBufferPoolId asyncTransferPool
Definition meshloader.h:76
Util::HashTable< Resources::ResourceId, Util::Array< FinishedMesh > > meshesToFinish
Definition meshloader.h:72
void Unload(const Resources::ResourceId id) override
unload resource (overload to implement resource deallocation)
Definition meshloader.cc:274
Threading::CriticalSection meshLock
Definition meshloader.h:73
ResourceInitOutput InitializeResource(const ResourceLoadJob &job, const Ptr< IO::Stream > &stream) override
Initialize mesh.
Definition meshloader.cc:104
MeshLoader()
constructor
Definition meshloader.cc:23
virtual ~MeshLoader()
destructor
Definition meshloader.cc:95
static const CoreGraphics::VertexLayoutId GetLayout(const CoreGraphics::VertexLayoutType type)
Get vertex layout.
Definition meshloader.cc:318
void UpdateLoaderSyncState() override
Update intermediate loaded state.
Definition meshloader.cc:292
ResourceLoader::_StreamData SetupMeshFromNvx(const Ptr< IO::Stream > &stream, const ResourceLoadJob &job, const MeshResourceId meshResource)
setup mesh from nvx3 file in memory
Definition meshloader.cc:329
Threading::SafeQueue< MeshesToSubmit > meshesToSubmit
Definition meshloader.h:63
uint LodMask(const _StreamData &stream, float lod, bool async) const override
Create load mask based on LOD.
Definition meshloader.cc:283
CoreGraphics::CmdBufferPoolId immediateTransferPool
Definition meshloader.h:76
ResourceStreamOutput StreamResource(const ResourceLoadJob &job) override
Stream texture.
Definition meshloader.cc:129
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Definition resourceloader.h:60
bool async
Definition resourceloader.h:291
Critical section objects are used to protect a portion of code from parallel execution.
Thread-safe version of Util::Queue.
Definition safequeue.h:27
Nebula's dynamic array class.
Definition array.h:60
Organizes key/value pairs by a hash code.
Definition hashtable.h:42
Acceleration structures are used to enable ray tracing on the GPU by dividing the scene into a BVH.
Definition accelerationstructure.h:24
VertexLayoutType
Definition vertexlayout.h:49
Definition commandbuffer.h:155
Definition commandbuffer.h:101
Definition meshloader.h:66
CoreGraphics::CmdBufferId cmdBuf
Definition meshloader.h:70
uint bits
Definition meshloader.h:68
Util::Array< Memory::RangeAllocation > rangesToFree
Definition meshloader.h:69
uint64 submissionId
Definition meshloader.h:67
void * mappedData
Definition meshloader.h:35
CoreGraphics::VertexAlloc vertexAllocationOffset
Definition meshloader.h:36
CoreGraphics::VertexAlloc indexAllocationOffset
Definition meshloader.h:36
Util::Array< Memory::RangeAllocation > rangesToFlush
Definition meshloader.h:60
CoreGraphics::CmdBufferId cmdBuf
Definition meshloader.h:61
Resources::ResourceId id
Definition meshloader.h:58
uint bits
Definition meshloader.h:59
bool copySource
Definition meshloader.h:28
Definition meshresource.h:14
Definition mesh.h:23
Definition vertexlayout.h:16
Definition resourceloader.h:134
Definition resourceloader.h:140
Definition resourceloader.h:164
unsigned int uint
Definition types.h:31
uint64_t uint64
Definition types.h:36