An OpenGL implementation of Shader.
More...
#include <glShader.h>
An OpenGL implementation of Shader.
◆ glShader() [1/3]
jGL::GL::glShader::glShader |
( |
const char * |
v, |
|
|
const char * |
f |
|
) |
| |
|
inline |
Construct a glShader from a vertex and fragment source.
- Parameters
-
v | vertex shader source. |
f | fragment shader source. |
◆ glShader() [2/3]
jGL::GL::glShader::glShader |
( |
| ) |
|
|
inline |
◆ glShader() [3/3]
jGL::GL::glShader::glShader |
( |
std::string |
path, |
|
|
std::string |
name |
|
) |
| |
|
inline |
Construct a glShader from source given by paths.
- Parameters
-
path | path the .vs and .fs shader sources. |
name | name of sources in path: name.vs and name.fs |
◆ ~glShader()
jGL::GL::glShader::~glShader |
( |
| ) |
|
|
inline |
◆ compile()
void jGL::GL::glShader::compile |
( |
| ) |
|
|
virtual |
◆ create()
void jGL::GL::glShader::create |
( |
| ) |
|
Create the shader program.
◆ isCompiled()
bool jGL::GL::glShader::isCompiled |
( |
| ) |
|
|
inline |
Checks if the glShader is compiled.
- Returns
- true it is compiled.
-
false it is not compiled.
◆ isProgram()
bool jGL::GL::glShader::isProgram |
( |
| ) |
|
|
inline |
Checks if an OpenGL program is created.
- Returns
- true a program has been created.
-
false a program has not been created.
◆ release()
void jGL::GL::glShader::release |
( |
| ) |
|
Destroy the shader program.
◆ use()
void jGL::GL::glShader::use |
( |
| ) |
|
|
virtual |
Use the shader program (and compile if required).
Implements jGL::Shader.
The documentation for this struct was generated from the following files: