Shader program containing a vertex and pixel shader.
More...
#include <Shader.hpp>
|
bool | IsValid () const |
|
void | Load (const char *vertexSource, const char *fragmentSource) |
|
void | Load (const FileSystem::FileContentsData &vertexDataGLSL, const FileSystem::FileContentsData &fragmentDataGLSL, const char *metalVertexShaderName, const char *metalFragmentShaderName, const FileSystem::FileContentsData &vertexDataHLSL, const FileSystem::FileContentsData &fragmentDataHLSL) |
|
void | Use () |
| Activates the shader to be used in a draw call.
|
|
void | SetMatrix (const char *name, const float *matrix4x4) |
|
void | SetTexture (const char *name, const class Texture2D *texture, int textureUnit) |
|
void | SetTexture (const char *name, const class TextureCube *texture, int textureUnit) |
|
void | SetRenderTexture (const char *name, const class RenderTexture *renderTexture, int textureUnit) |
|
void | SetInt (const char *name, int value) |
|
void | SetFloat (const char *name, float value) |
|
void | SetVector3 (const char *name, const float *vec3) |
|
void | SetVector4 (const char *name, const float *vec4) |
|
Shader program containing a vertex and pixel shader.
bool ae3d::Shader::IsValid |
( |
| ) |
const |
|
inline |
- Returns
- True if the shader has been succesfully compiled and linked.
void ae3d::Shader::Load |
( |
const char * |
vertexSource, |
|
|
const char * |
fragmentSource |
|
) |
| |
- Parameters
-
vertexSource | Vertex shader source. |
fragmentSource | Fragment shader source. |
- Parameters
-
vertexDataGLSL | GLSL Vertex shader file contents. |
fragmentDataGLSL | GLSL Fragment shader file contents. |
metalVertexShaderName | Vertex shader name for Metal renderer. Must be referenced by the application's Xcode project. |
metalFragmentShaderName | Fragment shader name for Metal renderer. Must be referenced by the application's Xcode project. |
vertexDataHLSL | HLSL Vertex shader file contents. |
fragmentDataHLSL | HLSL Fragment shader file contents. |
void ae3d::Shader::SetFloat |
( |
const char * |
name, |
|
|
float |
value |
|
) |
| |
- Parameters
-
name | Float uniform name. |
value | Value. |
void ae3d::Shader::SetInt |
( |
const char * |
name, |
|
|
int |
value |
|
) |
| |
- Parameters
-
name | Integer uniform name. |
value | Value. |
void ae3d::Shader::SetMatrix |
( |
const char * |
name, |
|
|
const float * |
matrix4x4 |
|
) |
| |
- Parameters
-
name | Matrix uniform name. |
matrix4x4 | Contents of Matrix44. |
void ae3d::Shader::SetRenderTexture |
( |
const char * |
name, |
|
|
const class RenderTexture * |
renderTexture, |
|
|
int |
textureUnit |
|
) |
| |
- Parameters
-
name | Texture uniform name. |
renderTexture | RenderTexture. |
textureUnit | Texture unit. |
void ae3d::Shader::SetTexture |
( |
const char * |
name, |
|
|
const class Texture2D * |
texture, |
|
|
int |
textureUnit |
|
) |
| |
- Parameters
-
name | Texture uniform name. |
texture | Texture. |
textureUnit | Texture unit. |
void ae3d::Shader::SetTexture |
( |
const char * |
name, |
|
|
const class TextureCube * |
texture, |
|
|
int |
textureUnit |
|
) |
| |
- Parameters
-
name | Texture uniform name. |
texture | Texture. |
textureUnit | Texture unit. |
void ae3d::Shader::SetVector3 |
( |
const char * |
name, |
|
|
const float * |
vec3 |
|
) |
| |
- Parameters
-
name | Vector uniform name. |
vec3 | Vec3 contents. |
void ae3d::Shader::SetVector4 |
( |
const char * |
name, |
|
|
const float * |
vec4 |
|
) |
| |
- Parameters
-
name | Vector uniform name. |
vec4 | Vec4 contents. |
The documentation for this class was generated from the following file: