Update RingRayLib - raylib.c - Add Function : Mesh GenMeshPlane(float width, float length, int resX, int resZ)
@@ -5181,6 +5181,37 @@ RING_FUNC(ring_GenMeshPoly)
}
}
+
+RING_FUNC(ring_GenMeshPlane)
+{
+ if ( RING_API_PARACOUNT != 4 ) {
+ RING_API_ERROR(RING_API_MISS4PARA);
+ 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 ;
+ }
+ {
+ Mesh *pValue ;
+ pValue = (Mesh *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(Mesh)) ;
+ *pValue = GenMeshPlane( (float ) RING_API_GETNUMBER(1), (float ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3), (int ) RING_API_GETNUMBER(4));
+ RING_API_RETMANAGEDCPOINTER(pValue,"Mesh",ring_state_free);
+ }
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -5475,4 +5506,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("unloadmodelanimation",ring_UnloadModelAnimation);
ring_vm_funcregister("ismodelanimationvalid",ring_IsModelAnimationValid);
ring_vm_funcregister("genmeshpoly",ring_GenMeshPoly);
+ ring_vm_funcregister("genmeshplane",ring_GenMeshPlane);
}
