- 首页
- 相关页面
- 模块
- 命名空间
- 类
- 文件
-
)
- 类列表
- 类索引
- 类继承关系
- 类成员
全部) 类) 命名空间) 文件) 函数) 变量) 类型定义) 枚举) 枚举值) 属性) 友元) 宏定义) 组) 页)
Public 成员函数 | 静态 Public 成员函数 | Protected 成员函数 | Protected 属性 | 友元 | 所有成员列表
GLProgramState类 参考
GLProgramState 持有GL编程的状态(制服和属性). 更多…
#include
类 GLProgramState 继承关系图:
|
## Public 成员函数
|
| void | apply (const Mat4 &modelView) |
| |
| void | setGLProgram (GLProgram glprogram) |
| |
| GLProgram | getGLProgram () const |
| |
| uint32_t | getVertexAttribsFlags () const |
| |
| ssize_t | getVertexAttribCount () const |
| |
| void | setVertexAttribCallback (const std::string &name, const std::function< void(VertexAttrib )> &callback) |
| |
| void | setVertexAttribPointer (const std::string &name, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLvoid pointer) |
| |
| ssize_t | getUniformCount () const |
| |
| void | setUniformInt (const std::string &uniformName, int value) |
| |
| void | setUniformFloat (const std::string &uniformName, float value) |
| |
| void | setUniformVec2 (const std::string &uniformName, const Vec2 &value) |
| |
| void | setUniformVec3 (const std::string &uniformName, const Vec3 &value) |
| |
| void | setUniformVec4 (const std::string &uniformName, const Vec4 &value) |
| |
| void | setUniformMat4 (const std::string &uniformName, const Mat4 &value) |
| |
| void | setUniformCallback (const std::string &uniformName, const std::function< void(Uniform )> &callback) |
| |
| void | setUniformTexture (const std::string &uniformName, Texture2D texture) |
| |
| void | setUniformTexture (const std::string &uniformName, GLuint textureId) |
| |
Public 成员函数 继承自 Ref |
| void | retain () |
| | 保留所有权. 更多…
|
| |
| void | release () |
| | 立即释放所有权. 更多…
|
| |
| Ref * | autorelease () |
| | 自动释放所有权在不久的将来. 更多…
|
| |
| unsigned int | getReferenceCount () const |
| | 返回Ref对象当前的引用计数. 更多…
|
| |
| virtual | ~Ref () |
| | NA NA 更多…
|
| |
详细描述
GLProgramState 持有GL编程的状态(制服和属性).
一个GL编程可以被上千个节点(Nodes)使用,但如果不同的制服值被使用,各个节点将需要自己的GLProgramState
构造及析构函数说明
成员函数说明
| void apply | ( | const Mat4 & | modelView | ) | |
返回指定GL编程的GLProgramState实例
获取或创建指定GL编程的GLProgramState实例
| static GLProgramState* getOrCreateWithGLProgramName | ( | const std::string & | glProgramName | ) | |
| static |
获取或创建指定GL编程的GLProgramState实例
| UniformValue* getUniformValue | ( | const std::string & | uniformName | ) | |
| protected |
| ssize_t getVertexAttribCount | ( | | ) | const |
| inline |
| uint32_t getVertexAttribsFlags | ( | | ) | const |
| inline |
| void setUniformCallback | ( | const std::string & | uniformName, |
| | const std::function< void(Uniform *)> & | callback |
| ) | | |
| void setUniformFloat | ( | const std::string & | uniformName, |
| | float | value |
| ) | | |
| void setUniformInt | ( | const std::string & | uniformName, |
| | int | value |
| ) | | |
| void setUniformMat4 | ( | const std::string & | uniformName, |
| | const Mat4 & | value |
| ) | | |
| void setUniformTexture | ( | const std::string & | uniformName, |
| | Texture2D * | texture |
| ) | | |
| void setUniformTexture | ( | const std::string & | uniformName, |
| | GLuint | textureId |
| ) | | |
| void setUniformVec2 | ( | const std::string & | uniformName, |
| | const Vec2 & | value |
| ) | | |
| void setUniformVec3 | ( | const std::string & | uniformName, |
| | const Vec3 & | value |
| ) | | |
| void setUniformVec4 | ( | const std::string & | uniformName, |
| | const Vec4 & | value |
| ) | | |
| void setVertexAttribCallback | ( | const std::string & | name, |
| | const std::function< void(VertexAttrib *)> & | callback |
| ) | | |
| void setVertexAttribPointer | ( | const std::string & | name, |
| | GLint | size, |
| | GLenum | type, |
| | GLboolean | normalized, |
| | GLsizei | stride, |
| | GLvoid * | pointer |
| ) | | |
友元及相关函数文档
类成员变量说明
该类的文档由以下文件生成: