You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
662 B
44 lines
662 B
#pragma once
|
|
#include <string>
|
|
#include <util.hpp>
|
|
#include <cstring>
|
|
|
|
#ifdef defined _WIN32
|
|
#define GLEW_STATIC
|
|
#include <GL/glew.h>
|
|
|
|
#elif defined TARGET_OS_MAC
|
|
#include <OpenGL/gl.h>
|
|
|
|
#endif
|
|
|
|
class GL_Testing
|
|
{
|
|
public:
|
|
GL_Testing();
|
|
~GL_Testing(){};
|
|
|
|
|
|
enum Shader_Type {VERTEX, FRAGMENT};
|
|
void compile_shader(std::string file_path, Shader_Type t);
|
|
void create_program();
|
|
void create_buffers();
|
|
void transform();
|
|
void rotate(double delta);
|
|
void draw();
|
|
|
|
private:
|
|
|
|
GLuint VBO; //raw points
|
|
GLuint EBO; //link triangles
|
|
GLuint VAO;
|
|
GLuint vertex_shader;
|
|
GLuint fragment_shader;
|
|
GLuint shader_program;
|
|
|
|
GLfloat *matrix;
|
|
|
|
double counter = 0;
|
|
};
|
|
|