Update RingOpenGL - Add Function (Source Code) : void glUseProgram(GLuint program)
@@ -9714,6 +9714,20 @@ RING_FUNC(ring_glUniformMatrix4x3fv)
glUniformMatrix4x3fv( (GLint ) RING_API_GETNUMBER(1), (GLsizei ) (int) RING_API_GETNUMBER(2), (GLboolean ) RING_API_GETNUMBER(3),(GLfloat *) RING_API_GETCPOINTER(4,"GLfloat"));
}
+
+RING_FUNC(ring_glUseProgram)
+{
+ if ( RING_API_PARACOUNT != 1 ) {
+ RING_API_ERROR(RING_API_MISS1PARA);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ glUseProgram( (GLuint ) RING_API_GETNUMBER(1));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("glaccum",ring_glAccum);
@@ -10187,4 +10201,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("gluniformmatrix4x2fv",ring_glUniformMatrix4x2fv);
ring_vm_funcregister("gluniformmatrix3x4fv",ring_glUniformMatrix3x4fv);
ring_vm_funcregister("gluniformmatrix4x3fv",ring_glUniformMatrix4x3fv);
+ ring_vm_funcregister("gluseprogram",ring_glUseProgram);
}
