Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
meshresource.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
9
//------------------------------------------------------------------------------
10
#include "
coregraphics/mesh.h
"
11
namespace
CoreGraphics
12
{
13
14
RESOURCE_ID_TYPE
(
MeshResourceId
);
15
struct
MeshResource
16
{
17
Util::Array<CoreGraphics::MeshId>
meshes
;
18
};
19
21
const
MeshId
MeshResourceGetMesh
(
const
MeshResourceId
id
,
const
IndexT
index);
23
const
SizeT
MeshResourceGetNumMeshes
(
const
MeshResourceId
id
);
24
26
void
DestroyMeshResource
(
const
MeshResourceId
id
);
27
28
29
enum
30
{
31
MeshResource_Meshes
,
32
MeshResource_VertexData
,
33
MeshResource_IndexData
34
};
35
36
typedef
Ids::IdAllocator
<
37
Util::FixedArray<MeshId>
,
38
CoreGraphics::VertexAlloc
,
39
CoreGraphics::VertexAlloc
40
>
MeshResourceAllocator
;
41
extern
MeshResourceAllocator
meshResourceAllocator
;
42
43
}
// namespace CoreGraphics
Ids::IdAllocator
An ID allocator associates an id with a slice in an N number of arrays.
Definition
idallocator.h:39
Util::Array
Nebula's dynamic array class.
Definition
array.h:61
Util::FixedArray
Implements a fixed size one-dimensional array.
Definition
fixedarray.h:20
mesh.h
CoreGraphics
Acceleration structures are used to enable ray tracing on the GPU by dividing the scene into a BVH.
Definition
accelerationstructure.h:24
CoreGraphics::MeshResourceGetNumMeshes
const SizeT MeshResourceGetNumMeshes(const MeshResourceId id)
Get number of meshes.
Definition
meshresource.cc:24
CoreGraphics::DestroyMeshResource
void DestroyMeshResource(const MeshResourceId id)
Destroy.
Definition
meshresource.cc:32
CoreGraphics::meshResourceAllocator
MeshResourceAllocator meshResourceAllocator
Definition
meshresource.cc:9
CoreGraphics::MeshResourceGetMesh
const MeshId MeshResourceGetMesh(const MeshResourceId id, const IndexT index)
Get mesh.
Definition
meshresource.cc:15
CoreGraphics::MeshResource_VertexData
@ MeshResource_VertexData
Definition
meshresource.h:32
CoreGraphics::MeshResource_Meshes
@ MeshResource_Meshes
Definition
meshresource.h:31
CoreGraphics::MeshResource_IndexData
@ MeshResource_IndexData
Definition
meshresource.h:33
CoreGraphics::MeshResourceAllocator
Ids::IdAllocator< Util::FixedArray< MeshId >, CoreGraphics::VertexAlloc, CoreGraphics::VertexAlloc > MeshResourceAllocator
Definition
meshresource.h:40
RESOURCE_ID_TYPE
#define RESOURCE_ID_TYPE(type)
Definition
resourceid.h:41
CoreGraphics::MeshId
Definition
mesh.h:29
CoreGraphics::MeshResource
Definition
meshresource.h:16
CoreGraphics::MeshResource::meshes
Util::Array< CoreGraphics::MeshId > meshes
Definition
meshresource.h:17
CoreGraphics::MeshResourceId
Definition
meshresource.h:14
CoreGraphics::VertexAlloc
Definition
mesh.h:21
SizeT
int SizeT
Definition
types.h:42
IndexT
int IndexT
Definition
types.h:41
code
render
coregraphics
meshresource.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.