Skip to content

Commit

Permalink
Prepare for release (#19)
Browse files Browse the repository at this point in the history
- Use better MSVC version checks
- Doc tweaks
  • Loading branch information
jessey-git committed Apr 24, 2018
1 parent 8bd6aca commit df19bdd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,14 @@ readQuotas.MaxBufferByteLength = 8 * 1024 * 1024; // default: 32mb
readQuotas.MaxFileSize = 8 * 1024 * 1024; // default: 32mb (applies to binary .glb only)
fx::gltf::Document docFromInternet = fx::gltf::LoadFromBinary("untrusted.glb", readQuotas);
```

## Safety and Robustness

* Robust automated testing

* Roundtrip testing for all models inside [glTF-Sample-Models](https://github.com/KhronosGroup/glTF-Sample-Models)
* Extensive testing of Base64 encoding and decoding
* Testing of Base64 encoding and decoding routines, including invalid Base64 inputs
* Strict required vs. optional element loading and saving

| Model Type | Status: glTF-Sample-Models |
Expand Down Expand Up @@ -225,7 +224,7 @@ $ ctest --output-on-failure -C [Debug or Release]
```

## Supported Compilers
* Microsoft Visual C++ 2017 15.6 (and possibly earlier)
* Microsoft Visual C++ 2017 15.3+ (and possibly earlier)
* Clang 5.0+
* GCC 6.1+

Expand Down
6 changes: 3 additions & 3 deletions include/fx/gltf.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <nlohmann/json.hpp>

#if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1)
#if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_MSC_VER) && _MSC_VER >= 1911)
#define FX_GLTF_HAS_CPP_17
#include <string_view>
#endif
Expand Down Expand Up @@ -294,8 +294,6 @@ namespace gltf
return documentRoot + bufferUri;
}

constexpr char const * const MimetypeApplicationOctet = "data:application/octet-stream;base64";

struct ChunkHeader
{
uint32_t chunkLength{};
Expand All @@ -318,6 +316,8 @@ namespace gltf
constexpr uint32_t GLBHeaderMagic = 0x46546c67u;
constexpr uint32_t GLBChunkJSON = 0x4e4f534au;
constexpr uint32_t GLBChunkBIN = 0x004e4942u;

constexpr char const * const MimetypeApplicationOctet = "data:application/octet-stream;base64";
} // namespace detail

namespace defaults
Expand Down
6 changes: 3 additions & 3 deletions test/src/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#include <fstream>
#include <system_error>

#if (defined(_MSC_VER) && _MSC_VER <= 1913)
#define FX_GLTF_FILESYSTEM std::experimental::filesystem
#else
#if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_MSC_VER) && _MSC_VER >= 1914)
#define FX_GLTF_FILESYSTEM std::filesystem
#else
#define FX_GLTF_FILESYSTEM std::experimental::filesystem
#endif

namespace utility
Expand Down

0 comments on commit df19bdd

Please sign in to comment.