Update RingRayLib - raylib.c - Add Function : void SetModelMeshMaterial(Model *model, int meshId, int materialId)
@@ -5073,6 +5073,28 @@ RING_FUNC(ring_SetMaterialTexture)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(3,"Texture2D"));
}
+
+RING_FUNC(ring_SetModelMeshMaterial)
+{
+ if ( RING_API_PARACOUNT != 3 ) {
+ RING_API_ERROR(RING_API_MISS3PARA);
+ return ;
+ }
+ if ( ! RING_API_ISPOINTER(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 ;
+ }
+ SetModelMeshMaterial((Model *) RING_API_GETCPOINTER(1,"Model"), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -5361,4 +5383,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("loadmaterialdefault",ring_LoadMaterialDefault);
ring_vm_funcregister("unloadmaterial",ring_UnloadMaterial);
ring_vm_funcregister("setmaterialtexture",ring_SetMaterialTexture);
+ ring_vm_funcregister("setmodelmeshmaterial",ring_SetModelMeshMaterial);
}
