Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'xs/src/slic3r/GUI/GLShader.cpp')
-rw-r--r--xs/src/slic3r/GUI/GLShader.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/xs/src/slic3r/GUI/GLShader.cpp b/xs/src/slic3r/GUI/GLShader.cpp
index 903f6c347..e2995f7c3 100644
--- a/xs/src/slic3r/GUI/GLShader.cpp
+++ b/xs/src/slic3r/GUI/GLShader.cpp
@@ -214,6 +214,17 @@ bool GLShader::set_uniform(const char *name, float value) const
return false;
}
+bool GLShader::set_uniform(const char* name, const float* matrix) const
+{
+ int id = get_uniform_location(name);
+ if (id >= 0)
+ {
+ ::glUniformMatrix4fv(id, 1, GL_FALSE, (const GLfloat*)matrix);
+ return true;
+ }
+ return false;
+}
+
/*
# Set shader vector
sub SetVector