ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <shader.h>

Collaboration diagram for OpenGL::Shader:

List of all members.

Public Member Functions

 ~Shader ()
Shaderclone ()
void use (bool forceReload=false)
void setUniform (const char *uniform, const Math::Matrix4 &m)
void setUniform (const char *uniform, const Math::Matrix3 &m)
void setUniform (const char *uniform, const Math::Vector4d &v)
void setUniform (const char *uniform, const Math::Vector3d &v)
void setUniform (const char *uniform, const Math::Vector2d &v)
void setUniform (const char *uniform, unsigned int x)
void setUniform1f (const char *uniform, float f)
GLint getUniformLocation (const char *uniform) const
void enableVertexAttribute (const char *attrib, GLuint vbo, GLint size, GLenum type, GLboolean normalized, GLsizei stride, uint32 offset)
void disableVertexAttribute (const char *attrib, int size, const float *data)
template<int r>
void disableVertexAttribute (const char *attrib, const Math::Matrix< r, 1 > &m)
VertexAttribgetAttributeAt (uint32 idx)
VertexAttribgetAttribute (const char *attrib)
void unbind ()

Static Public Member Functions

static GLuint createBuffer (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage=GL_STATIC_DRAW)
static void freeBuffer (GLuint vbo)
static ShaderfromFiles (const char *vertex, const char *fragment, const char **attributes)
static ShaderfromFiles (const char *shared, const char **attributes)
static ShaderfromStrings (const Common::String &name, const char *vertex, const char *fragment, const char **attributes)

Private Types

typedef Common::HashMap
< Common::String, GLint > 
UniformsMap

Private Member Functions

 Shader (const Common::String &name, GLuint vertexShader, GLuint fragmentShader, const char **attributes)

Private Attributes

Common::SharedPtr< GLuint > _shaderNo
Common::String _name
Common::Array< VertexAttrib_attributes
Common::SharedPtr< UniformsMap_uniforms

Static Private Attributes

static Shader_previousShader

Detailed Description

Definition at line 62 of file shader.h.


Member Typedef Documentation

Definition at line 63 of file shader.h.


Constructor & Destructor Documentation

OpenGL::Shader::~Shader (  ) 
OpenGL::Shader::Shader ( const Common::String name,
GLuint  vertexShader,
GLuint  fragmentShader,
const char **  attributes 
) [private]

Member Function Documentation

Shader* OpenGL::Shader::clone (  )  [inline]

Definition at line 67 of file shader.h.

static GLuint OpenGL::Shader::createBuffer ( GLenum  target,
GLsizeiptr  size,
const GLvoid *  data,
GLenum  usage = GL_STATIC_DRAW 
) [static]
void OpenGL::Shader::disableVertexAttribute ( const char *  attrib,
int  size,
const float *  data 
)
template<int r>
void OpenGL::Shader::disableVertexAttribute ( const char *  attrib,
const Math::Matrix< r, 1 > &  m 
) [inline]

Definition at line 131 of file shader.h.

void OpenGL::Shader::enableVertexAttribute ( const char *  attrib,
GLuint  vbo,
GLint  size,
GLenum  type,
GLboolean  normalized,
GLsizei  stride,
uint32  offset 
)
static void OpenGL::Shader::freeBuffer ( GLuint  vbo  )  [static]
static Shader* OpenGL::Shader::fromFiles ( const char *  vertex,
const char *  fragment,
const char **  attributes 
) [static]
static Shader* OpenGL::Shader::fromFiles ( const char *  shared,
const char **  attributes 
) [inline, static]

Definition at line 141 of file shader.h.

static Shader* OpenGL::Shader::fromStrings ( const Common::String name,
const char *  vertex,
const char *  fragment,
const char **  attributes 
) [static]
VertexAttrib& OpenGL::Shader::getAttribute ( const char *  attrib  ) 
VertexAttrib& OpenGL::Shader::getAttributeAt ( uint32  idx  ) 
GLint OpenGL::Shader::getUniformLocation ( const char *  uniform  )  const [inline]

Definition at line 117 of file shader.h.

void OpenGL::Shader::setUniform ( const char *  uniform,
const Math::Matrix3 m 
) [inline]

Definition at line 79 of file shader.h.

void OpenGL::Shader::setUniform ( const char *  uniform,
unsigned int  x 
) [inline]

Definition at line 103 of file shader.h.

void OpenGL::Shader::setUniform ( const char *  uniform,
const Math::Vector2d v 
) [inline]

Definition at line 97 of file shader.h.

void OpenGL::Shader::setUniform ( const char *  uniform,
const Math::Matrix4 m 
) [inline]

Definition at line 73 of file shader.h.

void OpenGL::Shader::setUniform ( const char *  uniform,
const Math::Vector4d v 
) [inline]

Definition at line 85 of file shader.h.

void OpenGL::Shader::setUniform ( const char *  uniform,
const Math::Vector3d v 
) [inline]

Definition at line 91 of file shader.h.

void OpenGL::Shader::setUniform1f ( const char *  uniform,
float  f 
) [inline]

Definition at line 110 of file shader.h.

void OpenGL::Shader::unbind (  ) 
void OpenGL::Shader::use ( bool  forceReload = false  ) 

Member Data Documentation

Definition at line 159 of file shader.h.

Definition at line 157 of file shader.h.

Definition at line 162 of file shader.h.

Definition at line 155 of file shader.h.

Definition at line 160 of file shader.h.


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


Generated on Sat May 18 2019 05:07:06 for ResidualVM by doxygen 1.7.1
curved edge   curved edge