feat(render): style, GLSL line/text pipelines, staging batches, bitmap font

This commit is contained in:
Martino Ferrari committed 2026-09-27 22:03:56 +02:00
1 parent 9a086b7d69
commit 7cbc1c9955
22 files changed
+1535

No files matched your search

+20
View File
@@ -226,6 +226,26 @@ void Program::set_uniform(const char* name, Vec2 value) const noexcept {
}
}
void Program::set_uniform(const char* name, Color value) const noexcept {
if (id_ == 0 || name == nullptr) {
return;
}
const GLint location = glGetUniformLocation(id_, name);
if (location >= 0) {
glUniform4f(location, value.r, value.g, value.b, value.a);
}
}
void Program::set_uniform_int(const char* name, i32 value) const noexcept {
if (id_ == 0 || name == nullptr) {
return;
}
const GLint location = glGetUniformLocation(id_, name);
if (location >= 0) {
glUniform1i(location, value);
}
}
void Program::destroy(GLuint id) noexcept { glDeleteProgram(id); }
// ------------------------------------------------------------------ Texture