OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GLShaderProgram Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/GLShader.hpp>

Collaboration diagram for Slic3r::GLShaderProgram:

Public Types

enum class  EShaderType {
  Vertex , Fragment , Geometry , TessEvaluation ,
  TessControl , Compute , Count
}
typedef std::array< std::string, static_cast< size_t >(EShaderType::Count)> ShaderFilenames
typedef std::array< std::string, static_cast< size_t >(EShaderType::Count)> ShaderSources

Public Member Functions

 ~GLShaderProgram ()
bool init_from_files (const std::string &name, const ShaderFilenames &filenames, const std::initializer_list< std::string_view > &defines={})
bool init_from_texts (const std::string &name, const ShaderSources &sources)
const std::string & get_name () const
unsigned int get_id () const
void start_using () const
void stop_using () const
void set_uniform (const char *name, int value) const
void set_uniform (const char *name, bool value) const
void set_uniform (const char *name, float value) const
void set_uniform (const char *name, double value) const
void set_uniform (const char *name, const std::array< int, 2 > &value) const
void set_uniform (const char *name, const std::array< int, 3 > &value) const
void set_uniform (const char *name, const std::array< int, 4 > &value) const
void set_uniform (const char *name, const std::array< float, 2 > &value) const
void set_uniform (const char *name, const std::array< float, 3 > &value) const
void set_uniform (const char *name, const std::array< float, 4 > &value) const
void set_uniform (const char *name, const std::array< double, 4 > &value) const
void set_uniform (const char *name, const float *value, size_t size) const
void set_uniform (const char *name, const Transform3f &value) const
void set_uniform (const char *name, const Transform3d &value) const
void set_uniform (const char *name, const Matrix3f &value) const
void set_uniform (const char *name, const Matrix3d &value) const
void set_uniform (const char *name, const Matrix4f &value) const
void set_uniform (const char *name, const Matrix4d &value) const
void set_uniform (const char *name, const Vec2f &value) const
void set_uniform (const char *name, const Vec2d &value) const
void set_uniform (const char *name, const Vec3f &value) const
void set_uniform (const char *name, const Vec3d &value) const
void set_uniform (const char *name, const ColorRGB &value) const
void set_uniform (const char *name, const ColorRGBA &value) const
void set_uniform (int id, int value) const
void set_uniform (int id, bool value) const
void set_uniform (int id, float value) const
void set_uniform (int id, double value) const
void set_uniform (int id, const std::array< int, 2 > &value) const
void set_uniform (int id, const std::array< int, 3 > &value) const
void set_uniform (int id, const std::array< int, 4 > &value) const
void set_uniform (int id, const std::array< float, 2 > &value) const
void set_uniform (int id, const std::array< float, 3 > &value) const
void set_uniform (int id, const std::array< float, 4 > &value) const
void set_uniform (int id, const std::array< double, 4 > &value) const
void set_uniform (int id, const float *value, size_t size) const
void set_uniform (int id, const Transform3f &value) const
void set_uniform (int id, const Transform3d &value) const
void set_uniform (int id, const Matrix3f &value) const
void set_uniform (int id, const Matrix3d &value) const
void set_uniform (int id, const Matrix4f &value) const
void set_uniform (int id, const Matrix4d &value) const
void set_uniform (int id, const Vec2f &value) const
void set_uniform (int id, const Vec2d &value) const
void set_uniform (int id, const Vec3f &value) const
void set_uniform (int id, const Vec3d &value) const
void set_uniform (int id, const ColorRGB &value) const
void set_uniform (int id, const ColorRGBA &value) const
int get_attrib_location (const char *name) const
int get_uniform_location (const char *name) const

Private Attributes

std::string m_name
unsigned int m_id { 0 }
std::vector< std::pair< std::string, int > > m_attrib_location_cache
std::vector< std::pair< std::string, int > > m_uniform_location_cache

Detailed Description

Member Typedef Documentation

◆ ShaderFilenames

typedef std::array<std::string, static_cast<size_t>(EShaderType::Count)> Slic3r::GLShaderProgram::ShaderFilenames

◆ ShaderSources

typedef std::array<std::string, static_cast<size_t>(EShaderType::Count)> Slic3r::GLShaderProgram::ShaderSources

Member Enumeration Documentation

◆ EShaderType

Enumerator
Vertex 
Fragment 
Geometry 
TessEvaluation 
TessControl 
Compute 
Count 
23 {
24 Vertex,
25 Fragment,
26 Geometry,
27 TessEvaluation,
28 TessControl,
29 Compute,
30 Count
31 };
Mesh::Vertex_index Vertex
Definition MeshRepair.cpp:84
@ Count
Definition ArcFitter.hpp:18

Constructor & Destructor Documentation

◆ ~GLShaderProgram()

Slic3r::GLShaderProgram::~GLShaderProgram ( )
27{
28 if (m_id > 0)
30}
#define glsafe(cmd)
Definition OpenGLUtils.hpp:25
unsigned int m_id
Definition GLShader.hpp:38
#define glDeleteProgram
Definition gl.h:3571

References glDeleteProgram, glsafe, and m_id.

Member Function Documentation

◆ get_attrib_location()

int Slic3r::GLShaderProgram::get_attrib_location ( const char * name) const
362{
363 assert(m_id > 0);
364
365 if (m_id <= 0)
366 // Shader program not loaded. This should not happen.
367 return -1;
368
369 auto it = std::find_if(m_attrib_location_cache.begin(), m_attrib_location_cache.end(), [name](const auto& p) { return p.first == name; });
370 if (it != m_attrib_location_cache.end())
371 // Attrib ID cached.
372 return it->second;
373
374 int id = ::glGetAttribLocation(m_id, name);
375 const_cast<GLShaderProgram*>(this)->m_attrib_location_cache.push_back({ name, id });
376 return id;
377}
std::vector< std::pair< std::string, int > > m_attrib_location_cache
Definition GLShader.hpp:39
#define glGetAttribLocation
Definition gl.h:3821

References glGetAttribLocation, m_attrib_location_cache, and m_id.

Referenced by Slic3r::GUI::GLMmSegmentationGizmo3DScene::render(), Slic3r::GUI::GLModel::render(), Slic3r::GUI::TriangleSelectorPatch::render(), Slic3r::GUI::ImGuiWrapper::render_draw_data(), and Slic3r::GUI::GLModel::render_instanced().

Here is the caller graph for this function:

◆ get_id()

unsigned int Slic3r::GLShaderProgram::get_id ( ) const
inline
49{ return m_id; }

References m_id.

◆ get_name()

const std::string & Slic3r::GLShaderProgram::get_name ( ) const
inline
48{ return m_name; }
std::string m_name
Definition GLShader.hpp:37

References m_name.

Referenced by Slic3r::GUI::GLCanvas3D::_render_objects(), and Slic3r::GUI::GLModel::render_instanced().

Here is the caller graph for this function:

◆ get_uniform_location()

int Slic3r::GLShaderProgram::get_uniform_location ( const char * name) const
380{
381 assert(m_id > 0);
382
383 if (m_id <= 0)
384 // Shader program not loaded. This should not happen.
385 return -1;
386
387 auto it = std::find_if(m_uniform_location_cache.begin(), m_uniform_location_cache.end(), [name](const auto &p) { return p.first == name; });
388 if (it != m_uniform_location_cache.end())
389 // Uniform ID cached.
390 return it->second;
391
392 int id = ::glGetUniformLocation(m_id, name);
393 const_cast<GLShaderProgram*>(this)->m_uniform_location_cache.push_back({ name, id });
394 return id;
395}
std::vector< std::pair< std::string, int > > m_uniform_location_cache
Definition GLShader.hpp:40
#define glGetUniformLocation
Definition gl.h:4049

References glGetUniformLocation, m_id, and m_uniform_location_cache.

Referenced by Slic3r::GLVolumeCollection::render(), Slic3r::GLVolume::render_with_outline(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), and set_uniform().

Here is the caller graph for this function:

◆ init_from_files()

bool Slic3r::GLShaderProgram::init_from_files ( const std::string & name,
const ShaderFilenames & filenames,
const std::initializer_list< std::string_view > & defines = {} )
33{
34 // Load a shader program from file, prepend defs block.
35 auto load_from_file = [](const std::string& filename, const std::string &defs) {
36 std::string path = resources_dir() + "/shaders/" + filename;
37 boost::nowide::ifstream s(path, boost::nowide::ifstream::binary);
38 if (!s.good()) {
39 BOOST_LOG_TRIVIAL(error) << "Couldn't open file: '" << path << "'";
40 return std::string();
41 }
42
43 s.seekg(0, s.end);
44 int file_length = static_cast<int>(s.tellg());
45 s.seekg(0, s.beg);
46 std::string source(defs.size() + file_length, '\0');
47 memcpy(source.data(), defs.c_str(), defs.size());
48 s.read(source.data() + defs.size(), file_length);
49 if (!s.good()) {
50 BOOST_LOG_TRIVIAL(error) << "Error while loading file: '" << path << "'";
51 return std::string();
52 }
53 s.close();
54
55 if (! defs.empty()) {
56 // Extract the version and flip the order of "defines" and version in the source block.
57 size_t idx = source.find("\n", defs.size());
58 if (idx != std::string::npos && strncmp(source.c_str() + defs.size(), "#version", 8) == 0) {
59 // Swap the version line with the defines.
60 size_t len = idx - defs.size() + 1;
61 memmove(source.data(), source.c_str() + defs.size(), len);
62 memcpy(source.data() + len, defs.c_str(), defs.size());
63 }
64 }
65
66 return source;
67 };
68
69 // Create a block of C "defines" from list of symbols.
70 std::string defines_program;
71 for (std::string_view def : defines)
72 // Our shaders are stored with "\r\n", thus replicate the same here for consistency. Likely "\n" would suffice,
73 // but we don't know all the OpenGL shader compilers around.
74 defines_program += format("#define %s\r\n", def);
75
76 ShaderSources sources = {};
77 for (size_t i = 0; i < static_cast<size_t>(EShaderType::Count); ++i) {
78 sources[i] = filenames[i].empty() ? std::string() : load_from_file(filenames[i], defines_program);
79 }
80
81 bool valid = !sources[static_cast<size_t>(EShaderType::Vertex)].empty() && !sources[static_cast<size_t>(EShaderType::Fragment)].empty() && sources[static_cast<size_t>(EShaderType::Compute)].empty();
82 valid |= !sources[static_cast<size_t>(EShaderType::Compute)].empty() && sources[static_cast<size_t>(EShaderType::Vertex)].empty() && sources[static_cast<size_t>(EShaderType::Fragment)].empty() &&
83 sources[static_cast<size_t>(EShaderType::Geometry)].empty() && sources[static_cast<size_t>(EShaderType::TessEvaluation)].empty() && sources[static_cast<size_t>(EShaderType::TessControl)].empty();
84
85 return valid ? init_from_texts(name, sources) : false;
86}
std::array< std::string, static_cast< size_t >(EShaderType::Count)> ShaderSources
Definition GLShader.hpp:34
@ Fragment
Definition GLShader.hpp:25
@ TessEvaluation
Definition GLShader.hpp:27
@ TessControl
Definition GLShader.hpp:28
@ Compute
Definition GLShader.hpp:29
@ Vertex
Definition GLShader.hpp:24
@ Geometry
Definition GLShader.hpp:26
@ Count
Definition GLShader.hpp:30
bool init_from_texts(const std::string &name, const ShaderSources &sources)
Definition GLShader.cpp:88
const std::string & resources_dir()
Definition utils.cpp:296
std::string format(const char *fmt, TArgs &&... args)
Definition format.hpp:45
bool empty(const BoundingBoxBase< PointType, PointsType > &bb)
Definition BoundingBox.hpp:273

