GL++  0.1
OpenGL API C++ Wrapper
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Groups Pages
GPU Programmable pipeline

Manage GPU programs in the pipeline. More...

Classes

struct  glpp::global_uniform
 Active uniform variable of global scope. More...
struct  glpp::program
 Program that can be executed in the GPU pipeline. More...
struct  glpp::shader
 GPU Shader object. More...
struct  glpp::uniform
 Query object for active uniform variable. More...
struct  glpp::uniform_block
 Active uniform block of a program. 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
pointThe point to bind both objects. If something else is binded there, it will be overwritten
pblockPointer to uniform_block that will binded with the uniform buffer object.
pbufferPointer to uniform buffer object. This object will be checked that it is of type() uniform.
Exceptions
std::invalid_argumentIf 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
typeType of the shader to create
fnameFilename where GLSL source code resides
Exceptions
std::invalid_argumentIf 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
typeType of the shader to create
fnamesFilenames 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_argumentIf any of the files cannot be accessed.
See Also
open_shader_file()