1 #ifndef DONUT_GRAPHICS_SHADER_2D_HPP
2 #define DONUT_GRAPHICS_SHADER_2D_HPP
120 static void createSharedShaders();
121 static void destroySharedShaders() noexcept;
ShaderProgram specialized for rendering TexturedQuad instances in 2D.
Definition: Shader2D.hpp:29
static const char *const FRAGMENT_SHADER_SOURCE_CODE_PLAIN
Pointer to a statically allocated string containing the GLSL source code for a plain fragment shader.
Definition: Shader2D.hpp:41
ShaderParameter viewMatrix
Identifier for the uniform shader variable for the view matrix.
Definition: Shader2D.hpp:88
static Shader2D *const PLAIN
Pointer to the statically allocated storage for the built-in plain shader.
Definition: Shader2D.hpp:58
ShaderParameter viewProjectionMatrix
Identifier for the uniform shader variable for the combined view-projection matrix.
Definition: Shader2D.hpp:94
ShaderParameter projectionMatrix
Identifier for the uniform shader variable for the projection matrix.
Definition: Shader2D.hpp:83
static Shader2D *const ALPHA
Pointer to the statically allocated storage for the built-in alpha shader.
Definition: Shader2D.hpp:68
Shader2DOptions options
Shader configuration that was supplied in the constructor.
Definition: Shader2D.hpp:73
ShaderProgram program
Shader program.
Definition: Shader2D.hpp:78
ShaderParameter textureUnit
Identifier for the uniform shader variable for the main texture unit.
Definition: Shader2D.hpp:99
Shader2D(const ShaderProgramOptions &programOptions, const Shader2DOptions &options={})
Compile and link a 2D shader program.
Definition: Shader2D.hpp:113
static const char *const VERTEX_SHADER_SOURCE_CODE_INSTANCED_TEXTURED_QUAD
Pointer to a statically allocated string containing the GLSL source code for a plain vertex shader.
Definition: Shader2D.hpp:35
static const char *const FRAGMENT_SHADER_SOURCE_CODE_ALPHA
Pointer to a statically allocated string containing the GLSL source code for a fragment shader that i...
Definition: Shader2D.hpp:48
Identifier for a uniform shader variable inside a ShaderProgram.
Definition: ShaderParameter.hpp:17
Compiled and linked GPU shader program.
Definition: ShaderProgram.hpp:46
@ IGNORE
Ignore the depth buffer.
@ USE_ALPHA_BLENDING
Blend the old and new pixel colors depending on the alpha value of the new pixel according to the sta...
Configuration options for a Shader2D.
Definition: Shader2D.hpp:15
ShaderConfiguration configuration
Shader configuration options, see ShaderConfiguration.
Definition: Shader2D.hpp:19
Base configuration options for a shader.
Definition: ShaderConfiguration.hpp:299
DepthBufferMode depthBufferMode
How to treat the depth buffer for each pixel being rendered.
Definition: ShaderConfiguration.hpp:305
Configuration options for a ShaderProgram.
Definition: ShaderProgram.hpp:23