Update RingOpenGL - Add Function (Source Code) : void glReadPixels(GLint x,GLint y,GLsizei width,GLsizei height,GLenum format,GLenum type,GLvoid * data)
@@ -7088,6 +7088,44 @@ RING_FUNC(ring_glReadBuffer)
glReadBuffer( (GLenum ) (int) RING_API_GETNUMBER(1));
}
+
+RING_FUNC(ring_glReadPixels)
+{
+ if ( RING_API_PARACOUNT != 7 ) {
+ RING_API_ERROR(RING_API_BADPARACOUNT);
+ 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_ISNUMBER(4) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(5) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(6) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISPOINTER(7) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ glReadPixels( (GLint ) RING_API_GETNUMBER(1), (GLint ) RING_API_GETNUMBER(2), (GLsizei ) (int) RING_API_GETNUMBER(3), (GLsizei ) (int) RING_API_GETNUMBER(4), (GLenum ) (int) RING_API_GETNUMBER(5), (GLenum ) (int) RING_API_GETNUMBER(6),(GLvoid *) RING_API_GETCPOINTER(7,"GLvoid"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("glaccum",ring_glAccum);
@@ -7439,4 +7477,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("glrasterpos4f",ring_glRasterPos4f);
ring_vm_funcregister("glrasterpos4d",ring_glRasterPos4d);
ring_vm_funcregister("glreadbuffer",ring_glReadBuffer);
+ ring_vm_funcregister("glreadpixels",ring_glReadPixels);
}
