Lums
Public Member Functions | List of all members
lm::ShaderProgram Class Reference

A class representing a linked shader. More...

#include <ShaderProgram.hpp>

Public Member Functions

 ShaderProgram ()
 
GLuint program () const
 
void bindAttribLocation (GLint index, const char *name) const
 
void attach (const Shader &shader)
 
void link ()
 
void use () const
 
 ~ShaderProgram ()
 

Detailed Description

A class representing a linked shader.

Constructor & Destructor Documentation

lm::ShaderProgram::ShaderProgram ( )

Construct a shader program

lm::ShaderProgram::~ShaderProgram ( )

Shader program dtor

Member Function Documentation

void lm::ShaderProgram::attach ( const Shader shader)

Attach a shader to the program

Parameters
shaderThe shader to attach
void lm::ShaderProgram::bindAttribLocation ( GLint  index,
const char *  name 
) const
inline

Bind an attribute location inside the shader program

Parameters
indexThe index to be bound
nameThe name of the attribute
void lm::ShaderProgram::link ( )

Link the shader

GLuint lm::ShaderProgram::program ( ) const
inline

Get the raw shader program

Returns
The raw shader program
void lm::ShaderProgram::use ( ) const

Use the shader


The documentation for this class was generated from the following file: