mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
GCodeViewer -> Newer version of shader for options
This commit is contained in:
parent
aa04f0e555
commit
35190936a3
13 changed files with 187 additions and 98 deletions
|
@ -215,6 +215,26 @@ bool GLShaderProgram::set_uniform(const char* name, double value) const
|
|||
return set_uniform(name, static_cast<float>(value));
|
||||
}
|
||||
|
||||
bool GLShaderProgram::set_uniform(const char* name, const std::array<int, 2>& value) const
|
||||
{
|
||||
int id = get_uniform_location(name);
|
||||
if (id >= 0) {
|
||||
glsafe(::glUniform2iv(id, 1, static_cast<const GLint*>(value.data())));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GLShaderProgram::set_uniform(const char* name, const std::array<int, 3>& value) const
|
||||
{
|
||||
int id = get_uniform_location(name);
|
||||
if (id >= 0) {
|
||||
glsafe(::glUniform3iv(id, 1, static_cast<const GLint*>(value.data())));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GLShaderProgram::set_uniform(const char* name, const std::array<int, 4>& value) const
|
||||
{
|
||||
int id = get_uniform_location(name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue