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
d9b6b748
Commit
d9b6b748
authored
3 years ago
by
Trevor Hollmann
Browse files
Options
Downloads
Patches
Plain Diff
[
#79
] Get rid of obsolete cerr print.
parent
52005c96
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!69
Resolve "Rework Asset Loader API"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/asset_loader/include/vkcv/asset/asset_loader.hpp
+2
-2
2 additions, 2 deletions
modules/asset_loader/include/vkcv/asset/asset_loader.hpp
modules/asset_loader/src/vkcv/asset/asset_loader.cpp
+9
-7
9 additions, 7 deletions
modules/asset_loader/src/vkcv/asset/asset_loader.cpp
with
11 additions
and
9 deletions
modules/asset_loader/include/vkcv/asset/asset_loader.hpp
+
2
−
2
View file @
d9b6b748
...
...
@@ -189,8 +189,8 @@ typedef struct {
uint32_t
offset
;
// offset in bytes
uint32_t
length
;
// length of ... in bytes
uint32_t
stride
;
// stride in bytes
ComponentType
componentType
;
// eg. 5126 for float
uint8_t
componentCount
;
// eg. 3 for vec3
ComponentType
componentType
;
// eg. 5126 for float
uint8_t
componentCount
;
// eg. 3 for vec3
}
VertexAttribute
;
/** This struct represents one (possibly the only) part of a mesh. There is
...
...
This diff is collapsed.
Click to expand it.
modules/asset_loader/src/vkcv/asset/asset_loader.cpp
+
9
−
7
View file @
d9b6b748
...
...
@@ -50,13 +50,17 @@ void print_what (const std::exception& e, const std::string &path) {
}
}
/** Translate the component type used in the index accessor of fx-gltf to our
/**
* Translate the component type used in the index accessor of fx-gltf to our
* enum for index type. The reason we have defined an incompatible enum that
* needs translation is that only a subset of component types is valid for
* indices and we want to catch these incompatibilities here. */
enum
IndexType
getIndexType
(
const
enum
fx
::
gltf
::
Accessor
::
ComponentType
&
t
)
* indices and we want to catch these incompatibilities here.
* @param t The component type
* @return enum representation
*/
enum
IndexType
getIndexType
(
const
enum
fx
::
gltf
::
Accessor
::
ComponentType
&
type
)
{
switch
(
t
)
{
switch
(
t
ype
)
{
case
fx
::
gltf
::
Accessor
::
ComponentType
::
UnsignedByte
:
return
IndexType
::
UINT8
;
case
fx
::
gltf
::
Accessor
::
ComponentType
::
UnsignedShort
:
...
...
@@ -64,8 +68,6 @@ enum IndexType getIndexType(const enum fx::gltf::Accessor::ComponentType &t)
case
fx
::
gltf
::
Accessor
::
ComponentType
::
UnsignedInt
:
return
IndexType
::
UINT32
;
default:
std
::
cerr
<<
"ERROR: Index type not supported: "
<<
static_cast
<
uint16_t
>
(
t
)
<<
std
::
endl
;
return
IndexType
::
UNDEFINED
;
}
}
...
...
@@ -272,7 +274,7 @@ int loadScene(const std::string &path, Scene &scene){
indexType
=
getIndexType
(
indexAccessor
.
componentType
);
if
(
indexType
==
IndexType
::
UNDEFINED
){
vkcv_log
(
LogLevel
::
ERROR
,
"Index Type undefined."
);
vkcv_log
(
LogLevel
::
ERROR
,
"Index Type undefined
or not supported
."
);
return
ASSET_ERROR
;
}
}
...
...
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