ShaderProgram specialized for rendering TexturedQuad instances in 2D.
More...
#include <donut/graphics/Shader2D.hpp>
ShaderProgram specialized for rendering TexturedQuad instances in 2D.
- Examples
- example_game.cpp.
◆ Shader2D()
Compile and link a 2D shader program.
- Parameters
-
- Exceptions
-
graphics::Error | on failure to create a shader object, create the shader program object, compile the shader code or link the shader program. |
std::bad_alloc | on allocation failure. |
◆ VERTEX_SHADER_SOURCE_CODE_INSTANCED_TEXTURED_QUAD
const char* const donut::graphics::Shader2D::VERTEX_SHADER_SOURCE_CODE_INSTANCED_TEXTURED_QUAD |
|
static |
Pointer to a statically allocated string containing the GLSL source code for a plain vertex shader.
- Examples
- example_game.cpp.
◆ FRAGMENT_SHADER_SOURCE_CODE_PLAIN
const char* const donut::graphics::Shader2D::FRAGMENT_SHADER_SOURCE_CODE_PLAIN |
|
static |
Pointer to a statically allocated string containing the GLSL source code for a plain fragment shader.
◆ FRAGMENT_SHADER_SOURCE_CODE_ALPHA
const char* const donut::graphics::Shader2D::FRAGMENT_SHADER_SOURCE_CODE_ALPHA |
|
static |
Pointer to a statically allocated string containing the GLSL source code for a fragment shader that interprets the red channel as alpha with a white base color.
◆ PLAIN
Shader2D* const donut::graphics::Shader2D::PLAIN |
|
static |
Pointer to the statically allocated storage for the built-in plain shader.
- Warning
- This pointer must not be dereferenced in application code. It is not guaranteed that the underlying shader will be present at all times.
◆ ALPHA
Shader2D* const donut::graphics::Shader2D::ALPHA |
|
static |
Pointer to the statically allocated storage for the built-in alpha shader.
- Warning
- This pointer must not be dereferenced in application code. It is not guaranteed that the underlying shader will be present at all times.
◆ options
Shader configuration that was supplied in the constructor.
◆ program
◆ projectionMatrix
Identifier for the uniform shader variable for the projection matrix.
◆ viewMatrix
Identifier for the uniform shader variable for the view matrix.
◆ viewProjectionMatrix
Identifier for the uniform shader variable for the combined view-projection matrix.
◆ textureUnit
Identifier for the uniform shader variable for the main texture unit.
The documentation for this class was generated from the following file: