From 822788921e0a03755e028a569b468ad8add2a272 Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Mon, 26 Jun 2017 17:54:34 +0900 Subject: [PATCH] Delete `Accessor.byteStride` field which was removed in glTF 2.0 spec. --- loader_example.cc | 2 -- tiny_gltf.h | 5 ----- 2 files changed, 7 deletions(-) diff --git a/loader_example.cc b/loader_example.cc index b07ef62..55f57ec 100644 --- a/loader_example.cc +++ b/loader_example.cc @@ -333,8 +333,6 @@ static void Dump(const tinygltf::Model &model) { << std::endl; std::cout << Indent(2) << "byteOffset : " << accessor.byteOffset << std::endl; - std::cout << Indent(2) << "byteStride : " << accessor.byteStride - << std::endl; std::cout << Indent(2) << "componentType: " << PrintComponentType(accessor.componentType) << "(" << accessor.componentType << ")" << std::endl; diff --git a/tiny_gltf.h b/tiny_gltf.h index 7bfd2b6..87f215a 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -399,7 +399,6 @@ struct Accessor { // are not supported std::string name; size_t byteOffset; - size_t byteStride; int componentType; // (required) One of TINYGLTF_COMPONENT_TYPE_*** size_t count; // required int type; // (required) One of TINYGLTF_TYPE_*** .. @@ -1654,9 +1653,6 @@ static bool ParseAccessor(Accessor *accessor, std::string *err, return false; } - double byteStride = 0.0; - ParseNumberProperty(&byteStride, err, o, "byteStride", false); - ParseStringProperty(&accessor->name, err, o, "name", false); accessor->minValues.clear(); @@ -1674,7 +1670,6 @@ static bool ParseAccessor(Accessor *accessor, std::string *err, accessor->count = static_cast(count); accessor->bufferView = static_cast(bufferView); accessor->byteOffset = static_cast(byteOffset); - accessor->byteStride = static_cast(byteStride); { int comp = static_cast(componentType);