Update RingOpenGL - Add Function (Source Code) : void glUniform1i(GLint location,GLint v0)
@@ -9208,6 +9208,24 @@ RING_FUNC(ring_glUniform4f)
glUniform4f( (GLint ) RING_API_GETNUMBER(1), (GLfloat ) RING_API_GETNUMBER(2), (GLfloat ) RING_API_GETNUMBER(3), (GLfloat ) RING_API_GETNUMBER(4), (GLfloat ) RING_API_GETNUMBER(5));
}
+
+RING_FUNC(ring_glUniform1i)
+{
+ 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_ISNUMBER(2) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ glUniform1i( (GLint ) RING_API_GETNUMBER(1), (GLint ) RING_API_GETNUMBER(2));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("glaccum",ring_glAccum);
@@ -9660,4 +9678,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("gluniform2f",ring_glUniform2f);
ring_vm_funcregister("gluniform3f",ring_glUniform3f);
ring_vm_funcregister("gluniform4f",ring_glUniform4f);
+ ring_vm_funcregister("gluniform1i",ring_glUniform1i);
}
