skein/src/triangle.hpp

26 lines
366 B
C++
Raw Normal View History

2023-07-30 23:02:20 +02:00
#pragma once
#include <GL/glew.h>
#include <vector>
class Triangle
{
public:
Triangle(GLuint shaderProgram);
void render(float time);
~Triangle();
private:
GLuint _vbo;
GLuint _vao;
GLuint _shaderProgram;
std::vector<float> _vertices =
{
-0.5, -0.5, 0.0, // left
0.5, -0.5, 0.0, // right
0.0, 0.5, 0.0 // top
};
};