Update RingRayLib - raylib.c - Add Function : Color *GetImageData(Image image)
@@ -2777,6 +2777,18 @@ RING_FUNC(ring_UnloadRenderTexture)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"RenderTexture2D"));
}
+
+RING_FUNC(ring_GetImageData)
+{
+ if ( RING_API_PARACOUNT != 1 ) {
+ RING_API_ERROR(RING_API_MISS1PARA);
+ return ;
+ }
+ RING_API_RETCPOINTER(GetImageData(* (Image *) RING_API_GETCPOINTER(1,"Image")),"Color");
+ if (RING_API_ISCPOINTERNOTASSIGNED(1))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Image"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -2953,4 +2965,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("unloadimage",ring_UnloadImage);
ring_vm_funcregister("unloadtexture",ring_UnloadTexture);
ring_vm_funcregister("unloadrendertexture",ring_UnloadRenderTexture);
+ ring_vm_funcregister("getimagedata",ring_GetImageData);
}
