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
f88c6c0c
Commit
f88c6c0c
authored
3 years ago
by
Lars Hoerttrich
Browse files
Options
Downloads
Patches
Plain Diff
[
#79
] updated documentation of createTextures
parent
6e4ca33d
No related branches found
No related tags found
1 merge request
!69
Resolve "Rework Asset Loader API"
Pipeline
#26197
passed
3 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/asset_loader/src/vkcv/asset/asset_loader.cpp
+7
-5
7 additions, 5 deletions
modules/asset_loader/src/vkcv/asset/asset_loader.cpp
with
7 additions
and
5 deletions
modules/asset_loader/src/vkcv/asset/asset_loader.cpp
+
7
−
5
View file @
f88c6c0c
...
@@ -82,6 +82,8 @@ enum IndexType getIndexType(const enum fx::gltf::Accessor::ComponentType &type)
...
@@ -82,6 +82,8 @@ enum IndexType getIndexType(const enum fx::gltf::Accessor::ComponentType &type)
* and image- array of an fx::gltf::Document.
* and image- array of an fx::gltf::Document.
* @param tex_src The array of textures from a fx::gltf::Document
* @param tex_src The array of textures from a fx::gltf::Document
* @param img_src The array of images from a fx::gltf::Document
* @param img_src The array of images from a fx::gltf::Document
* @param buf_src The Array of buffers from a fx::gltf::Document
* @param bV_src The Array of bufferViews from a fx::gltf::Document
* @param dir The path of directory in which the glTF file is located
* @param dir The path of directory in which the glTF file is located
* @param dst The array from the vkcv::Scene to write the textures to
* @param dst The array from the vkcv::Scene to write the textures to
* @return ASSET_ERROR if at least one texture could not be constructed
* @return ASSET_ERROR if at least one texture could not be constructed
...
@@ -89,8 +91,8 @@ enum IndexType getIndexType(const enum fx::gltf::Accessor::ComponentType &type)
...
@@ -89,8 +91,8 @@ enum IndexType getIndexType(const enum fx::gltf::Accessor::ComponentType &type)
*/
*/
int
createTextures
(
const
std
::
vector
<
fx
::
gltf
::
Texture
>&
tex_src
,
int
createTextures
(
const
std
::
vector
<
fx
::
gltf
::
Texture
>&
tex_src
,
const
std
::
vector
<
fx
::
gltf
::
Image
>&
img_src
,
const
std
::
vector
<
fx
::
gltf
::
Image
>&
img_src
,
const
std
::
vector
<
fx
::
gltf
::
Buffer
>&
buf
fers
,
const
std
::
vector
<
fx
::
gltf
::
Buffer
>&
buf
_src
,
const
std
::
vector
<
fx
::
gltf
::
BufferView
>&
b
ufferViews
,
const
std
::
vector
<
fx
::
gltf
::
BufferView
>&
b
V_src
,
const
std
::
string
&
dir
,
std
::
vector
<
Texture
>&
dst
)
const
std
::
string
&
dir
,
std
::
vector
<
Texture
>&
dst
)
{
{
dst
.
clear
();
dst
.
clear
();
...
@@ -113,11 +115,11 @@ int createTextures(const std::vector<fx::gltf::Texture>& tex_src,
...
@@ -113,11 +115,11 @@ int createTextures(const std::vector<fx::gltf::Texture>& tex_src,
}
}
}
}
else
{
else
{
const
fx
::
gltf
::
BufferView
bufferView
=
b
ufferViews
[
img_src
[
tex_src
[
i
].
source
].
bufferView
];
const
fx
::
gltf
::
BufferView
bufferView
=
b
V_src
[
img_src
[
tex_src
[
i
].
source
].
bufferView
];
data
=
stbi_load_from_memory
(
&
buf
fers
[
bufferView
.
buffer
].
data
[
bufferView
.
byteOffset
],
bufferView
.
byteLength
,
&
w
,
&
h
,
&
c
,
4
);
data
=
stbi_load_from_memory
(
&
buf
_src
[
bufferView
.
buffer
].
data
[
bufferView
.
byteOffset
],
bufferView
.
byteLength
,
&
w
,
&
h
,
&
c
,
4
);
if
(
!
data
)
{
if
(
!
data
)
{
vkcv_log
(
LogLevel
::
ERROR
,
"Failed to load image data from Buffer %s"
,
vkcv_log
(
LogLevel
::
ERROR
,
"Failed to load image data from Buffer %s"
,
buf
fers
[
bufferView
.
buffer
].
name
.
c_str
());
buf
_src
[
bufferView
.
buffer
].
name
.
c_str
());
return
ASSET_ERROR
;
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