Abstract superclass for all shader programs.
More...
#include <Programs.h>
|
void | use () const |
| Bind this program to the GPU.
|
|
bool | isReady () const |
| Returns true if the program is ready to be used. More...
|
|
|
| AbstractProgram () |
| Constructor.
|
|
virtual | ~AbstractProgram () |
| Destructor.
|
|
GLuint | createShader (const GLenum shaderType, const GLchar *const code, const char *const name) const |
| Create a shader from source code. More...
|
|
GLuint | loadShader (const GLenum shaderType, const char *const filename) const |
| Create a shader from a file. More...
|
|
bool | link (const char *const name) const |
| Link the associated shader stages. More...
|
|
Abstract superclass for all shader programs.
GLuint gpu_coverage::AbstractProgram::createShader |
( |
const GLenum |
shaderType, |
|
|
const GLchar *const |
code, |
|
|
const char *const |
name |
|
) |
| const |
|
protected |
Create a shader from source code.
- Parameters
-
[in] | shaderType | Shader type GL_VERTEX_SHADER, GL_FRAGMENT_SHADER, ... |
[in] | code | Source code for the shader. |
- Returns
- Shader number or 0 in case of failure.
bool gpu_coverage::AbstractProgram::isReady |
( |
| ) |
const |
|
inline |
Returns true if the program is ready to be used.
- Returns
- True if ready.
bool gpu_coverage::AbstractProgram::link |
( |
const char *const |
name | ) |
const |
|
protected |
Link the associated shader stages.
- Parameters
-
name | Human-readable program name for debugging. |
- Returns
- True on success.
GLuint gpu_coverage::AbstractProgram::loadShader |
( |
const GLenum |
shaderType, |
|
|
const char *const |
filename |
|
) |
| const |
|
protected |
Create a shader from a file.
- Parameters
-
[in] | shaderType | Shader type GL_VERTEX_SHADER, GL_FRAGMENT_SHADER, ... |
[in] | code | File name of the shader source code file. |
- Returns
- Shader number or 0 in case of failure.
static void gpu_coverage::AbstractProgram::setOpenGLVersion |
( |
| ) |
|
|
static |
Reads versions and available extensions from the GPU.
This method must be called after initializing OpenGL and before instantiating any shader program.
The documentation for this class was generated from the following file: