|
Tatooine
|
#include <shader.h>
Public Member Functions | |
| shader ()=default | |
| ~shader () | |
| template<typename T , typename... Args> | |
| void | add_stage (Args &&... args) |
| DLL_API void | create () |
| DLL_API void | delete_shader () |
| DLL_API void | bind () const |
| DLL_API void | unbind () const |
| DLL_API void | add_uniform (const std::string &uniformVarName) |
| DLL_API void | add_attribute (const std::string &attributeVarName) |
| DLL_API GLint | uniform (const std::string &uniformVarName) |
| DLL_API GLint | attribute (const std::string &attributeVarName) |
| DLL_API void | set_uniform (const std::string &, GLfloat) |
| DLL_API void | set_uniform (const std::string &, GLint) |
| DLL_API void | set_uniform (const std::string &, GLuint) |
| DLL_API void | set_uniform (const std::string &, GLboolean) |
| DLL_API void | set_uniform (const std::string &, GLfloat, GLfloat) |
| DLL_API void | set_uniform (const std::string &, GLfloat, GLfloat, GLfloat) |
| DLL_API void | set_uniform (const std::string &, GLfloat, GLfloat, GLfloat, GLfloat) |
| DLL_API void | set_uniform (const std::string &, std::array< GLfloat, 2 > const &data) |
| DLL_API void | set_uniform (const std::string &, std::array< GLfloat, 3 > const &data) |
| DLL_API void | set_uniform (const std::string &, std::array< GLfloat, 4 > const &data) |
| DLL_API void | set_uniform (const std::string &, GLint, GLint) |
| DLL_API void | set_uniform (const std::string &, GLint, GLint, GLint) |
| DLL_API void | set_uniform (const std::string &, GLint, GLint, GLint, GLint) |
| DLL_API void | set_uniform (const std::string &, std::array< GLint, 2 > const &data) |
| DLL_API void | set_uniform (const std::string &, std::array< GLint, 3 > const &data) |
| DLL_API void | set_uniform (const std::string &, std::array< GLint, 4 > const &data) |
| DLL_API void | set_uniform (const std::string &, GLuint, GLuint) |
| DLL_API void | set_uniform (const std::string &, GLuint, GLuint, GLuint) |
| DLL_API void | set_uniform (const std::string &, GLuint, GLuint, GLuint, GLuint) |
| DLL_API void | set_uniform (const std::string &, std::array< GLuint, 2 > const &data) |
| DLL_API void | set_uniform (const std::string &, std::array< GLuint, 3 > const &data) |
| DLL_API void | set_uniform (const std::string &, std::array< GLuint, 4 > const &data) |
| DLL_API void | set_uniform (const std::string &, Vec2< GLfloat > const &) |
| DLL_API void | set_uniform_vec2 (const std::string &, GLfloat const *) |
| DLL_API void | set_uniform (const std::string &, Vec2< GLint > const &) |
| DLL_API void | set_uniform_vec2 (const std::string &, GLint const *) |
| DLL_API void | set_uniform (const std::string &, Vec2< GLuint > const &) |
| DLL_API void | set_uniform_vec2 (const std::string &, GLuint const *) |
| DLL_API void | set_uniform (const std::string &, Vec3< GLfloat > const &) |
| DLL_API void | set_uniform_vec3 (const std::string &, GLfloat const *) |
| DLL_API void | set_uniform (const std::string &, Vec3< GLint > const &) |
| DLL_API void | set_uniform_vec3 (const std::string &, GLint const *) |
| DLL_API void | set_uniform (const std::string &, Vec3< GLuint > const &) |
| DLL_API void | set_uniform_vec3 (const std::string &, GLuint const *) |
| DLL_API void | set_uniform (const std::string &, Vec4< GLfloat > const &) |
| DLL_API void | set_uniform_vec4 (const std::string &, GLfloat const *) |
| DLL_API void | set_uniform (const std::string &, Vec4< GLint > const &) |
| DLL_API void | set_uniform_vec4 (const std::string &, GLint const *) |
| DLL_API void | set_uniform (const std::string &, Vec4< GLuint > const &) |
| DLL_API void | set_uniform_vec4 (const std::string &, GLuint const *) |
| DLL_API void | set_uniform (const std::string &, Mat2< GLfloat > const &) |
| DLL_API void | set_uniform_mat2 (const std::string &, GLfloat const *) |
| DLL_API void | set_uniform (const std::string &, Mat3< GLfloat > const &) |
| DLL_API void | set_uniform_mat3 (const std::string &, GLfloat const *) |
| DLL_API void | set_uniform (const std::string &, Mat4< GLfloat > const &) |
| DLL_API void | set_uniform_mat4 (const std::string &, GLfloat const *) |
| DLL_API std::optional< std::string > | info_log () |
Public Member Functions inherited from tatooine::gl::id_holder< GLuint > | |
| id_holder () | |
| id_holder (GLuint _id) | |
| id_holder (id_holder const &other)=delete | |
| id_holder (id_holder &&other) noexcept | |
| auto | operator= (id_holder const &other) -> id_holder &=delete |
| auto | operator= (id_holder &&other) noexcept -> id_holder & |
| ~id_holder ()=default | |
| auto | id () const |
| void | swap (id_holder &other) |
Private Attributes | |
| std::map< std::string, GLint > | m_uniform_locations |
| std::map< std::string, GLint > | m_attribute_locations |
| std::vector< shaderstage > | m_shader_stages |
| std::unordered_set< std::string > | m_uniform_var_names |
| std::unordered_set< std::string > | m_attribute_var_names |
| bool | m_delete = true |
Additional Inherited Members | |
Static Public Attributes inherited from tatooine::gl::id_holder< GLuint > | |
| static constexpr auto | default_val |
Protected Member Functions inherited from tatooine::gl::id_holder< GLuint > | |
| void | set_id (GLuint id) |
| auto | id_ptr () |
| auto | id_ref () -> auto & |
|
default |
|
inline |
| DLL_API void tatooine::gl::shader::add_attribute | ( | const std::string & | attributeVarName | ) |
|
inline |
| DLL_API void tatooine::gl::shader::add_uniform | ( | const std::string & | uniformVarName | ) |
| DLL_API GLint tatooine::gl::shader::attribute | ( | const std::string & | attributeVarName | ) |
| DLL_API void tatooine::gl::shader::bind | ( | ) | const |
| DLL_API void tatooine::gl::shader::create | ( | ) |
| DLL_API void tatooine::gl::shader::delete_shader | ( | ) |
| DLL_API std::optional< std::string > tatooine::gl::shader::info_log | ( | ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| GLboolean | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| GLfloat | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| GLfloat | , | ||
| GLfloat | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| GLfloat | , | ||
| GLfloat | , | ||
| GLfloat | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| GLfloat | , | ||
| GLfloat | , | ||
| GLfloat | , | ||
| GLfloat | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| GLint | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| GLint | , | ||
| GLint | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| GLint | , | ||
| GLint | , | ||
| GLint | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| GLint | , | ||
| GLint | , | ||
| GLint | , | ||
| GLint | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| GLuint | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| GLuint | , | ||
| GLuint | , | ||
| GLuint | , | ||
| GLuint | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| Mat2< GLfloat > const & | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| Mat3< GLfloat > const & | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| Mat4< GLfloat > const & | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| std::array< GLfloat, 2 > const & | data | ||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| std::array< GLfloat, 3 > const & | data | ||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| std::array< GLfloat, 4 > const & | data | ||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| std::array< GLint, 2 > const & | data | ||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| std::array< GLint, 3 > const & | data | ||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| std::array< GLint, 4 > const & | data | ||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| std::array< GLuint, 2 > const & | data | ||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| std::array< GLuint, 3 > const & | data | ||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| std::array< GLuint, 4 > const & | data | ||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| Vec2< GLfloat > const & | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| Vec2< GLint > const & | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| Vec3< GLfloat > const & | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| Vec3< GLint > const & | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| Vec4< GLfloat > const & | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform | ( | const std::string & | , |
| Vec4< GLint > const & | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform_mat2 | ( | const std::string & | , |
| GLfloat const * | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform_mat3 | ( | const std::string & | , |
| GLfloat const * | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform_mat4 | ( | const std::string & | , |
| GLfloat const * | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform_vec2 | ( | const std::string & | , |
| GLfloat const * | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform_vec2 | ( | const std::string & | , |
| GLint const * | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform_vec2 | ( | const std::string & | , |
| GLuint const * | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform_vec3 | ( | const std::string & | , |
| GLfloat const * | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform_vec3 | ( | const std::string & | , |
| GLint const * | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform_vec3 | ( | const std::string & | , |
| GLuint const * | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform_vec4 | ( | const std::string & | , |
| GLfloat const * | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform_vec4 | ( | const std::string & | , |
| GLint const * | |||
| ) |
| DLL_API void tatooine::gl::shader::set_uniform_vec4 | ( | const std::string & | , |
| GLuint const * | |||
| ) |
| DLL_API void tatooine::gl::shader::unbind | ( | ) | const |
| DLL_API GLint tatooine::gl::shader::uniform | ( | const std::string & | uniformVarName | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |