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 Resources::ResourceUnknownId InitializeResource(const Ids::Id32 entry, const Util::StringAtom& tag, const Ptr<IO::Stream>& stream, bool immediate = false) override;
42 uint StreamResource(const Resources::ResourceId entry, IndexT frameIndex, uint requestedBits) override;
44 void Unload(const Resources::ResourceId id) override;
46 uint LodMask(const Ids::Id32 entry, float lod, bool stream) const override;
47
51 void SetupMeshFromNvx(const Ptr<IO::Stream>& stream, const Ids::Id32 entry, const MeshResourceId meshResource, bool immediate);
52};
53
54} // namespace CoreGraphics
Definition meshloader.h:18
void Unload(const Resources::ResourceId id) override
unload resource (overload to implement resource deallocation)
Definition meshloader.cc:191
void SetupMeshFromNvx(const Ptr< IO::Stream > &stream, const Ids::Id32 entry, const MeshResourceId meshResource, bool immediate)
setup mesh from nvx3 file in memory
Definition meshloader.cc:220
Resources::ResourceUnknownId InitializeResource(const Ids::Id32 entry, const Util::StringAtom &tag, const Ptr< IO::Stream > &stream, bool immediate=false) override
Initialize mesh.
Definition meshloader.cc:97
MeshLoader()
constructor
Definition meshloader.cc:23
virtual ~MeshLoader()
destructor
Definition meshloader.cc:88
static const CoreGraphics::VertexLayoutId GetLayout(const CoreGraphics::VertexLayoutType type)
Get vertex layout.
Definition meshloader.cc:209
uint StreamResource(const Resources::ResourceId entry, IndexT frameIndex, uint requestedBits) override
Stream texture.
Definition meshloader.cc:120
uint LodMask(const Ids::Id32 entry, float lod, bool stream) const override
Create load mask based on LOD.
Definition meshloader.cc:200
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Definition resourceloader.h:58
Util::FixedArray< uint > requestedBits
Definition resourceloader.h:244
A StringAtom.
Definition stringatom.h:22
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
uint32_t Id32
Definition id.h:138
void * mappedData
Definition meshloader.h:35
CoreGraphics::VertexAlloc vertexAllocationOffset
Definition meshloader.h:36
CoreGraphics::VertexAlloc indexAllocationOffset
Definition meshloader.h:36
bool copySource
Definition meshloader.h:28
Definition meshresource.h:14
Definition mesh.h:23
Definition vertexlayout.h:16
Definition resourceid.h:37
unsigned int uint
Definition types.h:31
int IndexT
Definition types.h:48