feat(render): style, GLSL line/text pipelines, staging batches, bitmap font
This commit is contained in:
1 parent
9a086b7d69
commit
7cbc1c9955
22 files changed
+1535
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user