16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 00:49:19 +02:00

fixes, configurable framebuffers quality

This commit is contained in:
milek7
2018-10-14 21:52:37 +02:00
parent d8b902a364
commit dd0a9b1d77
24 changed files with 289 additions and 141 deletions

View File

@@ -5,7 +5,7 @@ namespace gl
template <typename T>
class bindable
{
private:
protected:
static bindable<T>* active;
public:

View File

@@ -8,6 +8,7 @@ void gl::glsl_common_setup()
"#define SHADOWMAP_ENABLED " + std::to_string((int)Global.gfx_shadowmap_enabled) + "\n" +
"#define ENVMAP_ENABLED " + std::to_string((int)Global.gfx_envmap_enabled) + "\n" +
"#define MOTIONBLUR_ENABLED " + std::to_string((int)Global.gfx_postfx_motionblur_enabled) + "\n" +
"#define POSTFX_ENABLED " + std::to_string((int)!Global.gfx_skippipeline) + "\n" +
"const uint MAX_LIGHTS = " + std::to_string(MAX_LIGHTS) + "U;\n" +
"const uint MAX_PARAMS = " + std::to_string(MAX_PARAMS) + "U;\n" +
R"STRING(

View File

@@ -13,6 +13,7 @@ gl::ubo::ubo(int size, int idx, GLenum hint)
void gl::ubo::bind_uniform()
{
glBindBufferBase(GL_UNIFORM_BUFFER, index, *this);
active = this;
}
gl::ubo::~ubo()