![]() |
CMGDK r49-rc2
|
GLSL实现类 更多...
#include <GLSL.H>
公有成员 | |
GLSL () | |
GLSL (const char *, const char *) | |
GLSL (const wchar_t *) | |
GLSL (const wchar_t *, const wchar_t *) | |
~GLSL () | |
bool | Compile (const char *, const char *) |
bool | Compile (char *) |
bool | CompileFile (const wchar_t *) |
bool | CompileFile (const wchar_t *, const wchar_t *) |
bool | CompileVertex (const char *) |
bool | CompileFragment (const char *) |
bool | CompileVertexFile (const wchar_t *) |
bool | CompileFragmentFile (const wchar_t *) |
bool | Begin () |
void | End () |
void | Clear () |
void | SetUniform1f (char *, float) |
void | SetUniform2f (char *, float, float) |
void | SetUniform3f (char *, float, float, float) |
void | SetUniform4f (char *, float, float, float, float) |
void | SetUniform1i (char *, int) |
void | SetUniform2i (char *, int, int) |
void | SetUniform3i (char *, int, int, int) |
void | SetUniform4i (char *, int, int, int, int) |
void | SetUniform1fv (char *, int, float *) |
void | SetUniform2fv (char *, int, float *) |
void | SetUniform3fv (char *, int, float *) |
void | SetUniform4fv (char *, int, float *) |
void | SetUniform1iv (char *, int, int *) |
void | SetUniform2iv (char *, int, int *) |
void | SetUniform3iv (char *, int, int *) |
void | SetUniform4iv (char *, int, int *) |
void | SetUniformMatrix2fv (char *, int, bool, float *) |
void | SetUniformMatrix3fv (char *, int, bool, float *) |
void | SetUniformMatrix4fv (char *, int, bool, float *) |
void | GetUniformfv (char *, float *) |
void | GetUniformiv (char *, int *) |
公有属性 | |
Property< bool > | Support |
本机是否支持GLSL | |
Property< GLuint > | Index |
程序索引 |
GLSL实现类
GLSL类是OpenGL Shading Language在程序实现上的简单封装,通过它你可以简单的控制一个GLSL程序
只有一个字符串传入的GLSL程序文本需要按ATI惯例书写标识,在顶点程序前书写标识“[Vertex shader]”或“<vertex>”; 在片断程序前书写标识“[Fragment shader]”或“<fragment>”
hgl::GLSL::GLSL | ( | ) |
本类构造函数
hgl::GLSL::GLSL | ( | const char * | vertex_program, |
const char * | fragment_program | ||
) |
本类构造函数,并编译指定的程序
vertex_program | 顶点程序指针 |
fragment_program | 片断程序指针 |
hgl::GLSL::GLSL | ( | const wchar_t * | filename | ) |
本类构造函数,并编译指定程序文件
filename | 程序文件名称 |
hgl::GLSL::GLSL | ( | const wchar_t * | vp_filename, |
const wchar_t * | fp_filename | ||
) |
本类构造函数,并编译指定的程序,程序在指定的文件中
vp_filename | 顶点程序文件名称 |
fp_filename | 片断程序文件名称 |
hgl::GLSL::~GLSL | ( | ) |
析构函数
bool hgl::GLSL::Begin | ( | ) | [virtual] |
开始使用这段GLSL程序
重载hgl::Shader。
void hgl::GLSL::Clear | ( | ) |
清除GLSL程序,如想使用新的GLSL程序,请重新调用Compile
bool hgl::GLSL::Compile | ( | char * | program_text | ) |
编译指定的程序
program_text | 程序文本指针 |
bool hgl::GLSL::Compile | ( | const char * | vertex_program, |
const char * | fragment_program | ||
) |
编译指定的程序
vertex_program | 顶点程序指针 |
fragment_program | 片断程序指针 |
bool hgl::GLSL::CompileFile | ( | const wchar_t * | vp_filename, |
const wchar_t * | fp_filename | ||
) |
编译指定的程序,程序在指定的文件中
vp_filename | 顶点程序文件名称 |
fp_filename | 片断程序文件名称 |
bool hgl::GLSL::CompileFile | ( | const wchar_t * | filename | ) |
编译指定的程序,程序在指定的文件中
filename | 程序文件名称 |
bool hgl::GLSL::CompileFragment | ( | const char * | str | ) |
bool hgl::GLSL::CompileFragmentFile | ( | const wchar_t * | str | ) |
bool hgl::GLSL::CompileVertex | ( | const char * | str | ) |
bool hgl::GLSL::CompileVertexFile | ( | const wchar_t * | str | ) |
void hgl::GLSL::End | ( | ) | [virtual] |
结束使用GLSL程序
重载hgl::Shader。
void hgl::GLSL::GetUniformfv | ( | char * | name, |
float * | value | ||
) |
void hgl::GLSL::GetUniformiv | ( | char * | name, |
int * | value | ||
) |
void hgl::GLSL::SetUniform1f | ( | char * | name, |
float | v | ||
) |
void hgl::GLSL::SetUniform1fv | ( | char * | name, |
int | n, | ||
float * | v | ||
) |
void hgl::GLSL::SetUniform1i | ( | char * | name, |
int | v | ||
) |
void hgl::GLSL::SetUniform2f | ( | char * | name, |
float | v0, | ||
float | v1 | ||
) |
void hgl::GLSL::SetUniform2fv | ( | char * | name, |
int | n, | ||
float * | v | ||
) |
void hgl::GLSL::SetUniform3f | ( | char * | name, |
float | v0, | ||
float | v1, | ||
float | v2 | ||
) |
void hgl::GLSL::SetUniform3fv | ( | char * | name, |
int | n, | ||
float * | v | ||
) |
void hgl::GLSL::SetUniform4f | ( | char * | name, |
float | v0, | ||
float | v1, | ||
float | v2, | ||
float | v3 | ||
) |
void hgl::GLSL::SetUniform4fv | ( | char * | name, |
int | n, | ||
float * | v | ||
) |
void hgl::GLSL::SetUniformMatrix2fv | ( | char * | name, |
int | n, | ||
bool | transpose, | ||
float * | value | ||
) |
void hgl::GLSL::SetUniformMatrix3fv | ( | char * | name, |
int | n, | ||
bool | transpose, | ||
float * | value | ||
) |
void hgl::GLSL::SetUniformMatrix4fv | ( | char * | name, |
int | n, | ||
bool | transpose, | ||
float * | value | ||
) |
程序索引
Property<bool> hgl::GLSL::Support |
本机是否支持GLSL