References Compute, Count, Slic3r::empty(), Slic3r::format(), Fragment, Geometry, init_from_texts(), Slic3r::resources_dir(), TessControl, TessEvaluation, and Vertex.

Here is the call graph for this function:

◆ init_from_texts()

bool Slic3r::GLShaderProgram::init_from_texts ( const std::string & name,
const ShaderSources & sources )
89{
90 auto shader_type_as_string = [](EShaderType type) {
91 switch (type)
92 {
93 case EShaderType::Vertex: { return "vertex"; }
94 case EShaderType::Fragment: { return "fragment"; }
95 case EShaderType::Geometry: { return "geometry"; }
96 case EShaderType::TessEvaluation: { return "tesselation evaluation"; }
97 case EShaderType::TessControl: { return "tesselation control"; }
98 case EShaderType::Compute: { return "compute"; }
99 default: { return "unknown"; }
100 }
101 };
102
103 auto create_shader = [](EShaderType type) {
104 GLuint id = 0;
105 switch (type)
106 {
113 default: { break; }
114 }
115
116 return (id == 0) ? std::make_pair(false, GLuint(0)) : std::make_pair(true, id);
117 };
118
119 auto release_shaders = [](const std::array<GLuint, static_cast<size_t>(EShaderType::Count)>& shader_ids) {
120 for (size_t i = 0; i < static_cast<size_t>(EShaderType::Count); ++i) {
121 if (shader_ids[i] > 0)
122 glsafe(::glDeleteShader(shader_ids[i]));
123 }
124 };
125
126 assert(m_id == 0);
127
128 m_name = name;
129
130 std::array<GLuint, static_cast<size_t>(EShaderType::Count)> shader_ids = { 0 };
131
132 for (size_t i = 0; i < static_cast<size_t>(EShaderType::Count); ++i) {
133 const std::string& source = sources[i];
134 if (!source.empty()) {
135 EShaderType type = static_cast<EShaderType>(i);
136 auto [result, id] = create_shader(type);
137 if (result)
138 shader_ids[i] = id;
139 else {
140 BOOST_LOG_TRIVIAL(error) << "glCreateShader() failed for " << shader_type_as_string(type) << " shader of shader program '" << name << "'";
141
142 // release shaders
143 release_shaders(shader_ids);
144 return false;
145 }
146
147 const char* source_ptr = source.c_str();
148 glsafe(::glShaderSource(id, 1, &source_ptr, nullptr));
150 GLint params;
152 if (params == GL_FALSE) {
153 // Compilation failed.
155 std::vector<char> msg(params);
156 glsafe(::glGetShaderInfoLog(id, params, &params, msg.data()));
157 BOOST_LOG_TRIVIAL(error) << "Unable to compile " << shader_type_as_string(type) << " shader of shader program '" << name << "':\n" << msg.data();
158
159 // release shaders
160 release_shaders(shader_ids);
161 return false;
162 }
163 }
164 }
165
167 glcheck();
168 if (m_id == 0) {
169 BOOST_LOG_TRIVIAL(error) << "glCreateProgram() failed for shader program '" << name << "'";
170
171 // release shaders
172 release_shaders(shader_ids);
173 return false;
174 }
175
176 for (size_t i = 0; i < static_cast<size_t>(EShaderType::Count); ++i) {
177 if (shader_ids[i] > 0)
178 glsafe(::glAttachShader(m_id, shader_ids[i]));
179 }
180
182 GLint params;
184 if (params == GL_FALSE) {
185 // Linking failed.
187 std::vector<char> msg(params);
188 glsafe(::glGetProgramInfoLog(m_id, params, &params, msg.data()));
189 BOOST_LOG_TRIVIAL(error) << "Unable to link shader program '" << name << "':\n" << msg.data();
190
191 // release shaders
192 release_shaders(shader_ids);
193
194 // release shader program
196 m_id = 0;
197
198 return false;
199 }
200
201 // release shaders, they are no more needed
202 release_shaders(shader_ids);
203
204 return true;
205}
#define glcheck()
Definition OpenGLUtils.hpp:26
EShaderType
Definition GLShader.hpp:23
#define glAttachShader
Definition gl.h:3253
#define GL_FRAGMENT_SHADER
Definition gl.h:701
#define GL_GEOMETRY_SHADER
Definition gl.h:773
#define glGetShaderInfoLog
Definition gl.h:3979
#define glShaderSource
Definition gl.h:4769
#define GL_TESS_CONTROL_SHADER
Definition gl.h:1688
#define glCreateShader
Definition gl.h:3545
#define glGetProgramiv
Definition gl.h:3945
int GLint
Definition gl.h:2062
#define GL_COMPUTE_SHADER
Definition gl.h:467
#define GL_COMPILE_STATUS
Definition gl.h:431
unsigned int GLuint
Definition gl.h:2063
#define GL_TESS_EVALUATION_SHADER
Definition gl.h:1694
#define GL_FALSE
Definition gl.h:648
#define glDeleteShader
Definition gl.h:3583
#define GL_VERTEX_SHADER
Definition gl.h:2014
#define glCompileShader
Definition gl.h:3487
#define glCreateProgram
Definition gl.h:3535
#define glGetProgramInfoLog
Definition gl.h:3925
#define glLinkProgram
Definition gl.h:4217
#define GL_LINK_STATUS
Definition gl.h:950
#define glGetShaderiv
Definition gl.h:3985
#define GL_INFO_LOG_LENGTH
Definition gl.h:848

