Manage GPU programs in the pipeline.
More...
Functions |
shared_shader_t | glpp::open_shader_file (shader_type type, const std::string fname) |
| Create shader object from in-file source code.
|
shared_shader_t | glpp::open_shader_files (shader_type type, std::initializer_list< const std::string > fnames) |
| Create shader object from multiple GLSL source files.
|
void | glpp::bind_to (GLuint point, uniform_block *pblock, buffer *pbuffer) throw (std::invalid_argument) |
| Bind a uniform_block and a uniform buffer object to common point.
|
Detailed Description
Manage GPU programs in the pipeline.
In OpenGL many parts of pipeline are dynamically programmable by user. This module wraps all parts of OpenGL that are directly responsible for manipulating user programs.
Function Documentation
void glpp::bind_to |
( |
GLuint |
point, |
|
|
uniform_block * |
pblock, |
|
|
buffer * |
pbuffer |
|
) |
| throw (std::invalid_argument) |
Bind a uniform_block and a uniform buffer object to common point.
- Parameters
-
point | The point to bind both objects. If something else is binded there, it will be overwritten |
pblock | Pointer to uniform_block that will binded with the uniform buffer object. |
pbuffer | Pointer to uniform buffer object. This object will be checked that it is of type() uniform. |
- Exceptions
-
std::invalid_argument | If the pbuffer is not of uniform type. |
- See Also
- uniform_block::bind_to_point(), buffer::bind_to_point()
shared_shader_t glpp::open_shader_file |
( |
shader_type |
type, |
|
|
const std::string |
fname |
|
) |
| |
Create shader object from in-file source code.
- Parameters
-
type | Type of the shader to create |
fname | Filename where GLSL source code resides |
- Exceptions
-
std::invalid_argument | If the file cannot be accessed. |
- See Also
- open_shader_files()
shared_shader_t glpp::open_shader_files |
( |
shader_type |
type, |
|
|
std::initializer_list< const std::string > |
fnames |
|
) |
| |
Create shader object from multiple GLSL source files.
- Parameters
-
type | Type of the shader to create |
fnames | Filenames where GLSL source code resides. The order of file is important, as in the same order the source code will be concatenated. |
- Exceptions
-
std::invalid_argument | If any of the files cannot be accessed. |
- See Also
- open_shader_file()