first commit
This commit is contained in:
36
src/headers/Shape.hpp
Normal file
36
src/headers/Shape.hpp
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
#include "Shader.hpp"
|
||||
|
||||
struct ShapeInfo {
|
||||
std::vector<float> vertices;
|
||||
std::vector<unsigned int> indices;
|
||||
};
|
||||
|
||||
class Shape {
|
||||
public:
|
||||
glm::vec3 rotation;
|
||||
|
||||
Shape(
|
||||
std::shared_ptr<Shader> shader,
|
||||
ShapeInfo& shapeInfo,
|
||||
glm::vec3 pos = { 0.0f, 0.0f, 0.0f }
|
||||
);
|
||||
|
||||
void draw() const;
|
||||
|
||||
private:
|
||||
std::vector<float> vertices;
|
||||
std::vector<unsigned int> indices;
|
||||
glm::vec3 pos;
|
||||
unsigned int vao;
|
||||
unsigned int vbo;
|
||||
unsigned int ebo;
|
||||
|
||||
std::shared_ptr<Shader> shader;
|
||||
};
|
||||
Reference in New Issue
Block a user