OpenGL ES SDK for Android
ARM Developer Center
|
#include <shader.h>
Public Member Functions | |
Shader () | |
bool | load_from_src (const string *sources, GLenum *types, int count) |
bool | load_from_src (string vs_src, string fs_src) |
bool | load_from_file (const string *paths, GLenum *types, int count) |
bool | load_from_file (string vs_path, string fs_path) |
bool | load_compute_from_file (string cs_path) |
bool | link () |
void | dispose () |
void | use () |
void | unuse () |
GLint | get_uniform_location (string name) |
GLint | get_attribute_location (string name) |
void | set_attribfv (string name, GLsizei num_components, GLsizei stride, GLsizei offset) |
void | unset_attrib (string name) |
void | set_uniform (string name, const mat4 &v) |
void | set_uniform (string name, const vec4 &v) |
void | set_uniform (string name, const vec3 &v) |
void | set_uniform (string name, const vec2 &v) |
void | set_uniform (string name, double v) |
void | set_uniform (string name, float v) |
void | set_uniform (string name, int v) |
void | set_uniform (string name, unsigned int v) |
Shader () | |
bool | load_from_src (const string *sources, GLenum *types, int count) |
bool | load_from_src (string vs_src, string fs_src) |
bool | load_from_file (const string *paths, GLenum *types, int count) |
bool | load_from_file (string vs_path, string fs_path) |
bool | link () |
void | dispose () |
void | use () |
void | unuse () |
GLint | get_uniform_location (string name) |
GLint | get_attribute_location (string name) |
void | set_attribfv (string name, GLsizei num_components, GLsizei stride, GLsizei offset) |
void | unset_attrib (string name) |
void | set_uniform (string name, const mat4 &v) |
void | set_uniform (string name, const vec4 &v) |
void | set_uniform (string name, const vec3 &v) |
void | set_uniform (string name, const vec2 &v) |
void | set_uniform (string name, double v) |
void | set_uniform (string name, float v) |
void | set_uniform (string name, int v) |
void | set_uniform (string name, unsigned int v) |
Private Attributes | |
std::unordered_map< string, GLint > | m_attributes |
std::unordered_map< string, GLint > | m_uniforms |
GLuint | m_id |
std::vector< GLuint > | m_shaders |
Shader::Shader | ( | ) |
Definition at line 24 of file shader.cpp.
Shader::Shader | ( | ) |
void Shader::dispose | ( | ) |
void Shader::dispose | ( | ) |
Definition at line 129 of file shader.cpp.
GLint Shader::get_attribute_location | ( | string | name | ) |
GLint Shader::get_attribute_location | ( | string | name | ) |
Definition at line 165 of file shader.cpp.
GLint Shader::get_uniform_location | ( | string | name | ) |
GLint Shader::get_uniform_location | ( | string | name | ) |
Definition at line 148 of file shader.cpp.
bool Shader::link | ( | ) |
bool Shader::link | ( | ) |
Definition at line 124 of file shader.cpp.
bool Shader::load_compute_from_file | ( | string | cs_path | ) |
Definition at line 117 of file shader.cpp.
Definition at line 93 of file shader.cpp.
bool Shader::load_from_file | ( | string | vs_path, |
string | fs_path | ||
) |
Definition at line 110 of file shader.cpp.
bool Shader::load_from_file | ( | string | vs_path, |
string | fs_path | ||
) |
Definition at line 72 of file shader.cpp.
bool Shader::load_from_src | ( | string | vs_src, |
string | fs_src | ||
) |
Definition at line 86 of file shader.cpp.
bool Shader::load_from_src | ( | string | vs_src, |
string | fs_src | ||
) |
void Shader::set_attribfv | ( | string | name, |
GLsizei | num_components, | ||
GLsizei | stride, | ||
GLsizei | offset | ||
) |
void Shader::set_attribfv | ( | string | name, |
GLsizei | num_components, | ||
GLsizei | stride, | ||
GLsizei | offset | ||
) |
Definition at line 182 of file shader.cpp.
Definition at line 202 of file shader.cpp.
Definition at line 203 of file shader.cpp.
Definition at line 204 of file shader.cpp.
void Shader::set_uniform | ( | string | name, |
double | v | ||
) |
Definition at line 205 of file shader.cpp.
void Shader::set_uniform | ( | string | name, |
double | v | ||
) |
Definition at line 206 of file shader.cpp.
Definition at line 207 of file shader.cpp.
Definition at line 208 of file shader.cpp.
Definition at line 209 of file shader.cpp.
void Shader::unset_attrib | ( | string | name | ) |
void Shader::unset_attrib | ( | string | name | ) |
Definition at line 197 of file shader.cpp.
void Shader::unuse | ( | ) |
void Shader::unuse | ( | ) |
Definition at line 143 of file shader.cpp.
void Shader::use | ( | ) |
void Shader::use | ( | ) |
Definition at line 138 of file shader.cpp.
|
private |
|
private |