Fixed all my pointers

This commit is contained in:
2022-10-19 19:44:47 -07:00
parent f0cbae4cf8
commit acc9d798cb
31 changed files with 289 additions and 141 deletions

View File

@ -8,19 +8,19 @@
using namespace Dawn;
void TriangleMesh::createTriangleMesh(std::shared_ptr<Mesh> mesh) {
mesh->createBuffers(3, 3);
mesh->bufferPositions(0, std::array<glm::vec3, 3>{{
void TriangleMesh::createTriangleMesh(Mesh &mesh) {
mesh.createBuffers(3, 3);
mesh.bufferPositions(0, std::array<glm::vec3, 3>{{
glm::vec3(-1, 0, 0),
glm::vec3(0, 1, 0),
glm::vec3(1, 0, 0)
}});
mesh->bufferCoordinates(0, std::array<glm::vec2, 3>{{
mesh.bufferCoordinates(0, std::array<glm::vec2, 3>{{
glm::vec2(0, 0),
glm::vec2(0, 1),
glm::vec2(1, 0)
}});
mesh->bufferIndices(0, std::array<meshindice_t,3>{{
mesh.bufferIndices(0, std::array<meshindice_t,3>{{
0, 1, 2
}});
}