yage.resource.shader
Authors:
Eric Poggel
License:
LGPL v3
- class
Shader
;
-
Shader
stores vertex and fragment shader source code
used by the graphics API to create a shader program.
GraphicsApi.bindShader(
Shader
) binds the shader program, creating it if it doesn't exist.
- char[]
compileLog
;
- this(char[] vertexSource, char[] fragmentSource);
- Params:
char[] vertexSource |
Source code of a vertex shader. |
char[] fragmentSource |
Source code of a fragment shader. |
- char[]
getVertexSource
(bool nullTerminated = false);
- char[]
getFragmentSource
(bool nullTerminated = false);
- ShaderUniform[]
getUniforms
();
- TODO, this should get the uniform variable names and types
- struct
ShaderUniform
;
- Used to pass variables to a shader
- enum
Type
;
- Type
type
;
- char[64u]
name
;
- int[16u]
intValues
;
- float[16u]
floatValues
;
- static ShaderUniform
opCall
(char[] name, Type type, float[] values...);
static ShaderUniform
opCall
(char[] name, Type type, int[] values...);
- Constructors
|