mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 13:01:49 +00:00
add MeshData
This commit is contained in:
parent
d41ec3a019
commit
5c6b73ee2b
3 changed files with 45 additions and 4 deletions
|
|
@ -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) {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue