Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VkCV Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vulkan2021
VkCV Framework
Commits
6f588a05
Commit
6f588a05
authored
3 years ago
by
Trevor Hollmann
Browse files
Options
Downloads
Patches
Plain Diff
[
#26
] Define limits and update documentation.
parent
c998fcb4
No related branches found
No related tags found
1 merge request
!19
Resolve "Asset Loading"
Pipeline
#24955
passed
3 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/asset_loader/asset_loader.hpp
+11
-3
11 additions, 3 deletions
include/asset_loader/asset_loader.hpp
with
11 additions
and
3 deletions
include/asset_loader/asset_loader.hpp
+
11
−
3
View file @
6f588a05
...
@@ -9,6 +9,15 @@
...
@@ -9,6 +9,15 @@
#include
<vector>
#include
<vector>
#include
<cstdint>
#include
<cstdint>
/* These macros define limits of the following structs. Implementations can
* test against these limits when performing sanity checks. The main constraint
* expressed is that of the data type: Material indices are identified by a
* uint8_t in the VertexGroup struct, so there can't be more than UINT8_MAX
* materials in the mesh. Should these limits be too narrow, the data type has
* to be changed, but the current ones should be generous enough for most use
* cases. */
#define MAX_MATERIALS_PER_MESH UINT8_MAX
#define MAX_VERTICES_PER_VERTEX_GROUP UINT32_MAX
/* LOADING MESHES
/* LOADING MESHES
* The description of meshes is a hierarchy of structures with the Mesh at the
* The description of meshes is a hierarchy of structures with the Mesh at the
...
@@ -55,7 +64,7 @@ typedef struct {
...
@@ -55,7 +64,7 @@ typedef struct {
typedef
struct
{
typedef
struct
{
enum
PrimitiveMode
mode
;
// draw as points, lines or triangle?
enum
PrimitiveMode
mode
;
// draw as points, lines or triangle?
size_t
numIndices
,
numVertices
;
size_t
numIndices
,
numVertices
;
uint32_t
*
ind
ices
;
// array of indices for indexed rendering
uint32_t
*
ind
exBuffer
;
// array of indices for indexed rendering
struct
{
struct
{
void
*
data
;
// the binary data of the buffer
void
*
data
;
// the binary data of the buffer
size_t
byteLength
;
// the length of the entire buffer in bytes
size_t
byteLength
;
// the length of the entire buffer in bytes
...
@@ -66,8 +75,7 @@ typedef struct {
...
@@ -66,8 +75,7 @@ typedef struct {
uint8_t
materialIndex
;
// index to one of the meshes materials
uint8_t
materialIndex
;
// index to one of the meshes materials
}
VertexGroup
;
}
VertexGroup
;
/* TODO This is just an initial draft of how a mesh loaded from a glTF file may
/* This struct represents a single mesh loaded from a glTF file. */
* be presented to other modules of the vkcv framework. */
typedef
struct
{
typedef
struct
{
std
::
string
name
;
std
::
string
name
;
std
::
vector
<
VertexGroup
>
vertexGroups
;
std
::
vector
<
VertexGroup
>
vertexGroups
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment