Update RingRayLib - raylib.c - Add Function : void DrawModel(Model model, Vector3 position, float scale, Color tint)
@@ -5465,6 +5465,26 @@ RING_FUNC(ring_MeshBinormals)
MeshBinormals((Mesh *) RING_API_GETCPOINTER(1,"Mesh"));
}
+
+RING_FUNC(ring_DrawModel)
+{
+ if ( RING_API_PARACOUNT != 4 ) {
+ RING_API_ERROR(RING_API_MISS4PARA);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(3) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ DrawModel(* (Model *) RING_API_GETCPOINTER(1,"Model"),* (Vector3 *) RING_API_GETCPOINTER(2,"Vector3"), (float ) RING_API_GETNUMBER(3),* (Color *) RING_API_GETCPOINTER(4,"Color"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(1))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Model"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(2))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"Vector3"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(4))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(4,"Color"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -5771,4 +5791,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("meshboundingbox",ring_MeshBoundingBox);
ring_vm_funcregister("meshtangents",ring_MeshTangents);
ring_vm_funcregister("meshbinormals",ring_MeshBinormals);
+ ring_vm_funcregister("drawmodel",ring_DrawModel);
}
