Skip to content

Commit

Permalink
another commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tkpmonke committed Nov 17, 2024
1 parent 993f936 commit 5f974ea
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/ignition/modules/rendering/meshrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,19 @@ namespace Ignition::Rendering {

std::vector<float> 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]);
}
}


Expand Down
16 changes: 16 additions & 0 deletions utils/hub/hub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 5f974ea

Please # to comment.