SpiecsEngine
 
Loading...
Searching...
No Matches

◆ GltfTextures()

Spices::GltfTextures::GltfTextures ( const Json & data)
inlineexplicit

Constructor Function.

Parameters
[in]dataSpecific Json element.

Definition at line 39 of file GltfTextures.h.

40 : GltfObject(data)
41 {
43
44 m_TexturesData.resize(data.size());
45
46 for (int i = 0; i < data.size(); i++)
47 {
48 Item& item = m_TexturesData[i];
49 const Json& json = data[i];
50
51 item.format = GltfHelper::GetElementInt(json, "format", -1);
52 item.internalFormat = GltfHelper::GetElementInt(json, "internalFormat", -1);
53 item.sampler = GltfHelper::GetElementInt(json, "sampler", -1);
54 item.source = GltfHelper::GetElementInt(json, "source", -1);
55 item.target = GltfHelper::GetElementInt(json, "target", -1);
56 item.type = GltfHelper::GetElementInt(json, "type", -1);
57 }
58 }
#define SPICES_PROFILE_ZONE
static int GetElementInt(const Json::object_t &root, const char *path, int pDefault)
Get int value in Json::object_t.
GltfObject(const Json &data)
Constructor Function.
Definition GltfObject.h:33
nlohmann::json Json
using Json insteadd of nlohmann::json
Definition GltfObject.h:25
std::vector< Item > m_TexturesData
Data of Gltf Json Textures.

References GltfTextures().

Referenced by GltfTextures().