Mali OpenGL ES SDK  2.0.0
A simple framework to aid development of OpenGL ES applications targeting ARM Mali platforms.
 All Classes Files Functions Variables Enumerations Enumerator
MaliSDK::Shader Class Reference

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]filenameFile 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]shaderThe shader ID of the newly compiled shader.
[in]filenameFilename of a file containing OpenGL ES SL source code.
[in]shaderTypePassed 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: