glsl-basic/src/graphics.hpp

24 lines
483 B
C++
Raw Normal View History

2023-10-18 17:03:13 +02:00
#ifndef GRAPHICS_HPP
#define GRAPHICS_HPP
#include <GLFW/glfw3.h>
#include <iostream>
#include <string>
class ShaderProgram {
public:
enum Base { Empty, Triangle };
std::string baseName();
2023-10-20 10:52:56 +02:00
ShaderProgram(Base base, char** vertexSource, char** fragSource);
2023-10-18 17:03:13 +02:00
int run();
protected:
unsigned int vertex;
unsigned int frag;
Base base;
};
2023-10-20 11:20:01 +02:00
int mainWindow(ShaderProgram* shaderProgramm, GLFWwindow* window);
GLFWwindow* initGl();
void processInput(GLFWwindow *window);
2023-10-18 17:03:13 +02:00
#endif