Update RingOpenGL - Add Function (Source Code) : void glRects(GLshort x1,GLshort y1,GLshort x2,GLshort y2)
@@ -7204,6 +7204,24 @@ RING_FUNC(ring_glRecti)
glRecti( (GLint ) RING_API_GETNUMBER(1), (GLint ) RING_API_GETNUMBER(2), (GLint ) RING_API_GETNUMBER(3), (GLint ) RING_API_GETNUMBER(4));
}
+
+RING_FUNC(ring_glRects)
+{
+ if ( RING_API_PARACOUNT != 4 ) {
+ RING_API_ERROR(RING_API_MISS4PARA);
+ return ;
+ }
+ glRects(* (GLshort *) RING_API_GETCPOINTER(1,"GLshort"),* (GLshort *) RING_API_GETCPOINTER(2,"GLshort"),* (GLshort *) RING_API_GETCPOINTER(3,"GLshort"),* (GLshort *) RING_API_GETCPOINTER(4,"GLshort"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(1))
+ free(RING_API_GETCPOINTER(1,"GLshort"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(2))
+ free(RING_API_GETCPOINTER(2,"GLshort"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(3))
+ free(RING_API_GETCPOINTER(3,"GLshort"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(4))
+ free(RING_API_GETCPOINTER(4,"GLshort"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("glaccum",ring_glAccum);
@@ -7559,4 +7577,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("glrectd",ring_glRectd);
ring_vm_funcregister("glrectf",ring_glRectf);
ring_vm_funcregister("glrecti",ring_glRecti);
+ ring_vm_funcregister("glrects",ring_glRects);
}
