提交 7e1c1792 编写于 作者: T Tom Fili

Removed the type/value setup for KHR_materials_common values. It should just be the value.

上级 fa1d62e1
......@@ -129,32 +129,8 @@ namespace GLTF
{
if (values->contains(name))
{
shared_ptr<JSONObject> object = make_shared<JSONObject>();
auto value = static_pointer_cast<JSONObject>(values->getValue(name))->getValue(kValue);
uint32_t type;
JSONType jsonType = value->getJSONType();
if (jsonType == kJSONString)
{
type = _GL(SAMPLER_2D);
}
else if (jsonType == kJSONNumber)
{
type = _GL(FLOAT);
}
else if (jsonType == kJSONArray)
{
auto array = static_pointer_cast<JSONArray>(value);
type = _GL(FLOAT_VEC2) + static_cast<uint32_t>(array->getCount() - 2);
}
else
{
return;
}
object->setUnsignedInt32(kType, type);
object->setValue(kValue, value);
materialsCommonValues->setValue(name, object);
materialsCommonValues->setValue(name, value);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册