Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brad/fix gltfmaterial tests #1389

Merged
merged 1 commit into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions indra/llprimitive/llgltfmaterial.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,20 @@ class LLGLTFMaterial : public LLRefCount
F32 mRoughnessFactor = 1.f;
F32 mAlphaCutoff = 0.5f;

bool mDoubleSided = false;
AlphaMode mAlphaMode = ALPHA_MODE_OPAQUE;

bool mDoubleSided = false;

// override specific flags for state that can't use off-by-epsilon or UUID hack
bool mOverrideDoubleSided = 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
LLUUID getHash() const;

Expand Down Expand Up @@ -229,10 +236,6 @@ class LLGLTFMaterial : public LLRefCount
virtual bool replaceLocalTexture(const LLUUID& tracking_id, const LLUUID &old_id, const LLUUID& new_id);
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:
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);
Expand Down
2 changes: 1 addition & 1 deletion indra/llprimitive/tests/llgltfmaterial_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ namespace tut
#if LL_WINDOWS
// 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
ensure_equals("fields supported for GLTF (sizeof check)", sizeof(LLGLTFMaterial), 216);
ensure_equals("fields supported for GLTF (sizeof check)", sizeof(LLGLTFMaterial), 224);
#endif
#endif
ensure_equals("LLGLTFMaterial texture info count", (U32)LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT, 4);
Expand Down
Loading