Update RingRayLib - raylib.c - Add Function : int GetPixelDataSize(int width, int height, int format)
@@ -2801,6 +2801,28 @@ RING_FUNC(ring_GetImageDataNormalized)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Image"));
}
+
+RING_FUNC(ring_GetPixelDataSize)
+{
+ 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 ;
+ }
+ RING_API_RETNUMBER(GetPixelDataSize( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3)));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -2979,4 +3001,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("unloadrendertexture",ring_UnloadRenderTexture);
ring_vm_funcregister("getimagedata",ring_GetImageData);
ring_vm_funcregister("getimagedatanormalized",ring_GetImageDataNormalized);
+ ring_vm_funcregister("getpixeldatasize",ring_GetPixelDataSize);
}
