 |
Gorgon Game Engine
|
Go to the documentation of this file.
10 #include "../GL/Shader.h"
12 #include "../GL/OpenGL.h"
39 throw std::runtime_error(
"Unknown simple shader mode");
61 glBindTexture(GL_TEXTURE_2D, value);
105 glBindTexture(GL_TEXTURE_2D, value);
121 glBindTexture(GL_TEXTURE_2D, value);
141 normal.Shader::Use();
144 tomask.Shader::Use();
147 throw std::runtime_error(
"Unknown alpha shader mode");
169 glBindTexture(GL_TEXTURE_2D, value);
216 glBindTexture(GL_TEXTURE_2D, value);
232 glBindTexture(GL_TEXTURE_2D, value);
249 normal.Shader::Use();
252 tomask.Shader::Use();
255 throw std::runtime_error(
"Unknown fill shader mode");
305 glBindTexture(GL_TEXTURE_2D, value);
MaskedShader & SetDiffuse(GL::Texture value)
Sets diffuse texture.
Definition: Shaders.h:103
static FillShader & Use(ShaderMode mode=ShaderMode::Normal)
Definition: Shaders.h:242
Definition: Shaders.h:240
MaskedAlphaShader & SetTextureCoords(const GL::QuadTextureCoords &value)
Sets texture coordinates.
Definition: Shaders.h:204
AlphaShader & SetVertexCoords(const GL::QuadVertices &value)
Definition: Shaders.h:151
void UpdateUniform(int name, float value)
Definition: Shader.cpp:120
MaskedAlphaShader & SetAlpha(GL::Texture value)
Sets alpha texture.
Definition: Shaders.h:212
PFNGLACTIVETEXTUREPROC glActiveTexture
Definition: OpenGL.cpp:21
ShaderMode
Definition: Shaders.h:17
MaskedFillShader & SetVertexCoords(const GL::QuadVertices &value)
Definition: Shaders.h:287
SimpleShader & SetVertexCoords(const GL::QuadVertices &value)
Definition: Shaders.h:43
static SimpleShader & Use(ShaderMode mode=ShaderMode::Normal)
Definition: Shaders.h:25
MaskedShader & SetTextureCoords(const GL::QuadTextureCoords &value)
Sets texture coordinates.
Definition: Shaders.h:95
Represents a four channel 32 bit float per channel color information.
Definition: Color.h:373
Definition: Shaders.h:131
int LocateUniform(const std::string &name)
Definition: Shader.cpp:108
MaskedShader & SetMask(GL::Texture value)
Definition: Shaders.h:117
static MaskedAlphaShader & Use()
Definition: Shaders.h:189
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
static AlphaShader & Use(ShaderMode mode=ShaderMode::Normal)
Definition: Shaders.h:134
SimpleShader & SetTint(const Graphics::RGBAf &value)
Definition: Shaders.h:66
MaskedFillShader & SetTint(const Graphics::RGBAf &value)
Definition: Shaders.h:294
int BindTexture(const std::string &name, int location)
Definition: Shader.cpp:113
SimpleShader & SetTextureCoords(const GL::QuadTextureCoords &value)
Sets texture coordinates.
Definition: Shaders.h:51
FillShader & SetVertexCoords(const GL::QuadVertices &value)
Definition: Shaders.h:260
MaskedAlphaShader & SetMask(GL::Texture value)
Definition: Shaders.h:228
AlphaShader & SetTint(const Graphics::RGBAf &value)
Definition: Shaders.h:174
@ Graphics
Definition: Template.h:164
Definition: Shaders.h:278
AlphaShader & SetAlpha(GL::Texture value)
Sets alpha texture.
Definition: Shaders.h:167
static MaskedFillShader & Use()
Definition: Shaders.h:280
FillShader & SetTint(const Graphics::RGBAf &value)
Definition: Shaders.h:267
MaskedShader & SetTint(const Graphics::RGBAf &value)
Definition: Shaders.h:110
MaskedShader & SetVertexCoords(const GL::QuadVertices &value)
Definition: Shaders.h:87
MaskedFillShader & SetMask(GL::Texture value)
Definition: Shaders.h:301
MaskedAlphaShader & SetVertexCoords(const GL::QuadVertices &value)
Definition: Shaders.h:196
Definition: Shaders.h:186
SimpleShader & SetDiffuse(GL::Texture value)
Sets diffuse texture.
Definition: Shaders.h:59
static MaskedShader & Use()
Definition: Shaders.h:80
MaskedAlphaShader & SetTint(const Graphics::RGBAf &value)
Definition: Shaders.h:221
@ Normal
Definition: Shader.h:15
AlphaShader & SetTextureCoords(const GL::QuadTextureCoords &value)
Sets texture coordinates.
Definition: Shaders.h:159