Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
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
Alchemy Viewer
Alchemy Viewer
Commits
2c1647e8
Unverified
Commit
2c1647e8
authored
11 months ago
by
nat-goodspeed
Committed by
GitHub
11 months ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #1389 from secondlife/brad/fix-gltfmaterial-tests
brad/fix gltfmaterial tests
parents
4329e953
8d537257
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/llprimitive/llgltfmaterial.h
+8
-5
8 additions, 5 deletions
indra/llprimitive/llgltfmaterial.h
indra/llprimitive/tests/llgltfmaterial_test.cpp
+1
-1
1 addition, 1 deletion
indra/llprimitive/tests/llgltfmaterial_test.cpp
with
9 additions
and
6 deletions
indra/llprimitive/llgltfmaterial.h
+
8
−
5
View file @
2c1647e8
...
@@ -122,13 +122,20 @@ class LLGLTFMaterial : public LLRefCount
...
@@ -122,13 +122,20 @@ class LLGLTFMaterial : public LLRefCount
F32
mRoughnessFactor
=
1.
f
;
F32
mRoughnessFactor
=
1.
f
;
F32
mAlphaCutoff
=
0.5
f
;
F32
mAlphaCutoff
=
0.5
f
;
bool
mDoubleSided
=
false
;
AlphaMode
mAlphaMode
=
ALPHA_MODE_OPAQUE
;
AlphaMode
mAlphaMode
=
ALPHA_MODE_OPAQUE
;
bool
mDoubleSided
=
false
;
// override specific flags for state that can't use off-by-epsilon or UUID hack
// override specific flags for state that can't use off-by-epsilon or UUID hack
bool
mOverrideDoubleSided
=
false
;
bool
mOverrideDoubleSided
=
false
;
bool
mOverrideAlphaMode
=
false
;
bool
mOverrideAlphaMode
=
false
;
// These fields are local to viewer and are a part of local bitmap support
typedef
std
::
map
<
LLUUID
,
LLUUID
>
local_tex_map_t
;
local_tex_map_t
mTrackingIdToLocalTexture
;
public
:
// get a UUID based on a hash of this LLGLTFMaterial
// get a UUID based on a hash of this LLGLTFMaterial
LLUUID
getHash
()
const
;
LLUUID
getHash
()
const
;
...
@@ -229,10 +236,6 @@ class LLGLTFMaterial : public LLRefCount
...
@@ -229,10 +236,6 @@ class LLGLTFMaterial : public LLRefCount
virtual
bool
replaceLocalTexture
(
const
LLUUID
&
tracking_id
,
const
LLUUID
&
old_id
,
const
LLUUID
&
new_id
);
virtual
bool
replaceLocalTexture
(
const
LLUUID
&
tracking_id
,
const
LLUUID
&
old_id
,
const
LLUUID
&
new_id
);
virtual
void
updateTextureTracking
();
virtual
void
updateTextureTracking
();
// These fields are local to viewer and are a part of local bitmap support
typedef
std
::
map
<
LLUUID
,
LLUUID
>
local_tex_map_t
;
local_tex_map_t
mTrackingIdToLocalTexture
;
protected
:
protected
:
static
LLVector2
vec2FromJson
(
const
std
::
map
<
std
::
string
,
tinygltf
::
Value
>&
object
,
const
char
*
key
,
const
LLVector2
&
default_value
);
static
LLVector2
vec2FromJson
(
const
std
::
map
<
std
::
string
,
tinygltf
::
Value
>&
object
,
const
char
*
key
,
const
LLVector2
&
default_value
);
static
F32
floatFromJson
(
const
std
::
map
<
std
::
string
,
tinygltf
::
Value
>&
object
,
const
char
*
key
,
const
F32
default_value
);
static
F32
floatFromJson
(
const
std
::
map
<
std
::
string
,
tinygltf
::
Value
>&
object
,
const
char
*
key
,
const
F32
default_value
);
...
...
This diff is collapsed.
Click to expand it.
indra/llprimitive/tests/llgltfmaterial_test.cpp
+
1
−
1
View file @
2c1647e8
...
@@ -143,7 +143,7 @@ namespace tut
...
@@ -143,7 +143,7 @@ namespace tut
#if LL_WINDOWS
#if LL_WINDOWS
// If any fields are added/changed, these tests should be updated (consider also updating ASSET_VERSION in LLGLTFMaterial)
// If any fields are added/changed, these tests should be updated (consider also updating ASSET_VERSION in LLGLTFMaterial)
// This test result will vary between compilers, so only test a single platform
// This test result will vary between compilers, so only test a single platform
ensure_equals
(
"fields supported for GLTF (sizeof check)"
,
sizeof
(
LLGLTFMaterial
),
2
16
);
ensure_equals
(
"fields supported for GLTF (sizeof check)"
,
sizeof
(
LLGLTFMaterial
),
2
24
);
#endif
#endif
#endif
#endif
ensure_equals
(
"LLGLTFMaterial texture info count"
,
(
U32
)
LLGLTFMaterial
::
GLTF_TEXTURE_INFO_COUNT
,
4
);
ensure_equals
(
"LLGLTFMaterial texture info count"
,
(
U32
)
LLGLTFMaterial
::
GLTF_TEXTURE_INFO_COUNT
,
4
);
...
...
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