mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-12 23:39:01 +08:00
BufferView.byteOffset is optional(default = 0).
This commit is contained in:
parent
d941f6d1eb
commit
d17ff66b3d
@ -399,6 +399,12 @@ struct BufferView{
|
|||||||
int target; // ["ARRAY_BUFFER", "ELEMENT_ARRAY_BUFFER"]
|
int target; // ["ARRAY_BUFFER", "ELEMENT_ARRAY_BUFFER"]
|
||||||
int pad0;
|
int pad0;
|
||||||
Value extras;
|
Value extras;
|
||||||
|
|
||||||
|
BufferView()
|
||||||
|
: byteOffset(0)
|
||||||
|
, byteStride(4)
|
||||||
|
{}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Accessor {
|
struct Accessor {
|
||||||
@ -1620,8 +1626,8 @@ static bool ParseBufferView(BufferView *bufferView, std::string *err,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
double byteOffset;
|
double byteOffset = 0.0;
|
||||||
if (!ParseNumberProperty(&byteOffset, err, o, "byteOffset", true)) {
|
if (!ParseNumberProperty(&byteOffset, err, o, "byteOffset", false)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user