Update RingOpenGL - Add Function (Source Code) : void glDrawArrays(GLenum mode,GLint first,GLsizei count)
@@ -2334,6 +2334,28 @@ RING_FUNC(ring_glDisableVertexAttribArray)
glDisableVertexAttribArray( (GLuint ) RING_API_GETNUMBER(1));
}
+
+RING_FUNC(ring_glDrawArrays)
+{
+ if ( RING_API_PARACOUNT != 3 ) {
+ RING_API_ERROR(RING_API_MISS3PARA);
+ 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 ;
+ }
+ if ( ! RING_API_ISNUMBER(3) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ glDrawArrays( (GLenum ) (int) RING_API_GETNUMBER(1), (GLint ) RING_API_GETNUMBER(2), (GLsizei ) (int) RING_API_GETNUMBER(3));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("glaccum",ring_glAccum);
@@ -2444,4 +2466,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("glenableclientstate",ring_glEnableClientState);
ring_vm_funcregister("glenablevertexattribarray",ring_glEnableVertexAttribArray);
ring_vm_funcregister("gldisablevertexattribarray",ring_glDisableVertexAttribArray);
+ ring_vm_funcregister("gldrawarrays",ring_glDrawArrays);
}
