Maintains an OpenGL shader object. Realizes the RAII-idiom.
More...
#include <Shader.h>
|
| Shader (unsigned int type, const std::string &src) |
| Compiles src and creates new OpenGL shader object of type. More...
|
|
| ~Shader () |
| Deletes the maintained OpenGL shader object.
|
|
|
const unsigned int | id |
| Identifies the maintained OpenGL shader object.
|
|
const unsigned int | type |
| Holds the type of the maintained OpenGL shader object. This is TYPE_VERTEX_SHADER , TYPE_GEOMETRY_SHADER or TYPE_FRAGMENT_SHADER usually.
|
|
|
static const unsigned int | TYPE_VERTEX_SHADER |
| Indicates shader object of GL_VERTEX_SHADER type.
|
|
static const unsigned int | TYPE_FRAGMENT_SHADER |
| Indicates shader object of GL_FRAGMENT_SHADER type.
|
|
static const unsigned int | TYPE_GEOMETRY_SHADER |
| Indicates shader object of GL_GEOMETRY_SHADER type.
|
|
Maintains an OpenGL shader object. Realizes the RAII-idiom.
- See also
- The concept of shaders is explained here.
- Author
- Leonid Kostrykin
- Date
- 2009 - 2015
Definition at line 47 of file Shader.h.
◆ Shader()
Carna::base::Shader::Shader |
( |
unsigned int |
type, |
|
|
const std::string & |
src |
|
) |
| |
Compiles src and creates new OpenGL shader object of type.
- Parameters
-
type | is usually TYPE_VERTEX_SHADER , TYPE_GEOMETRY_SHADER or TYPE_FRAGMENT_SHADER . |
src | references the shader source code. |
- Exceptions
-
The documentation for this class was generated from the following file: