Compare commits

..
7 Commits
Author SHA1 Message Date
Syoyo Fujita aec35f10c0 Update README. 2017-12-03 17:19:55 +09:00
Syoyo Fujita 802b4df991 Merge branch 'validator' into jsoncpp 2017-12-03 17:17:03 +09:00
Syoyo Fujita 738a13ebf4 Use C++11 in Travis build and appveyor build. 2017-12-02 21:22:58 +09:00
Syoyo Fujita 7ce4a42fc3 Fix compilation. 2017-12-02 21:21:06 +09:00
Syoyo Fujita 0501a46612 Use C++11 flag. 2017-12-02 21:18:59 +09:00
Syoyo Fujita 836753132b Merge branch 'devel' into jsoncpp 2017-12-02 21:14:13 +09:00
Syoyo Fujita 2e21be7e19 Use json.hpp instead of picojson(W.I.P.) 2017-11-05 17:13:24 +09:00
10 changed files with 15490 additions and 1896 deletions
+1 -1
View File
@@ -40,5 +40,5 @@ script:
- export CC="${CC}-${COMPILER_VERSION}"
- export CXX="${CXX}-${COMPILER_VERSION}"
- ${CC} -v
- ${CXX} ${EXTRA_CXXFLAGS} -Wall -g -o loader_example loader_example.cc
- ${CXX} ${EXTRA_CXXFLAGS} -std=c++11 -Wall -g -o loader_example loader_example.cc
- ./loader_example ./models/Cube/Cube.gltf
+1 -1
View File
@@ -3,7 +3,7 @@
#EXTRA_CXXFLAGS := -fsanitize=address -Wall -Werror -Weverything -Wno-c++11-long-long -DTINYGLTF_APPLY_CLANG_WEVERYTHING
all:
clang++ $(EXTRA_CXXFLAGS) -g -O0 -o loader_example loader_example.cc
clang++ $(EXTRA_CXXFLAGS) -std=c++11 -g -O0 -o loader_example loader_example.cc
lint:
./cpplint.py tiny_gltf_loader.h
+6 -5
View File
@@ -1,6 +1,6 @@
# Header only C++ tiny glTF library(loader/saver).
`TinyGLTF` is a header only C++ glTF 2.0 https://github.com/KhronosGroup/glTF library.
`TinyGLTF` is a header only C++11 glTF 2.0 https://github.com/KhronosGroup/glTF library.
## Status
@@ -14,7 +14,7 @@ Work in process(`devel` branch). Very near to release, but need more tests and e
## Features
* Written in portable C++. C++-03 with STL dependency only.
* Written in portable C++. C++-11 with STL dependency only.
* [x] macOS + clang(LLVM)
* [x] iOS + clang
* [x] Linux + gcc/clang
@@ -40,11 +40,12 @@ Work in process(`devel` branch). Very near to release, but need more tests and e
## Examples
* [glview](examples/glview) : Simple glTF geometry viewer.
* [validator](examples/validator) : Simple glTF validator with JSON schema.
## TODOs
* [ ] Write C++ code generator from json schema for robust parsing.
* [ ] Serialization
* [x] Serialization
* [ ] Compression/decompression(Open3DGC, etc)
* [ ] Support `extensions` and `extras` property
* [ ] HDR image?
@@ -56,14 +57,14 @@ TinyGLTF is licensed under MIT license.
TinyGLTF uses the following third party libraries.
* picojson.h : Copyright 2009-2010 Cybozu Labs, Inc. Copyright 2011-2014 Kazuho Oku
* json.hpp : Copyright (c) 2013-2017 Niels Lohmann. MIT license.
* base64 : Copyright (C) 2004-2008 René Nyffenegger
* stb_image.h : v2.08 - public domain image loader - http://nothings.org/stb_image.h
## Build and example
Copy `stb_image.h`, `picojson.h` and `tiny_gltf.h` to your project.
Copy `stb_image.h`, `json.hpp` and `tiny_gltf.h` to your project.
### Loading glTF 2.0 model
+1
View File
@@ -10,6 +10,7 @@ solution "glview"
files { "glview.cc", "trackball.cc" }
includedirs { "./" }
includedirs { "../../" }
flags "c++11"
configuration { "linux" }
linkoptions { "`pkg-config --libs glfw3`" }
+2
View File
@@ -1,5 +1,7 @@
#include "gltf-loader.h"
#include <iostream>
#define TINYGLTF_IMPLEMENTATION
#define STB_IMAGE_IMPLEMENTATION
#include "tiny_gltf.h"
-26
View File
@@ -9,32 +9,6 @@ Experimental. W.I.P.
## Requirements
* C++11 compiler
* CMake 3.2 or later
## How to build
```
$ mkdir build
$ cd build
$ cmake ..
$ make
```
## How to run
First clone glTF repo somewhere to get glTF schema JSON files.
```
$ cd ~/work # Choose your favorite dir.
$ git clone https://github.com/KhronosGroup/glTF
$ export GLTF_DIR=~/work/glTF
```
Then, specify the directory of glTF 2.0 schema JSONs and a glTF file.
```
$ ./tinygltf-validator $GLTF_DIR/specification/2.0/schema/ ../../models/Cube/Cube.gltf
```
## Third party licenses
+14722
View File
File diff suppressed because it is too large Load Diff
-1163
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -17,6 +17,7 @@ solution "TinyGLTFSolution"
kind "ConsoleApp"
language "C++"
files { sources }
flags { "c++11" }
configuration "Debug"
defines { "DEBUG" } -- -DDEBUG
+756 -700
View File
File diff suppressed because it is too large Load Diff