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

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-03-20 16:48:17 +0300
committerbubnikv <bubnikv@gmail.com>2017-03-20 16:48:17 +0300
commit039cd0ac5b137e967fcfbfa037af84af4b9280bb (patch)
treeccbbd0beb610db88a522362c6eaa476b6841c287 /xs/src/slic3r/GUI/GLShader.hpp
parent045de596e2ff1ad6d7cc44888d8e7bbc25b4c9f8 (diff)
new GLShader.cpp,h
Diffstat (limited to 'xs/src/slic3r/GUI/GLShader.hpp')
-rw-r--r--xs/src/slic3r/GUI/GLShader.hpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/xs/src/slic3r/GUI/GLShader.hpp b/xs/src/slic3r/GUI/GLShader.hpp
new file mode 100644
index 000000000..d91463f19
--- /dev/null
+++ b/xs/src/slic3r/GUI/GLShader.hpp
@@ -0,0 +1,38 @@
+#ifndef slic3r_GLShader_hpp_
+#define slic3r_GLShader_hpp_
+
+#include "../../libslic3r/libslic3r.h"
+#include "../../libslic3r/Point.hpp"
+
+namespace Slic3r {
+
+class GLShader
+{
+public:
+ GLShader() :
+ fragment_program_id(0),
+ vertex_program_id(0),
+ shader_program_id(0)
+ {}
+ ~GLShader();
+
+ bool load(const char *fragment_shader, const char *vertex_shader);
+ void release();
+
+ int get_attrib_location(const char *name) const;
+ int get_uniform_location(const char *name) const;
+
+ bool set_uniform(const char *name, float value) const;
+
+ void enable() const;
+ void disable() const;
+
+ unsigned int fragment_program_id;
+ unsigned int vertex_program_id;
+ unsigned int shader_program_id;
+ std::string last_error;
+};
+
+}
+
+#endif /* slic3r_GLShader_hpp_ */