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

basic GLES working again

This commit is contained in:
milek7
2021-01-20 19:29:50 +01:00
parent 97d6547824
commit f0b364bafe
10 changed files with 398 additions and 23974 deletions

View File

@@ -231,6 +231,7 @@ gl::shader::shader(const std::string &filename)
str += "precision highp float;\n";
str += "precision highp int;\n";
str += "precision highp sampler2DShadow;\n";
str += "precision highp sampler2DArrayShadow;\n";
}
str += "vec4 FBOUT(vec4 x) { return " + (Global.gfx_shadergamma ? std::string("vec4(pow(x.rgb, vec3(1.0 / 2.2)), x.a)") : std::string("x")) + "; }\n";

View File

@@ -29,6 +29,8 @@ void gl::vao::setup_attrib(gl::buffer &buffer, int attrib, int size, int type, i
glEnableVertexAttribArray(attrib);
}
else {
if (attrib == 0)
params.clear();
params.push_back({buffer, attrib, size, type, stride, offset});
active = nullptr;
}