mirror of
https://github.com/ENSL/NS.git
synced 2024-11-29 07:41:53 +00:00
8ab1a69972
- add GLSL postprocessing shader to world view and have it replicate the old gamma ramp - clear framebuffer between frames to fix visual bugs outside map - remove old gamma ramp code (was disabled) and remove gamma adjustments to hud elements as they're now unaffected by the shader - additional visual preset config updates
33 lines
830 B
C++
33 lines
830 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
// Utitlity class to load, compile and attach a vertex- and fragment shader to a program
|
|
class ShaderUtil
|
|
{
|
|
|
|
private:
|
|
unsigned int mProgramId;
|
|
|
|
//unsigned int GetCompiledShader(unsigned int shader_type, const std::string& shader_source, const std::string& path);
|
|
unsigned int GetCompiledShader(unsigned int shader_type, const std::string& shader_source);
|
|
|
|
public:
|
|
ShaderUtil() {}
|
|
~ShaderUtil() {}
|
|
|
|
// Load a vertex and a fragment shader from file
|
|
//bool LoadFromFile(const std::string& vertexShaderFile, const std::string& fragmentShaderFile);
|
|
bool LoadFromString(const std::string& vertexShader, const std::string& fragmentShader);
|
|
|
|
// Use the program
|
|
void Use();
|
|
|
|
// Delete the program
|
|
void Delete();
|
|
|
|
// Give the programID
|
|
unsigned int GetProgramID() { return mProgramId; }
|
|
|
|
};
|
|
|