Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Black Dragon Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Logue
Black Dragon Viewer
Commits
125b0992
Commit
125b0992
authored
2 years ago
by
David Parks
Browse files
Options
Downloads
Patches
Plain Diff
VS2019 build fix
parent
d8ffaf20
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/llprimitive/llgltfloader.h
+18
-12
18 additions, 12 deletions
indra/llprimitive/llgltfloader.h
with
18 additions
and
12 deletions
indra/llprimitive/llgltfloader.h
+
18
−
12
View file @
125b0992
...
...
@@ -34,8 +34,10 @@
// gltf_* structs are temporary, used to organize the subset of data that eventually goes into the material LLSD
typedef
struct
// gltf sampler
{
// Uses GL enums
class
gltf_sampler
{
public:
// Uses GL enums
S32
minFilter
;
// GL_NEAREST, GL_LINEAR, GL_NEAREST_MIPMAP_NEAREST, GL_LINEAR_MIPMAP_NEAREST, GL_NEAREST_MIPMAP_LINEAR or GL_LINEAR_MIPMAP_LINEAR
S32
magFilter
;
// GL_NEAREST or GL_LINEAR
S32
wrapS
;
// GL_CLAMP_TO_EDGE, GL_MIRRORED_REPEAT or GL_REPEAT
...
...
@@ -43,10 +45,11 @@ typedef struct // gltf sampler
//S32 wrapR; // Found in some sample files, but not part of glTF 2.0 spec. Ignored.
std
::
string
name
;
// optional, currently unused
// extensions and extras are sampler optional fields that we don't support - at least initially
}
gltf_sampler
;
};
typedef
struct
// gltf image
{
// Note that glTF images are defined with row 0 at the top (opposite of OpenGL)
class
gltf_image
{
public:
// Note that glTF images are defined with row 0 at the top (opposite of OpenGL)
U8
*
data
;
// ptr to decoded image data
U32
size
;
// in bytes, regardless of channel width
U32
width
;
...
...
@@ -54,17 +57,19 @@ typedef struct // gltf image
U32
numChannels
;
// range 1..4
U32
bytesPerChannel
;
// converted from gltf "bits", expects only 8, 16 or 32 as input
U32
pixelType
;
// one of (TINYGLTF_COMPONENT_TYPE)_UNSIGNED_BYTE, _UNSIGNED_SHORT, _UNSIGNED_INT, or _FLOAT
}
gltf_image
;
};
typedef
struct
//
texture
class
gltf_
texture
{
public:
U32
imageIdx
;
U32
samplerIdx
;
LLUUID
imageUuid
=
LLUUID
::
null
;
}
gltf_texture
;
};
typedef
struct
//
render
material
class
gltf_
render
_
material
{
public:
std
::
string
name
;
// scalar values
...
...
@@ -99,15 +104,16 @@ typedef struct // render material
// This field is populated after upload
LLUUID
material_uuid
=
LLUUID
::
null
;
}
gltf_render_material
;
};
typedef
struct
//
gltf_mesh
class
gltf_mesh
{
public:
std
::
string
name
;
// TODO add mesh import DJH 2022-04
}
gltf_mesh
;
};
class
LLGLTFLoader
:
public
LLModelLoader
{
...
...
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