Initial commit
This commit is contained in:
commit
fce29361f6
35 changed files with 59905 additions and 0 deletions
25
include/shaders/shader.hpp
Normal file
25
include/shaders/shader.hpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#pragma once
|
||||
|
||||
#include "glad.h"
|
||||
#include "glfw3.h"
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
class Shader {
|
||||
public:
|
||||
unsigned int programID;
|
||||
std::string vertexFile;
|
||||
std::string fragmentFile;
|
||||
|
||||
long fragmentModTimeOnLoad;
|
||||
|
||||
Shader();
|
||||
void Unload();
|
||||
void ReloadFromFile();
|
||||
static Shader LoadShader(std::string fileVertexShader, std::string fileFragmentShader);
|
||||
|
||||
private:
|
||||
static bool CompileShader(unsigned int shaderId, char(&infoLog)[512]);
|
||||
static bool LinkProgram(unsigned int programID, char(&infoLog)[512]);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue