Skip to content
Snippets Groups Projects
Commit df440f3f authored by Cosmic Linden's avatar Cosmic Linden
Browse files

SL-19121: Address review comments from SL-19080 phase 2

parent b66c95e4
No related branches found
No related tags found
2 merge requests!3Update to main branch,!2Rebase onto current main branch
...@@ -31,14 +31,14 @@ ...@@ -31,14 +31,14 @@
// NOTE -- this should be the one and only place tiny_gltf.h is included // NOTE -- this should be the one and only place tiny_gltf.h is included
#include "tinygltf/tiny_gltf.h" #include "tinygltf/tiny_gltf.h"
const char* LLGLTFMaterial::ASSET_VERSION = "1.1"; const char* const LLGLTFMaterial::ASSET_VERSION = "1.1";
const char* LLGLTFMaterial::ASSET_TYPE = "GLTF 2.0"; const char* const LLGLTFMaterial::ASSET_TYPE = "GLTF 2.0";
const std::array<std::string, 2> LLGLTFMaterial::ACCEPTED_ASSET_VERSIONS = { "1.0", "1.1" }; const std::array<std::string, 2> LLGLTFMaterial::ACCEPTED_ASSET_VERSIONS = { "1.0", "1.1" };
const char* GLTF_FILE_EXTENSION_TRANSFORM = "KHR_texture_transform"; const char* const GLTF_FILE_EXTENSION_TRANSFORM = "KHR_texture_transform";
const char* GLTF_FILE_EXTENSION_TRANSFORM_SCALE = "scale"; const char* const GLTF_FILE_EXTENSION_TRANSFORM_SCALE = "scale";
const char* GLTF_FILE_EXTENSION_TRANSFORM_OFFSET = "offset"; const char* const GLTF_FILE_EXTENSION_TRANSFORM_OFFSET = "offset";
const char* GLTF_FILE_EXTENSION_TRANSFORM_ROTATION = "rotation"; const char* const GLTF_FILE_EXTENSION_TRANSFORM_ROTATION = "rotation";
// special UUID that indicates a null UUID in override data // special UUID that indicates a null UUID in override data
static const LLUUID GLTF_OVERRIDE_NULL_UUID = LLUUID("ffffffff-ffff-ffff-ffff-ffffffffffff"); static const LLUUID GLTF_OVERRIDE_NULL_UUID = LLUUID("ffffffff-ffff-ffff-ffff-ffffffffffff");
......
...@@ -49,8 +49,8 @@ class LLGLTFMaterial : public LLRefCount ...@@ -49,8 +49,8 @@ class LLGLTFMaterial : public LLRefCount
// default material for reference // default material for reference
static const LLGLTFMaterial sDefault; static const LLGLTFMaterial sDefault;
static const char* ASSET_VERSION; static const char* const ASSET_VERSION;
static const char* ASSET_TYPE; static const char* const ASSET_TYPE;
static const std::array<std::string, 2> ACCEPTED_ASSET_VERSIONS; static const std::array<std::string, 2> ACCEPTED_ASSET_VERSIONS;
static bool isAcceptedVersion(const std::string& version) { return std::find(ACCEPTED_ASSET_VERSIONS.cbegin(), ACCEPTED_ASSET_VERSIONS.cend(), version) != ACCEPTED_ASSET_VERSIONS.cend(); } static bool isAcceptedVersion(const std::string& version) { return std::find(ACCEPTED_ASSET_VERSIONS.cbegin(), ACCEPTED_ASSET_VERSIONS.cend(), version) != ACCEPTED_ASSET_VERSIONS.cend(); }
......
...@@ -139,14 +139,13 @@ namespace tut ...@@ -139,14 +139,13 @@ namespace tut
template<> template<> template<> template<>
void llgltfmaterial_object_t::test<1>() void llgltfmaterial_object_t::test<1>()
{ {
if (sizeof(void*) > 4) // Don't bother running this test for 32-bit systems #if ADDRESS_SIZE != 32
{
// 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
#if LL_WINDOWS #if LL_WINDOWS
ensure_equals("fields supported for GLTF (sizeof check)", sizeof(LLGLTFMaterial), 216); // 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);
#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);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment