32 lines
787 B
C++

#ifndef SHADER_HPP
#define SHADER_HPP
#include <iostream>
#include <fstream>
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <GLFW/glfw3.h>
// Shader loader helper
std::string loadShaderSource(const std::string& filepath);
// Compile a shader of given type from source code
GLuint compileShader(GLenum type, const std::string& source);
// Create a shader program from vertex and fragment shader file paths
GLuint createShaderProgram(const std::string& vertexPath, const std::string& fragmentPath);
// Create a compute shader program from compute shader file path
GLuint createComputeProgram(const std::string& computePath);
#endif // SHADER_HPP