Print bufferView.target.

This commit is contained in:
Syoyo Fujita 2016-06-06 01:20:32 +09:00
parent b37b7de27c
commit d286bd9ac0

View File

@ -29,6 +29,16 @@ static std::string PrintMode(int mode) {
return "**UNKNOWN**"; return "**UNKNOWN**";
} }
static std::string PrintTarget(int target) {
if (target == 34962) {
return "GL_ARRAY_BUFFER";
} else if (target == 34963) {
return "GL_ELEMENT_ARRAY_BUFFER";
} else {
return "**UNKNOWN**";
}
}
static std::string PrintType(int ty) { static std::string PrintType(int ty) {
if (ty == TINYGLTF_TYPE_SCALAR) { if (ty == TINYGLTF_TYPE_SCALAR) {
return "SCALAR"; return "SCALAR";
@ -267,6 +277,8 @@ static void Dump(const tinygltf::Scene &scene) {
<< std::endl; << std::endl;
std::cout << Indent(2) << "byteOffset : " << it->second.byteOffset std::cout << Indent(2) << "byteOffset : " << it->second.byteOffset
<< std::endl; << std::endl;
std::cout << Indent(2) << "target : " << PrintTarget(it->second.target)
<< std::endl;
} }
} }