eXperiment robotics framework

GLSLProgram Class Reference

#include <GLSLProgram.hpp>

Collaboration diagram for GLSLProgram:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 GLSLProgram ()
 GLSLProgram (const std::string &shader, unsigned int shaderType=GL_VERTEX_SHADER_ARB)
 GLSLProgram (const std::string &vertexShader, const std::string &fragmentShader)
 ~GLSLProgram ()
void attach (GLSLShader &shader)
void attach (GLSLShader *shader)
void detach (GLSLShader &shader)
void detach (GLSLShader *shader)
void link ()
void use () const
void disable () const
void sendUniform (const std::string &name, float x)
void sendUniform (const std::string &name, float x, float y)
void sendUniform (const std::string &name, float x, float y, float z)
void sendUniform (const std::string &name, float x, float y, float z, float w)
void sendUniform (const std::string &name, int x)
void sendUniform (const std::string &name, int x, int y)
void sendUniform (const std::string &name, int x, int y, int z)
void sendUniform (const std::string &name, int x, int y, int z, int w)
void sendUniform (const std::string &name, float *m, bool transp=false, int size=4)
void sendUniform (GLuint location, float x)
void sendUniform (GLuint location, float x, float y)
void sendUniform (GLuint location, float x, float y, float z)
void sendUniform (GLuint location, float x, float y, float z, float w)
void sendUniform (GLuint location, int x)
void sendUniform (GLuint location, int x, int y)
void sendUniform (GLuint location, int x, int y, int z)
void sendUniform (GLuint location, int x, int y, int z, int w)
void sendUniform (GLuint location, float *m, bool transp=false, int size=4)
GLuint getUniformLocation (const std::string &name) const
void setAttributeLocation (const std::string &name, GLuint location)
GLuint getAttributeLocation (const std::string &name) const
void GetProgramLog (std::string &log) const
GLuint getHandle () const
void getParameter (GLenum param, GLint *data) const
void validate () const
bool IsValidProgram () const
void getAttributeInfo (GLuint location, std::string &name, GLenum &type, GLint &size) const
void getUniformInfo (GLuint location, std::string &name, GLenum &datatype, GLint &size) const
void getAttachedShaders (std::vector< GLuint > &shaderhandles)
void getAttachedShaders (std::vector< GLSLShader > &shaders)

Private Types

typedef std::map< std::string,
int > 
uniformmap

Private Member Functions

int getLoc (const std::string &name)

Private Attributes

GLSLShadervertex_
GLSLShaderfragment_
GLuint handle_
uniformmap uniforms_


Detailed Description

Definition at line 10 of file GLSLProgram.hpp.


Member Typedef Documentation

typedef std::map<std::string,int> GLSLProgram::uniformmap [private]

Definition at line 66 of file GLSLProgram.hpp.


Constructor & Destructor Documentation

GLSLProgram::GLSLProgram (  ) 

GLSLProgram::GLSLProgram ( const std::string &  shader,
unsigned int  shaderType = GL_VERTEX_SHADER_ARB 
)

GLSLProgram::GLSLProgram ( const std::string &  vertexShader,
const std::string &  fragmentShader 
)

GLSLProgram::~GLSLProgram (  ) 


Member Function Documentation

void GLSLProgram::attach ( GLSLShader shader  ) 

void GLSLProgram::attach ( GLSLShader shader  ) 

void GLSLProgram::detach ( GLSLShader shader  ) 

void GLSLProgram::detach ( GLSLShader shader  ) 

void GLSLProgram::link (  ) 

void GLSLProgram::use (  )  const

void GLSLProgram::disable (  )  const

void GLSLProgram::sendUniform ( const std::string &  name,
float  x 
)

void GLSLProgram::sendUniform ( const std::string &  name,
float  x,
float  y 
)

void GLSLProgram::sendUniform ( const std::string &  name,
float  x,
float  y,
float  z 
)

void GLSLProgram::sendUniform ( const std::string &  name,
float  x,
float  y,
float  z,
float  w 
)

void GLSLProgram::sendUniform ( const std::string &  name,
int  x 
)

void GLSLProgram::sendUniform ( const std::string &  name,
int  x,
int  y 
)

void GLSLProgram::sendUniform ( const std::string &  name,
int  x,
int  y,
int  z 
)

void GLSLProgram::sendUniform ( const std::string &  name,
int  x,
int  y,
int  z,
int  w 
)

void GLSLProgram::sendUniform ( const std::string &  name,
float *  m,
bool  transp = false,
int  size = 4 
)

void GLSLProgram::sendUniform ( GLuint  location,
float  x 
)

void GLSLProgram::sendUniform ( GLuint  location,
float  x,
float  y 
)

void GLSLProgram::sendUniform ( GLuint  location,
float  x,
float  y,
float  z 
)

void GLSLProgram::sendUniform ( GLuint  location,
float  x,
float  y,
float  z,
float  w 
)

void GLSLProgram::sendUniform ( GLuint  location,
int  x 
)

void GLSLProgram::sendUniform ( GLuint  location,
int  x,
int  y 
)

void GLSLProgram::sendUniform ( GLuint  location,
int  x,
int  y,
int  z 
)

void GLSLProgram::sendUniform ( GLuint  location,
int  x,
int  y,
int  z,
int  w 
)

void GLSLProgram::sendUniform ( GLuint  location,
float *  m,
bool  transp = false,
int  size = 4 
)

GLuint GLSLProgram::getUniformLocation ( const std::string &  name  )  const

void GLSLProgram::setAttributeLocation ( const std::string &  name,
GLuint  location 
)

GLuint GLSLProgram::getAttributeLocation ( const std::string &  name  )  const

void GLSLProgram::GetProgramLog ( std::string &  log  )  const

GLuint GLSLProgram::getHandle (  )  const

void GLSLProgram::getParameter ( GLenum  param,
GLint *  data 
) const

void GLSLProgram::validate (  )  const

bool GLSLProgram::IsValidProgram (  )  const

void GLSLProgram::getAttributeInfo ( GLuint  location,
std::string &  name,
GLenum &  type,
GLint &  size 
) const

void GLSLProgram::getUniformInfo ( GLuint  location,
std::string &  name,
GLenum &  datatype,
GLint &  size 
) const

void GLSLProgram::getAttachedShaders ( std::vector< GLuint > &  shaderhandles  ) 

void GLSLProgram::getAttachedShaders ( std::vector< GLSLShader > &  shaders  ) 

int GLSLProgram::getLoc ( const std::string &  name  )  [private]


Member Data Documentation

Definition at line 64 of file GLSLProgram.hpp.

Definition at line 64 of file GLSLProgram.hpp.

GLuint GLSLProgram::handle_ [private]

Definition at line 65 of file GLSLProgram.hpp.

Definition at line 67 of file GLSLProgram.hpp.


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

The miarn project - written by Joao Xavier