References Compute, Count, Fragment, Geometry, GL_COMPILE_STATUS, GL_COMPUTE_SHADER, GL_FALSE, GL_FRAGMENT_SHADER, GL_GEOMETRY_SHADER, GL_INFO_LOG_LENGTH, GL_LINK_STATUS, GL_TESS_CONTROL_SHADER, GL_TESS_EVALUATION_SHADER, GL_VERTEX_SHADER, glAttachShader, glcheck, glCompileShader, glCreateProgram, glCreateShader, glDeleteProgram, glDeleteShader, glGetProgramInfoLog, glGetProgramiv, glGetShaderInfoLog, glGetShaderiv, glLinkProgram, glsafe, glShaderSource, m_id, m_name, TessControl, TessEvaluation, and Vertex.

Referenced by init_from_files().

Here is the caller graph for this function:

◆ set_uniform() [1/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
bool value ) const
inline
55{ set_uniform(get_uniform_location(name), value); }
void set_uniform(const char *name, int value) const
Definition GLShader.hpp:54
int get_uniform_location(const char *name) const
Definition GLShader.cpp:379

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [2/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const ColorRGB & value ) const
inline
76{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [3/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const ColorRGBA & value ) const
inline
77{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [4/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const float * value,
size_t size ) const
inline
65{ set_uniform(get_uniform_location(name), value, size); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [5/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const Matrix3d & value ) const
inline
69{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [6/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const Matrix3f & value ) const
inline
68{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [7/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const Matrix4d & value ) const
inline
71{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [8/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const Matrix4f & value ) const
inline
70{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [9/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const std::array< double, 4 > & value ) const
inline
64{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [10/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const std::array< float, 2 > & value ) const
inline
61{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [11/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const std::array< float, 3 > & value ) const
inline
62{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [12/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const std::array< float, 4 > & value ) const
inline
63{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [13/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const std::array< int, 2 > & value ) const
inline
58{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [14/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const std::array< int, 3 > & value ) const
inline
59{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [15/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const std::array< int, 4 > & value ) const
inline
60{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [16/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const Transform3d & value ) const
inline
67{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [17/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const Transform3f & value ) const
inline
66{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [18/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const Vec2d & value ) const
inline
73{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [19/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const Vec2f & value ) const
inline
72{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [20/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const Vec3d & value ) const
inline
75{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [21/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
const Vec3f & value ) const
inline
74{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [22/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
double value ) const
inline
57{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [23/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
float value ) const
inline
56{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by set_uniform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_uniform() [24/48]

void Slic3r::GLShaderProgram::set_uniform ( const char * name,
int value ) const
inline
54{ set_uniform(get_uniform_location(name), value); }

References get_uniform_location(), and set_uniform().

Referenced by Slic3r::GUI::GLCanvas3D::_render_background(), Slic3r::GUI::GLCanvas3D::_render_below_plate_volumes(), Slic3r::GUI::GLCanvas3D::_render_cad_grid(), Slic3r::GUI::GLCanvas3D::_render_fxaa_pass(), Slic3r::GUI::GLCanvas3D::_render_imex_ghosts(), Slic3r::GUI::GLCanvas3D::_render_imex_ghosts_xray(), Slic3r::GUI::GLCanvas3D::_render_objects(), Slic3r::GUI::GLCanvas3D::_render_shadows(), Slic3r::GUI::GLCanvas3D::_render_sla_slices(), Slic3r::GUI::GLCanvas3D::_render_ssao_pass(), Slic3r::GUI::GLCanvas3D::_render_volumes_for_picking(), Slic3r::GUI::GLCanvas3D::_render_wireframe_overlay(), Slic3r::GUI::GLGizmoFlatten::on_render(), Slic3r::GUI::GLGizmoMeasure::on_render(), Slic3r::GUI::GLGizmoMove3D::on_render(), Slic3r::GUI::GLGizmoRotate::on_render(), Slic3r::GUI::GLGizmoScale3D::on_render(), Slic3r::GLVolume::SinkingContours::render(), Slic3r::GLVolumeCollection::render(), Slic3r::GUI::Bed3D::Axes::render(), Slic3r::GUI::DesignSketchTool::render(), Slic3r::GUI::GCodeViewer::SequentialView::Marker::render(), Slic3r::GUI::GLCanvas3D::SequentialPrintClearance::render(), Slic3r::GUI::GLGizmoBase::Grabber::render(), Slic3r::GUI::GLModel::render(), Slic3r::GUI::GLSelectionRectangle::render(), Slic3r::GUI::PartPlate::render(), Slic3r::GUI::SceneCache::render(), Slic3r::GUI::TextLinesModel::render(), Slic3r::GUI::UVEditorCanvas::render(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_active_object_annotations(), Slic3r::GUI::GLGizmoTextureDisplacement::render_adjust_texture_gizmo(), Slic3r::GUI::GLGizmoMove3D::render_align_preview(), Slic3r::GUI::Selection::render_bounding_box(), Slic3r::GUI::MeshClipper::render_contour(), Slic3r::GUI::GLGizmoPainterBase::render_cursor_circle(), Slic3r::GUI::GLGizmoPainterBase::render_cursor_height_range(), Slic3r::GUI::GLGizmoPainterBase::render_cursor_sphere(), Slic3r::GUI::MeshClipper::render_cut(), Slic3r::GUI::GLGizmoCut3D::render_cut_plane(), Slic3r::GUI::Bed3D::render_default(), Slic3r::GUI::GLGizmoMeasure::render_dimensioning(), Slic3r::GUI::ImGuiWrapper::render_draw_data(), Slic3r::GUI::PartPlateList::render_exclusion_volume_intersections(), Slic3r::GUI::GLGizmoBase::render_grabbers(), Slic3r::GUI::Bed3D::render_gravity_arrow(), Slic3r::GUI::PartPlate::render_grid(), Slic3r::GUI::PartPlate::render_icons(), Slic3r::GUI::GLModel::render_instanced(), Slic3r::GUI::GLGizmoTextureDisplacement::render_island_overlay(), Slic3r::GUI::GLGizmoCut3D::render_line(), Slic3r::GUI::PartPlate::render_logo_texture(), Slic3r::GUI::GCodeViewer::render_markers(), Slic3r::GUI::Bed3D::render_model(), Slic3r::GUI::GLGizmoCut3D::render_model(), Slic3r::GUI::PartPlate::render_only_numbers(), Slic3r::GUI::GLGizmoTextureDisplacement::render_paint_overlay(), Slic3r::GUI::GLGizmoTextureDisplacement::render_painted_colors(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_profile(), Slic3r::GUI::GLGizmoCut3D::render_rotation_snapping(), Slic3r::GUI::GLGizmoTextureDisplacement::render_seam_overlay(), Slic3r::GUI::GLGizmoTextureDisplacement::render_shaded_preview_mesh(), Slic3r::GUI::GCodeViewer::render_shells(), Slic3r::GUI::Selection::render_sidebar_hints(), Slic3r::GUI::Selection::render_sidebar_layers_hints(), Slic3r::GUI::Selection::render_sidebar_position_hints(), Slic3r::GUI::Selection::render_sidebar_rotation_hints(), Slic3r::GUI::Selection::render_sidebar_scale_hints(), Slic3r::GUI::GLTexture::render_sub_texture(), Slic3r::GUI::GLGizmoTextureDisplacement::render_subdivide_preview(), Slic3r::GUI::GLCanvas3D::render_thumbnail_internal(), Slic3r::GUI::GLGizmoTextureDisplacement::render_uvcheck_mesh(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_volumes(), Slic3r::GUI::GLGizmoTextureDisplacement::render_wireframe_overlay(), Slic3r::GLVolume::render_with_outline(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), set_uniform(), and set_uniform().

Here is the call graph for this function:

◆ set_uniform() [25/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
bool value ) const
225{
226 set_uniform(id, value ? 1 : 0);
227}

References set_uniform().

Here is the call graph for this function:

◆ set_uniform() [26/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const ColorRGB & value ) const
352{
353 set_uniform(id, value.data(), 3);
354}

References Slic3r::ColorRGB::data(), and set_uniform().

Here is the call graph for this function:

◆ set_uniform() [27/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const ColorRGBA & value ) const
357{
358 set_uniform(id, value.data(), 4);
359}

References Slic3r::ColorRGBA::data(), and set_uniform().

Here is the call graph for this function:

◆ set_uniform() [28/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const float * value,
size_t size ) const
283{
284 if (id >= 0) {
285 if (size == 1)
286 set_uniform(id, value[0]);
287 else if (size == 2)
288 glsafe(::glUniform2fv(id, 1, static_cast<const GLfloat*>(value)));
289 else if (size == 3)
290 glsafe(::glUniform3fv(id, 1, static_cast<const GLfloat*>(value)));
291 else if (size == 4)
292 glsafe(::glUniform4fv(id, 1, static_cast<const GLfloat*>(value)));
293 }
294}
#define glUniform3fv
Definition gl.h:5015
#define glUniform4fv
Definition gl.h:5031
khronos_float_t GLfloat
Definition gl.h:2066
#define glUniform2fv
Definition gl.h:4999

References glsafe, glUniform2fv, glUniform3fv, glUniform4fv, and set_uniform().

Here is the call graph for this function:

◆ set_uniform() [29/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const Matrix3d & value ) const
314{
315 set_uniform(id, (Matrix3f)value.cast<float>());
316}
Eigen::Matrix< float, 3, 3, Eigen::DontAlign > Matrix3f
Definition Point.hpp:85

References set_uniform().

Here is the call graph for this function:

◆ set_uniform() [30/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const Matrix3f & value ) const
308{
309 if (id >= 0)
310 glsafe(::glUniformMatrix3fv(id, 1, GL_FALSE, static_cast<const GLfloat*>(value.data())));
311}
#define glUniformMatrix3fv
Definition gl.h:5057

References GL_FALSE, glsafe, and glUniformMatrix3fv.

◆ set_uniform() [31/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const Matrix4d & value ) const
325{
326 set_uniform(id, (Matrix4f)value.cast<float>());
327}
Eigen::Matrix< float, 4, 4, Eigen::DontAlign > Matrix4f
Definition Point.hpp:87

References set_uniform().

Here is the call graph for this function:

◆ set_uniform() [32/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const Matrix4f & value ) const
319{
320 if (id >= 0)
321 glsafe(::glUniformMatrix4fv(id, 1, GL_FALSE, static_cast<const GLfloat*>(value.data())));
322}
#define glUniformMatrix4fv
Definition gl.h:5069

References GL_FALSE, glsafe, and glUniformMatrix4fv.

◆ set_uniform() [33/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const std::array< double, 4 > & value ) const
277{
278 const std::array<float, 4> f_value = { float(value[0]), float(value[1]), float(value[2]), float(value[3]) };
279 set_uniform(id, f_value);
280}

References set_uniform().

Here is the call graph for this function:

◆ set_uniform() [34/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const std::array< float, 2 > & value ) const
259{
260 if (id >= 0)
261 glsafe(::glUniform2fv(id, 1, static_cast<const GLfloat*>(value.data())));
262}

References glsafe, and glUniform2fv.

◆ set_uniform() [35/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const std::array< float, 3 > & value ) const
265{
266 if (id >= 0)
267 glsafe(::glUniform3fv(id, 1, static_cast<const GLfloat*>(value.data())));
268}

References glsafe, and glUniform3fv.

◆ set_uniform() [36/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const std::array< float, 4 > & value ) const
271{
272 if (id >= 0)
273 glsafe(::glUniform4fv(id, 1, static_cast<const GLfloat*>(value.data())));
274}

References glsafe, and glUniform4fv.

◆ set_uniform() [37/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const std::array< int, 2 > & value ) const
241{
242 if (id >= 0)
243 glsafe(::glUniform2iv(id, 1, static_cast<const GLint*>(value.data())));
244}
#define glUniform2iv
Definition gl.h:5003

References glsafe, and glUniform2iv.

◆ set_uniform() [38/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const std::array< int, 3 > & value ) const
247{
248 if (id >= 0)
249 glsafe(::glUniform3iv(id, 1, static_cast<const GLint*>(value.data())));
250}
#define glUniform3iv
Definition gl.h:5019

References glsafe, and glUniform3iv.

◆ set_uniform() [39/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const std::array< int, 4 > & value ) const
253{
254 if (id >= 0)
255 glsafe(::glUniform4iv(id, 1, static_cast<const GLint*>(value.data())));
256}
#define glUniform4iv
Definition gl.h:5035

References glsafe, and glUniform4iv.

◆ set_uniform() [40/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const Transform3d & value ) const
303{
304 set_uniform(id, value.cast<float>());
305}

References set_uniform().

Here is the call graph for this function:

◆ set_uniform() [41/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const Transform3f & value ) const
297{
298 if (id >= 0)
299 glsafe(::glUniformMatrix4fv(id, 1, GL_FALSE, static_cast<const GLfloat*>(value.matrix().data())));
300}

References GL_FALSE, glsafe, and glUniformMatrix4fv.

◆ set_uniform() [42/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const Vec2d & value ) const
336{
337 set_uniform(id, static_cast<Vec2f>(value.cast<float>()));
338}
Eigen::Matrix< float, 2, 1, Eigen::DontAlign > Vec2f
Definition Point.hpp:64

References set_uniform().

Here is the call graph for this function:

◆ set_uniform() [43/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const Vec2f & value ) const
330{
331 if (id >= 0)
332 glsafe(::glUniform2fv(id, 1, static_cast<const GLfloat*>(value.data())));
333}

References glsafe, and glUniform2fv.

◆ set_uniform() [44/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const Vec3d & value ) const
347{
348 set_uniform(id, static_cast<Vec3f>(value.cast<float>()));
349}
Eigen::Matrix< float, 3, 1, Eigen::DontAlign > Vec3f
Definition Point.hpp:65

References set_uniform().

Here is the call graph for this function:

◆ set_uniform() [45/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
const Vec3f & value ) const
341{
342 if (id >= 0)
343 glsafe(::glUniform3fv(id, 1, static_cast<const GLfloat*>(value.data())));
344}

References glsafe, and glUniform3fv.

◆ set_uniform() [46/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
double value ) const
236{
237 set_uniform(id, static_cast<float>(value));
238}

References set_uniform().

Here is the call graph for this function:

◆ set_uniform() [47/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
float value ) const
230{
231 if (id >= 0)
232 glsafe(::glUniform1f(id, value));
233}
#define glUniform1f
Definition gl.h:4981

References glsafe, and glUniform1f.

◆ set_uniform() [48/48]

void Slic3r::GLShaderProgram::set_uniform ( int id,
int value ) const
219{
220 if (id >= 0)
221 glsafe(::glUniform1i(id, value));
222}
#define glUniform1i
Definition gl.h:4985

References glsafe, and glUniform1i.

◆ start_using()

void Slic3r::GLShaderProgram::start_using ( ) const
208{
209 assert(m_id > 0);
211}
#define glUseProgram
Definition gl.h:5085

References glsafe, glUseProgram, and m_id.

Referenced by Slic3r::GUI::GLCanvas3D::_render_background(), Slic3r::GUI::GLCanvas3D::_render_below_plate_volumes(), Slic3r::GUI::GLCanvas3D::_render_cad_grid(), Slic3r::GUI::GLCanvas3D::_render_fxaa_pass(), Slic3r::GUI::GLCanvas3D::_render_imex_ghosts_xray(), Slic3r::GUI::GLCanvas3D::_render_objects(), Slic3r::GUI::GLCanvas3D::_render_shadows(), Slic3r::GUI::GLCanvas3D::_render_sla_slices(), Slic3r::GUI::GLCanvas3D::_render_ssao_pass(), Slic3r::GUI::GLCanvas3D::_render_volumes_for_picking(), Slic3r::GUI::GLCanvas3D::_render_wireframe_overlay(), Slic3r::GUI::GLCanvas3D::_render_xray_volumes(), Slic3r::GUI::GLGizmoFlatten::on_render(), Slic3r::GUI::GLGizmoMeasure::on_render(), Slic3r::GUI::GLGizmoMove3D::on_render(), Slic3r::GUI::GLGizmoRotate::on_render(), Slic3r::GUI::GLGizmoScale3D::on_render(), Slic3r::GLVolumeCollection::render(), Slic3r::GUI::Bed3D::Axes::render(), Slic3r::GUI::DesignSketchTool::render(), Slic3r::GUI::GCodeViewer::SequentialView::Marker::render(), Slic3r::GUI::GLCanvas3D::SequentialPrintClearance::render(), Slic3r::GUI::GLSelectionRectangle::render(), Slic3r::GUI::PartPlate::render(), Slic3r::GUI::SceneCache::render(), Slic3r::GUI::TextLinesModel::render(), Slic3r::GUI::UVEditorCanvas::render(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_active_object_annotations(), Slic3r::GUI::GLGizmoTextureDisplacement::render_adjust_texture_gizmo(), Slic3r::GUI::GLGizmoMove3D::render_align_preview(), Slic3r::GUI::Selection::render_bounding_box(), Slic3r::GUI::MeshClipper::render_contour(), Slic3r::GUI::GLGizmoPainterBase::render_cursor_circle(), Slic3r::GUI::GLGizmoPainterBase::render_cursor_height_range(), Slic3r::GUI::GLGizmoPainterBase::render_cursor_sphere(), Slic3r::GUI::MeshClipper::render_cut(), Slic3r::GUI::GLGizmoCut3D::render_cut_plane(), Slic3r::GUI::Bed3D::render_default(), Slic3r::GUI::GLGizmoMeasure::render_dimensioning(), Slic3r::GUI::ImGuiWrapper::render_draw_data(), Slic3r::GUI::PartPlateList::render_exclusion_volume_intersections(), Slic3r::GUI::GLGizmoBase::render_grabbers(), Slic3r::GUI::Bed3D::render_gravity_arrow(), Slic3r::GUI::PartPlate::render_grid(), Slic3r::GUI::PartPlate::render_icons(), Slic3r::GUI::GLGizmoTextureDisplacement::render_island_overlay(), Slic3r::GUI::GLGizmoCut3D::render_line(), Slic3r::GUI::PartPlate::render_logo_texture(), Slic3r::GUI::GCodeViewer::render_markers(), Slic3r::GUI::Bed3D::render_model(), Slic3r::GUI::GLGizmoCut3D::render_model(), Slic3r::GUI::PartPlate::render_only_numbers(), Slic3r::GUI::GLGizmoTextureDisplacement::render_paint_overlay(), Slic3r::GUI::GLGizmoTextureDisplacement::render_painted_colors(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_profile(), Slic3r::GUI::GLGizmoCut3D::render_rotation_snapping(), Slic3r::GUI::GLGizmoTextureDisplacement::render_seam_overlay(), Slic3r::GUI::GLGizmoTextureDisplacement::render_shaded_preview_mesh(), Slic3r::GUI::GCodeViewer::render_shells(), Slic3r::GUI::Selection::render_sidebar_hints(), Slic3r::GUI::GLTexture::render_sub_texture(), Slic3r::GUI::GLGizmoTextureDisplacement::render_subdivide_preview(), Slic3r::GUI::GLCanvas3D::render_thumbnail_internal(), Slic3r::GUI::GLGizmoTextureDisplacement::render_uvcheck_mesh(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_volumes(), and Slic3r::GUI::GLGizmoTextureDisplacement::render_wireframe_overlay().

◆ stop_using()

void Slic3r::GLShaderProgram::stop_using ( ) const
214{
216}

References glsafe, and glUseProgram.

Referenced by Slic3r::GUI::GLCanvas3D::_render_background(), Slic3r::GUI::GLCanvas3D::_render_below_plate_volumes(), Slic3r::GUI::GLCanvas3D::_render_fxaa_pass(), Slic3r::GUI::GLCanvas3D::_render_imex_ghosts_xray(), Slic3r::GUI::GLCanvas3D::_render_objects(), Slic3r::GUI::GLCanvas3D::_render_shadows(), Slic3r::GUI::GLCanvas3D::_render_sla_slices(), Slic3r::GUI::GLCanvas3D::_render_ssao_pass(), Slic3r::GUI::GLCanvas3D::_render_volumes_for_picking(), Slic3r::GUI::GLCanvas3D::_render_wireframe_overlay(), Slic3r::GUI::GLCanvas3D::_render_xray_volumes(), Slic3r::GUI::GLGizmoFlatten::on_render(), Slic3r::GUI::GLGizmoMeasure::on_render(), Slic3r::GUI::GLGizmoMove3D::on_render(), Slic3r::GUI::GLGizmoRotate::on_render(), Slic3r::GUI::GLGizmoScale3D::on_render(), Slic3r::GLVolumeCollection::render(), Slic3r::GUI::Bed3D::Axes::render(), Slic3r::GUI::DesignSketchTool::render(), Slic3r::GUI::GCodeViewer::SequentialView::Marker::render(), Slic3r::GUI::GLCanvas3D::SequentialPrintClearance::render(), Slic3r::GUI::GLSelectionRectangle::render(), Slic3r::GUI::PartPlate::render(), Slic3r::GUI::SceneCache::render(), Slic3r::GUI::TextLinesModel::render(), Slic3r::GUI::UVEditorCanvas::render(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_active_object_annotations(), Slic3r::GUI::GLGizmoTextureDisplacement::render_adjust_texture_gizmo(), Slic3r::GUI::GLGizmoMove3D::render_align_preview(), Slic3r::GUI::Selection::render_bounding_box(), Slic3r::GUI::MeshClipper::render_contour(), Slic3r::GUI::GLGizmoPainterBase::render_cursor_circle(), Slic3r::GUI::GLGizmoPainterBase::render_cursor_height_range(), Slic3r::GUI::GLGizmoPainterBase::render_cursor_sphere(), Slic3r::GUI::MeshClipper::render_cut(), Slic3r::GUI::GLGizmoCut3D::render_cut_plane(), Slic3r::GUI::Bed3D::render_default(), Slic3r::GUI::GLGizmoMeasure::render_dimensioning(), Slic3r::GUI::ImGuiWrapper::render_draw_data(), Slic3r::GUI::PartPlateList::render_exclusion_volume_intersections(), Slic3r::GUI::GLGizmoBase::render_grabbers(), Slic3r::GUI::Bed3D::render_gravity_arrow(), Slic3r::GUI::PartPlate::render_grid(), Slic3r::GUI::PartPlate::render_icons(), Slic3r::GUI::GLGizmoTextureDisplacement::render_island_overlay(), Slic3r::GUI::GLGizmoCut3D::render_line(), Slic3r::GUI::PartPlate::render_logo_texture(), Slic3r::GUI::GCodeViewer::render_markers(), Slic3r::GUI::Bed3D::render_model(), Slic3r::GUI::GLGizmoCut3D::render_model(), Slic3r::GUI::PartPlate::render_only_numbers(), Slic3r::GUI::GLGizmoTextureDisplacement::render_paint_overlay(), Slic3r::GUI::GLGizmoTextureDisplacement::render_painted_colors(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_profile(), Slic3r::GUI::GLGizmoCut3D::render_rotation_snapping(), Slic3r::GUI::GLGizmoTextureDisplacement::render_seam_overlay(), Slic3r::GUI::GLGizmoTextureDisplacement::render_shaded_preview_mesh(), Slic3r::GUI::GCodeViewer::render_shells(), Slic3r::GUI::Selection::render_sidebar_hints(), Slic3r::GUI::GLTexture::render_sub_texture(), Slic3r::GUI::GLGizmoTextureDisplacement::render_subdivide_preview(), Slic3r::GUI::GLCanvas3D::render_thumbnail_internal(), Slic3r::GUI::GLGizmoTextureDisplacement::render_uvcheck_mesh(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_volumes(), and Slic3r::GUI::GLGizmoTextureDisplacement::render_wireframe_overlay().

Member Data Documentation

◆ m_attrib_location_cache

std::vector<std::pair<std::string, int> > Slic3r::GLShaderProgram::m_attrib_location_cache
private

Referenced by get_attrib_location().

◆ m_id

unsigned int Slic3r::GLShaderProgram::m_id { 0 }
private

◆ m_name

std::string Slic3r::GLShaderProgram::m_name
private

Referenced by get_name(), and init_from_texts().

◆ m_uniform_location_cache

std::vector<std::pair<std::string, int> > Slic3r::GLShaderProgram::m_uniform_location_cache
private

Referenced by get_uniform_location().


The documentation for this class was generated from the following files:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/GLShader.hpp
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/GLShader.cpp