![]() |
Prusa Slicer 2.6.0
|
#include <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 |
| typedef std::array<std::string, static_cast<size_t>(EShaderType::Count)> Slic3r::GLShaderProgram::ShaderFilenames |
| typedef std::array<std::string, static_cast<size_t>(EShaderType::Count)> Slic3r::GLShaderProgram::ShaderSources |
|
strong |
| Enumerator | |
|---|---|
| Vertex | |
| Fragment | |
| Geometry | |
| TessEvaluation | |
| TessControl | |
| Compute | |
| Count | |
| Slic3r::GLShaderProgram::~GLShaderProgram | ( | ) |
| int Slic3r::GLShaderProgram::get_attrib_location | ( | const char * | name | ) | const |
References m_attrib_location_cache, and m_id.
Referenced by Slic3r::GUI::GLModel::render(), Slic3r::GUI::GLMmSegmentationGizmo3DScene::render(), Slic3r::GUI::ImGuiWrapper::render_draw_data(), Slic3r::GUI::GLModel::render_instanced(), and Slic3r::GUI::GCodeViewer::render_toolpaths().
Here is the caller graph for this function:
|
inline |
References m_name.
Referenced by Slic3r::GUI::GLModel::render_instanced().
Here is the caller graph for this function:| int Slic3r::GLShaderProgram::get_uniform_location | ( | const char * | name | ) | const |
Referenced by Slic3r::GUI::GCodeViewer::render_toolpaths(), 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:| bool Slic3r::GLShaderProgram::init_from_files | ( | const std::string & | name, |
| const ShaderFilenames & | filenames, | ||
| const std::initializer_list< std::string_view > & | defines = {} |
||
| ) |
References Compute, Count, Slic3r::empty(), error, Slic3r::format(), Fragment, Geometry, init_from_texts(), Slic3r::resources_dir(), TessControl, TessEvaluation, and Vertex.
Here is the call graph for this function:| bool Slic3r::GLShaderProgram::init_from_texts | ( | const std::string & | name, |
| const ShaderSources & | sources | ||
| ) |
References Compute, Count, error, Fragment, Geometry, GL_FALSE, glcheck, glsafe, m_id, m_name, TessControl, TessEvaluation, and Vertex.
Referenced by init_from_files().
Here is the caller graph for this function: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:
|
inline |
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:
|
inline |
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:
|
inline |
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:
|
inline |
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:
|
inline |
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:
|
inline |
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:
|
inline |
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:
|
inline |
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:
|
inline |
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:
|
inline |
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:
|
inline |
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:
|
inline |
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:
|
inline |
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:
|
inline |
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:
|
inline |
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:
|
inline |
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: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: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: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: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: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: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:References get_uniform_location(), and set_uniform().
Referenced by Slic3r::GUI::GLCanvas3D::_render_background(), Slic3r::GUI::GLCanvas3D::_render_sla_slices(), Slic3r::GUI::GLCanvas3D::_render_thumbnail_internal(), Slic3r::GUI::GLCanvas3D::_render_volumes_for_picking(), 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::GLVolume::NonManifoldEdges::render(), Slic3r::GUI::GCodeViewer::COG::render(), Slic3r::GUI::GCodeViewer::SequentialView::Marker::render(), Slic3r::GUI::GLCanvas3D::SequentialPrintClearance::render(), Slic3r::GUI::GLSelectionRectangle::render(), Slic3r::GUI::GLModel::render(), Slic3r::GUI::CoordAxes::render(), Slic3r::GLVolumeCollection::render(), Slic3r::GUI::GLGizmoBase::Grabber::render(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_active_object_annotations(), Slic3r::GUI::Selection::render_bounding_box(), Slic3r::GUI::MeshClipper::render_contour(), Slic3r::GUI::Bed3D::render_contour(), Slic3r::GUI::GLGizmoPainterBase::render_cursor_circle(), 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::GLGizmoBase::render_grabbers(), Slic3r::GUI::GLModel::render_instanced(), Slic3r::GUI::GLGizmoCut3D::render_line(), Slic3r::GUI::Bed3D::render_model(), Slic3r::GUI::GLGizmoCut3D::render_model(), Slic3r::GUI::GLGizmoHollow::render_points(), Slic3r::GUI::GLGizmoSlaSupports::render_points(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_profile(), Slic3r::GUI::GLGizmoCut3D::render_rotation_snapping(), 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::Bed3D::render_texture(), Slic3r::GUI::GCodeViewer::render_toolpaths(), Slic3r::GUI::GLGizmoSlaBase::render_volumes(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_volumes(), 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:| void Slic3r::GLShaderProgram::set_uniform | ( | int | id, |
| bool | value | ||
| ) | const |
References glsafe, and set_uniform().
Here is the call graph for this function:References set_uniform().
Here is the call graph for this function:| void Slic3r::GLShaderProgram::set_uniform | ( | int | id, |
| const Transform3d & | value | ||
| ) | const |
References Eigen::Transform< _Scalar, _Dim, _Mode, _Options >::cast(), and set_uniform().
Here is the call graph for this function:| void Slic3r::GLShaderProgram::set_uniform | ( | int | id, |
| const Transform3f & | value | ||
| ) | const |
References Eigen::PlainObjectBase< Derived >::data(), GL_FALSE, glsafe, and Eigen::Transform< _Scalar, _Dim, _Mode, _Options >::matrix().
Here is the call graph for this function:References Eigen::PlainObjectBase< Derived >::data(), and glsafe.
Here is the call graph for this function:References Eigen::PlainObjectBase< Derived >::data(), and glsafe.
Here is the call graph for this function:| void Slic3r::GLShaderProgram::set_uniform | ( | int | id, |
| double | value | ||
| ) | const |
| void Slic3r::GLShaderProgram::set_uniform | ( | int | id, |
| float | value | ||
| ) | const |
| void Slic3r::GLShaderProgram::set_uniform | ( | int | id, |
| int | value | ||
| ) | const |
| void Slic3r::GLShaderProgram::start_using | ( | ) | const |
Referenced by Slic3r::GUI::GLCanvas3D::_render_background(), Slic3r::GUI::GLCanvas3D::_render_objects(), Slic3r::GUI::GLCanvas3D::_render_sla_slices(), Slic3r::GUI::GLCanvas3D::_render_thumbnail_internal(), Slic3r::GUI::GLCanvas3D::_render_volumes_for_picking(), 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::GUI::GCodeViewer::COG::render(), Slic3r::GUI::GCodeViewer::SequentialView::Marker::render(), Slic3r::GUI::GLCanvas3D::SequentialPrintClearance::render(), Slic3r::GUI::GLSelectionRectangle::render(), Slic3r::GUI::CoordAxes::render(), Slic3r::GLVolumeCollection::render(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_active_object_annotations(), Slic3r::GUI::Selection::render_bounding_box(), Slic3r::GUI::MeshClipper::render_contour(), Slic3r::GUI::Bed3D::render_contour(), Slic3r::GUI::GLGizmoPainterBase::render_cursor_circle(), 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::GLGizmoBase::render_grabbers(), Slic3r::GUI::GLGizmoCut3D::render_line(), Slic3r::GUI::Bed3D::render_model(), Slic3r::GUI::GLGizmoCut3D::render_model(), Slic3r::GUI::GLGizmoHollow::render_points(), Slic3r::GUI::GLGizmoSlaSupports::render_points(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_profile(), Slic3r::GUI::GLGizmoCut3D::render_rotation_snapping(), Slic3r::GUI::GCodeViewer::render_shells(), Slic3r::GUI::Selection::render_sidebar_hints(), Slic3r::GUI::GLTexture::render_sub_texture(), Slic3r::GUI::Bed3D::render_texture(), Slic3r::GUI::GCodeViewer::render_toolpaths(), Slic3r::GUI::GLGizmoSlaBase::render_volumes(), and Slic3r::GUI::GLCanvas3D::LayersEditing::render_volumes().
Here is the caller graph for this function:| void Slic3r::GLShaderProgram::stop_using | ( | ) | const |
References glsafe.
Referenced by Slic3r::GUI::GLCanvas3D::_render_background(), Slic3r::GUI::GLCanvas3D::_render_objects(), Slic3r::GUI::GLCanvas3D::_render_sla_slices(), Slic3r::GUI::GLCanvas3D::_render_thumbnail_internal(), Slic3r::GUI::GLCanvas3D::_render_volumes_for_picking(), 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::GUI::GCodeViewer::COG::render(), Slic3r::GUI::GCodeViewer::SequentialView::Marker::render(), Slic3r::GUI::GLCanvas3D::SequentialPrintClearance::render(), Slic3r::GUI::GLSelectionRectangle::render(), Slic3r::GUI::CoordAxes::render(), Slic3r::GLVolumeCollection::render(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_active_object_annotations(), Slic3r::GUI::Selection::render_bounding_box(), Slic3r::GUI::MeshClipper::render_contour(), Slic3r::GUI::Bed3D::render_contour(), Slic3r::GUI::GLGizmoPainterBase::render_cursor_circle(), 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::GLGizmoBase::render_grabbers(), Slic3r::GUI::GLGizmoCut3D::render_line(), Slic3r::GUI::Bed3D::render_model(), Slic3r::GUI::GLGizmoCut3D::render_model(), Slic3r::GUI::GLGizmoHollow::render_points(), Slic3r::GUI::GLGizmoSlaSupports::render_points(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_profile(), Slic3r::GUI::GLGizmoCut3D::render_rotation_snapping(), Slic3r::GUI::GCodeViewer::render_shells(), Slic3r::GUI::Selection::render_sidebar_hints(), Slic3r::GUI::GLTexture::render_sub_texture(), Slic3r::GUI::Bed3D::render_texture(), Slic3r::GUI::GCodeViewer::render_toolpaths(), Slic3r::GUI::GLGizmoSlaBase::render_volumes(), and Slic3r::GUI::GLCanvas3D::LayersEditing::render_volumes().
Here is the caller graph for this function:
|
private |
Referenced by get_attrib_location().
|
private |
Referenced by ~GLShaderProgram(), get_attrib_location(), get_id(), init_from_texts(), and start_using().
|
private |
Referenced by get_name(), and init_from_texts().
|
private |