Update RingOpenGL - Add Function (Source Code) : GLint glGetUniformLocation(GLuint program,const GLchar *name)
@@ -4326,6 +4326,24 @@ RING_FUNC(ring_glGetUniformiv)
glGetUniformiv( (GLuint ) RING_API_GETNUMBER(1), (GLint ) RING_API_GETNUMBER(2),(GLint *) RING_API_GETCPOINTER(3,"GLint"));
}
+
+RING_FUNC(ring_glGetUniformLocation)
+{
+ if ( RING_API_PARACOUNT != 2 ) {
+ RING_API_ERROR(RING_API_MISS2PARA);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISPOINTER(2) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ RING_API_RETNUMBER(glGetUniformLocation( (GLuint ) RING_API_GETNUMBER(1),(GLchar *) RING_API_GETCPOINTER(2,"GLchar")));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("glaccum",ring_glAccum);
@@ -4532,4 +4550,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("glgettexparameteriv",ring_glGetTexParameteriv);
ring_vm_funcregister("glgetuniformfv",ring_glGetUniformfv);
ring_vm_funcregister("glgetuniformiv",ring_glGetUniformiv);
+ ring_vm_funcregister("glgetuniformlocation",ring_glGetUniformLocation);
}
