Update RingOpenGL - Add Function (Source Code) : void glBufferSubData(GLenum target,GLintptr offset,GLsizeiptr size,const GLvoid * data)
@@ -360,6 +360,32 @@ RING_FUNC(ring_glBufferData)
glBufferData( (GLenum ) (int) RING_API_GETNUMBER(1), (GLsizeiptr ) RING_API_GETNUMBER(2),(GLvoid *) RING_API_GETCPOINTER(3,"GLvoid"), (GLenum ) (int) RING_API_GETNUMBER(4));
}
+
+RING_FUNC(ring_glBufferSubData)
+{
+ if ( RING_API_PARACOUNT != 4 ) {
+ RING_API_ERROR(RING_API_MISS4PARA);
+ 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 ;
+ }
+ if ( ! RING_API_ISPOINTER(4) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ glBufferSubData( (GLenum ) (int) RING_API_GETNUMBER(1), (GLintptr ) RING_API_GETNUMBER(2), (GLsizeiptr ) RING_API_GETNUMBER(3),(GLvoid *) RING_API_GETCPOINTER(4,"GLvoid"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("glaccum",ring_glAccum);
@@ -380,4 +406,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("glblendfunc",ring_glBlendFunc);
ring_vm_funcregister("glblendfuncseparate",ring_glBlendFuncSeparate);
ring_vm_funcregister("glbufferdata",ring_glBufferData);
+ ring_vm_funcregister("glbuffersubdata",ring_glBufferSubData);
}
