CMGDK r49-rc2
公有成员 | 公有属性
hgl::GLSL类参考

GLSL实现类 更多...

#include <GLSL.H>

继承图,类hgl::GLSL
hgl::Shader hgl::Object hgl::_Object

所有成员的列表。

公有成员

 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< GLuintIndex
 程序索引

详细描述

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::SetUniform1iv ( char *  name,
int  n,
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::SetUniform2i ( char *  name,
int  v0,
int  v1 
)
void hgl::GLSL::SetUniform2iv ( char *  name,
int  n,
int 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::SetUniform3i ( char *  name,
int  v0,
int  v1,
int  v2 
)
void hgl::GLSL::SetUniform3iv ( char *  name,
int  n,
int 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::SetUniform4i ( char *  name,
int  v0,
int  v1,
int  v2,
int  v3 
)
void hgl::GLSL::SetUniform4iv ( char *  name,
int  n,
int 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 
)

成员数据文档

程序索引

本机是否支持GLSL


该类的文档由以下文件生成:
 全部  名字空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义