Functions for working with OpenGL ES shaders.
More...
#include <Shader.h>
List of all members.
Static Public Member Functions |
static void | processShader (GLuint *shader, const char *filename, GLint shaderType) |
| Create shader, load in source, compile, and dump debug as necessary.
|
Static Private Member Functions |
static char * | loadShader (const char *filename) |
| Load shader source from a file into memory.
|
Detailed Description
Functions for working with OpenGL ES shaders.
Member Function Documentation
char * MaliSDK::Shader::loadShader |
( |
const char * |
filename | ) |
|
|
staticprivate |
Load shader source from a file into memory.
- Parameters:
-
[in] | filename | File name of the shader to load. |
- Returns:
- A character array containing the contents of the shader source file.
void MaliSDK::Shader::processShader |
( |
GLuint * |
shader, |
|
|
const char * |
filename, |
|
|
GLint |
shaderType |
|
) |
| |
|
static |
Create shader, load in source, compile, and dump debug as necessary.
Loads the OpenGL ES Shading Language code into memory. Creates a shader using with the required shaderType using glCreateShader(shaderType) and then compiles it using glCompileShader. The output from the compilation is checked for success and a log of the compilation errors is printed in the case of failure.
- Parameters:
-
[out] | shader | The shader ID of the newly compiled shader. |
[in] | filename | Filename of a file containing OpenGL ES SL source code. |
[in] | shaderType | Passed to glCreateShader to define the type of shader being processed. Must be GL_VERTEX_SHADER or GL_FRAGMENT_SHADER. |
The documentation for this class was generated from the following files:
- simple-framework/inc/Shader.h
- simple-framework/src/Shader.cpp