diff --git a/modules/asset_loader/src/vkcv/asset/asset_loader.cpp b/modules/asset_loader/src/vkcv/asset/asset_loader.cpp index 671fd4209fbbc1d793e832af472381f471c6316e..c34a25c3bbd302729bee140cdaa13b37fdcf8b60 100644 --- a/modules/asset_loader/src/vkcv/asset/asset_loader.cpp +++ b/modules/asset_loader/src/vkcv/asset/asset_loader.cpp @@ -313,7 +313,7 @@ int loadScene(const std::string &path, Scene &scene){ } const size_t numVertexGroups = objectMesh.primitives.size(); - vertexGroups.reserve(numVertexGroups); + vertexGroups.reserve(numVertexGroups); // FIXME this is a bug vertexGroups.push_back({ static_cast<PrimitiveMode>(objectPrimitive.mode), @@ -349,6 +349,8 @@ int loadScene(const std::string &path, Scene &scene){ for(int k = 0; k < sceneObjects.textures.size(); k++){ const fx::gltf::Texture &tex = sceneObjects.textures[k]; const fx::gltf::Image &img = sceneObjects.images[tex.source]; + // TODO Image objects in glTF can have a URI _or_ a bufferView and + // a mimeType; but here we are assuming to always find a URI. std::string img_uri = dir + "/" + img.uri; int w, h, c; uint8_t *data = stbi_load(img_uri.c_str(), &w, &h, &c, 4); @@ -391,7 +393,7 @@ int loadScene(const std::string &path, Scene &scene){ // materials textureMask like this: // mat.textureMask |= bitflag(asset::normal); materials.push_back({ - 0, + 0, // TODO material.pbrMetallicRoughness.baseColorTexture.index, material.pbrMetallicRoughness.metallicRoughnessTexture.index, material.normalTexture.index, diff --git a/projects/first_scene/src/main.cpp b/projects/first_scene/src/main.cpp index 00a862cfd77b522e9d83b51e703ea48ce45e5d5c..9927c3fd62ec951afd3e97122647d65f964c25fa 100644 --- a/projects/first_scene/src/main.cpp +++ b/projects/first_scene/src/main.cpp @@ -59,7 +59,7 @@ int main(int argc, const char** argv) { } else { std::cout << "Mesh loading failed: " << result << std::endl; - return 1; + return EXIT_FAILURE; } assert(!scene.vertexGroups.empty());