[Mesa-dev] [PATCH 9/9] mesa : Api binding for UBO
vlj
vljn at ovi.com
Fri Sep 23 06:53:14 PDT 2011
---
src/mesa/main/uniforms.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index b923aef..172c817 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -1522,6 +1522,23 @@ _mesa_GetActiveUniformARB(GLhandleARB program, GLuint index,
type, name);
}
+void GLAPIENTRY
+_mesa_GetActiveUniformBlockInfo(GLint program,GLuint ubo_index,GLenum pname, GLint* params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_shader_program *shProg =
+ _mesa_lookup_shader_program_err(ctx, program, "GetActiveUniformBlockiv");
+ _mesa_query_ubo_general(ctx,shProg,ubo_index,pname,params);
+}
+
+void GLAPIENTRY
+_mesa_GetActiveUniformBlockName(GLint program,GLuint ubo_index,GLsizei bufsize, GLint* length, char* name)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_shader_program *shProg =
+ _mesa_lookup_shader_program_err(ctx, program, "GetActiveUniformBlockName");
+ _mesa_get_ubo_name(ctx,shProg,ubo_index,bufsize,length,name);
+}
GLuint get_indice(struct gl_shader_program* prog, const char* name)
{
@@ -1609,5 +1626,10 @@ _mesa_init_shader_uniform_dispatch(struct _glapi_table *exec)
SET_GetnUniformuivARB(exec, _mesa_GetnUniformuivARB);
SET_GetnUniformdvARB(exec, _mesa_GetnUniformdvARB); /* GL 4.0 */
+ /* UBO */
+ SET_GetActiveUniformBlockiv(exec,_mesa_GetActiveUniformBlockInfo);
+ SET_GetActiveUniformBlockName(exec,_mesa_GetActiveUniformBlockName);
+ SET_GetUniformIndices(exec, _mesa_GetUniformIndices);
+
#endif /* FEATURE_GL */
}
--
1.7.6.3
More information about the mesa-dev
mailing list