Introduce Math.hpp and use typedef to make replacing glm with something else in the future simpler

This commit is contained in:
2020-10-27 23:25:26 +01:00
parent c219fc3778
commit 78d24fbe41
16 changed files with 268 additions and 181 deletions

View File

@@ -119,7 +119,7 @@ namespace openVulkanoCpp
//TODO load materials
}
void InitCube(float x = 1, float y = 1, float z = 1, glm::vec4 color = glm::vec4(1))
void InitCube(float x = 1, float y = 1, float z = 1, Math::Vector4f color = Math::Vector4f(1))
{
Init(24, 36);
SetIndices(new uint32_t[indexCount]{
@@ -196,7 +196,7 @@ namespace openVulkanoCpp
void Free()
{
if(vertices) delete[] vertices;
delete[] vertices;
free(indices);
vertices = nullptr;
indices = nullptr;