mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-02-20 08:14:55 -05:00
34 lines
547 B
C++
34 lines
547 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
#include <GL/glew.h>
|
|
#include <glm/glm.hpp>
|
|
|
|
namespace wowee {
|
|
namespace rendering {
|
|
|
|
struct Vertex {
|
|
glm::vec3 position;
|
|
glm::vec3 normal;
|
|
glm::vec2 texCoord;
|
|
};
|
|
|
|
class Mesh {
|
|
public:
|
|
Mesh() = default;
|
|
~Mesh();
|
|
|
|
void create(const std::vector<Vertex>& vertices, const std::vector<uint32_t>& indices);
|
|
void destroy();
|
|
void draw() const;
|
|
|
|
private:
|
|
GLuint VAO = 0;
|
|
GLuint VBO = 0;
|
|
GLuint EBO = 0;
|
|
size_t indexCount = 0;
|
|
};
|
|
|
|
} // namespace rendering
|
|
} // namespace wowee
|