mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
Cherry-picked a few changes from Tech ENABLE_GL_CORE_PROFILE
This commit is contained in:
parent
5ce3ec716e
commit
4fb5b1f904
5 changed files with 37 additions and 5 deletions
|
@ -317,6 +317,17 @@ void GLShaderProgram::set_uniform(int id, const Matrix4d& value) const
|
|||
set_uniform(id, (Matrix4f)value.cast<float>());
|
||||
}
|
||||
|
||||
void GLShaderProgram::set_uniform(int id, const Vec2f& value) const
|
||||
{
|
||||
if (id >= 0)
|
||||
glsafe(::glUniform2fv(id, 1, static_cast<const GLfloat*>(value.data())));
|
||||
}
|
||||
|
||||
void GLShaderProgram::set_uniform(int id, const Vec2d& value) const
|
||||
{
|
||||
set_uniform(id, static_cast<Vec2f>(value.cast<float>()));
|
||||
}
|
||||
|
||||
void GLShaderProgram::set_uniform(int id, const Vec3f& value) const
|
||||
{
|
||||
if (id >= 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue