add MeshData

This commit is contained in:
MihailRis
2024-10-24 10:11:57 +03:00
parent d41ec3a019
commit 5c6b73ee2b
3 changed files with 45 additions and 4 deletions
+3 -4
View File
@@ -1,11 +1,9 @@
#pragma once
#include <stdlib.h>
#include "typedefs.hpp"
struct vattr {
ubyte size;
};
#include "typedefs.hpp"
#include "MeshData.hpp"
class Mesh {
unsigned int vao;
@@ -15,6 +13,7 @@ class Mesh {
size_t indices;
size_t vertexSize;
public:
Mesh(const MeshData& data);
Mesh(const float* vertexBuffer, size_t vertices, const int* indexBuffer, size_t indices, const vattr* attrs);
Mesh(const float* vertexBuffer, size_t vertices, const vattr* attrs) :
Mesh(vertexBuffer, vertices, nullptr, 0, attrs) {};