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
8ba16eb5
Commit
8ba16eb5
authored
3 years ago
by
Trevor Hollmann
Browse files
Options
Downloads
Patches
Plain Diff
[
#79
] Add some TODO comments.
parent
a2969528
No related branches found
Branches containing commit
No related tags found
1 merge request
!69
Resolve "Rework Asset Loader API"
Pipeline
#25911
failed
3 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/asset_loader/src/vkcv/asset/asset_loader.cpp
+4
-2
4 additions, 2 deletions
modules/asset_loader/src/vkcv/asset/asset_loader.cpp
projects/first_scene/src/main.cpp
+1
-1
1 addition, 1 deletion
projects/first_scene/src/main.cpp
with
5 additions
and
3 deletions
modules/asset_loader/src/vkcv/asset/asset_loader.cpp
+
4
−
2
View file @
8ba16eb5
...
@@ -313,7 +313,7 @@ int loadScene(const std::string &path, Scene &scene){
...
@@ -313,7 +313,7 @@ int loadScene(const std::string &path, Scene &scene){
}
}
const
size_t
numVertexGroups
=
objectMesh
.
primitives
.
size
();
const
size_t
numVertexGroups
=
objectMesh
.
primitives
.
size
();
vertexGroups
.
reserve
(
numVertexGroups
);
vertexGroups
.
reserve
(
numVertexGroups
);
// FIXME this is a bug
vertexGroups
.
push_back
({
vertexGroups
.
push_back
({
static_cast
<
PrimitiveMode
>
(
objectPrimitive
.
mode
),
static_cast
<
PrimitiveMode
>
(
objectPrimitive
.
mode
),
...
@@ -349,6 +349,8 @@ int loadScene(const std::string &path, Scene &scene){
...
@@ -349,6 +349,8 @@ int loadScene(const std::string &path, Scene &scene){
for
(
int
k
=
0
;
k
<
sceneObjects
.
textures
.
size
();
k
++
){
for
(
int
k
=
0
;
k
<
sceneObjects
.
textures
.
size
();
k
++
){
const
fx
::
gltf
::
Texture
&
tex
=
sceneObjects
.
textures
[
k
];
const
fx
::
gltf
::
Texture
&
tex
=
sceneObjects
.
textures
[
k
];
const
fx
::
gltf
::
Image
&
img
=
sceneObjects
.
images
[
tex
.
source
];
const
fx
::
gltf
::
Image
&
img
=
sceneObjects
.
images
[
tex
.
source
];
// TODO Image objects in glTF can have a URI _or_ a bufferView and
// a mimeType; but here we are assuming to always find a URI.
std
::
string
img_uri
=
dir
+
"/"
+
img
.
uri
;
std
::
string
img_uri
=
dir
+
"/"
+
img
.
uri
;
int
w
,
h
,
c
;
int
w
,
h
,
c
;
uint8_t
*
data
=
stbi_load
(
img_uri
.
c_str
(),
&
w
,
&
h
,
&
c
,
4
);
uint8_t
*
data
=
stbi_load
(
img_uri
.
c_str
(),
&
w
,
&
h
,
&
c
,
4
);
...
@@ -391,7 +393,7 @@ int loadScene(const std::string &path, Scene &scene){
...
@@ -391,7 +393,7 @@ int loadScene(const std::string &path, Scene &scene){
// materials textureMask like this:
// materials textureMask like this:
// mat.textureMask |= bitflag(asset::normal);
// mat.textureMask |= bitflag(asset::normal);
materials
.
push_back
({
materials
.
push_back
({
0
,
0
,
// TODO
material
.
pbrMetallicRoughness
.
baseColorTexture
.
index
,
material
.
pbrMetallicRoughness
.
baseColorTexture
.
index
,
material
.
pbrMetallicRoughness
.
metallicRoughnessTexture
.
index
,
material
.
pbrMetallicRoughness
.
metallicRoughnessTexture
.
index
,
material
.
normalTexture
.
index
,
material
.
normalTexture
.
index
,
...
...
This diff is collapsed.
Click to expand it.
projects/first_scene/src/main.cpp
+
1
−
1
View file @
8ba16eb5
...
@@ -59,7 +59,7 @@ int main(int argc, const char** argv) {
...
@@ -59,7 +59,7 @@ int main(int argc, const char** argv) {
}
}
else
{
else
{
std
::
cout
<<
"Mesh loading failed: "
<<
result
<<
std
::
endl
;
std
::
cout
<<
"Mesh loading failed: "
<<
result
<<
std
::
endl
;
return
1
;
return
EXIT_FAILURE
;
}
}
assert
(
!
scene
.
vertexGroups
.
empty
());
assert
(
!
scene
.
vertexGroups
.
empty
());
...
...
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