diff --git a/src/ignition/modules/rendering/meshrenderer.cpp b/src/ignition/modules/rendering/meshrenderer.cpp index 2c27855..60a4acd 100644 --- a/src/ignition/modules/rendering/meshrenderer.cpp +++ b/src/ignition/modules/rendering/meshrenderer.cpp @@ -34,16 +34,19 @@ namespace Ignition::Rendering { std::vector buffer; - for (int i = 0; i < this->model.vertices.size(); i+=3) - { - buffer.push_back(this->model.vertices[i]); - buffer.push_back(this->model.vertices[i+1]); - buffer.push_back(this->model.vertices[i+2]); - buffer.push_back(this->model.normals[i]); - buffer.push_back(this->model.normals[i+1]); - buffer.push_back(this->model.normals[i+2]); - buffer.push_back(this->model.uv[i]); - buffer.push_back(this->model.uv[i+1]); + if (/*this->model.vertices.size() % 3 == 0 && + this->model.normals.size() % 3 == 0*/ true) { + for (int i = 0; i < this->model.vertices.size(); i+=3) + { + buffer.push_back(this->model.vertices[i]); + buffer.push_back(this->model.vertices[i+1]); + buffer.push_back(this->model.vertices[i+2]); + buffer.push_back(this->model.normals[i]); + buffer.push_back(this->model.normals[i+1]); + buffer.push_back(this->model.normals[i+2]); + buffer.push_back(this->model.uv[i]); + buffer.push_back(this->model.uv[i+1]); + } } diff --git a/utils/hub/hub.cpp b/utils/hub/hub.cpp index 9052feb..3106de2 100644 --- a/utils/hub/hub.cpp +++ b/utils/hub/hub.cpp @@ -519,6 +519,22 @@ int main() projects << projectPath + ":" + n + "\n"; projects.close(); + + std::filesystem::create_directory(projectPath / (std::filesystem::path)"settings"); + std::ofstream app_lua(projectPath / (std::filesystem::path)"settings/app.lua"); + + app_lua << + "-- PUT ALL OF YOUR APPLICATION SPECIFIC SETTINGS HERE\n" + "local M = {\n" + " appName = \"Game\",\n" + " version = \"1.0.0\",\n" + " devName = \"Developer\",\n" + " graphicsAPI = \"opengl\" -- useless atm\n" + "}\n" + "return M"; + + app_lua.close(); + createProject = false; GetProjects(); }