26 lines
366 B
C++
26 lines
366 B
C++
#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
|
|
};
|
|
}; |