glsl-basic/src/graphics.hpp

24 lines
529 B
C++

#ifndef GRAPHICS_HPP
#define GRAPHICS_HPP
#include <GLFW/glfw3.h>
#include <iostream>
#include <string>
class ShaderProgram {
public:
enum Base { Empty, Triangle };
std::string baseName();
static Base baseFromName(std::string name);
ShaderProgram(Base base, char** vertexSource, char** fragSource);
int run();
protected:
unsigned int vertex;
unsigned int frag;
Base base;
};
int mainWindow(ShaderProgram* shaderProgramm, GLFWwindow* window);
GLFWwindow* initGl();
void processInput(GLFWwindow *window);
#endif