|
StapleGL
Header-only C++20 OpenGL wrapper
|
Shader data type definitions. More...


Go to the source code of this file.
Namespaces | |
| namespace | staplegl |
| namespace | staplegl::shader_data_type |
Enumerations | |
| enum class | staplegl::shader_data_type::shader_array_type : std::uint8_t { staplegl::shader_data_type::float32_arr , staplegl::shader_data_type::vec2_arr , staplegl::shader_data_type::vec3_arr , staplegl::shader_data_type::vec4_arr , staplegl::shader_data_type::mat3_arr , staplegl::shader_data_type::mat4_arr } |
| Enumerator that represents an array of a given data type. More... | |
| enum class | staplegl::shader_data_type::u_type : std::uint8_t { staplegl::shader_data_type::float32 , staplegl::shader_data_type::vec2 , staplegl::shader_data_type::vec3 , staplegl::shader_data_type::vec4 , staplegl::shader_data_type::mat3 , staplegl::shader_data_type::mat4 } |
| Enumerator that represents a data type. More... | |
Functions | |
| static constexpr auto | staplegl::shader_data_type::size (u_type type) -> std::size_t |
| Get the size of the shader data type. | |
| static constexpr auto | staplegl::shader_data_type::to_opengl_type (u_type type) -> std::uint32_t |
| Convert the shader data type to an OpenGL type. | |
| static constexpr auto | staplegl::shader_data_type::to_opengl_underlying_type (u_type type) -> std::uint32_t |
| Obtains the OpenGL type of the underlying type of the shader data type. | |
| static constexpr auto | staplegl::shader_data_type::component_count (u_type type) -> std::uint16_t |
| Get the number of components in the shader data type, useful for vector types. | |
Shader data type definitions.
This file defines a set of enumerators that represent the data types that can be passed to a shader as a uniform. These are used as runtime types that can be passed around to other functions.
Definition in file shader_data_type.hpp.