Update RingRayLib - raylib.c - Add Function : Mesh GenMeshCylinder(float radius, float height, int slices)
@@ -5293,6 +5293,33 @@ RING_FUNC(ring_GenMeshHemiSphere)
}
}
+
+RING_FUNC(ring_GenMeshCylinder)
+{
+ 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 ;
+ }
+ {
+ Mesh *pValue ;
+ pValue = (Mesh *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(Mesh)) ;
+ *pValue = GenMeshCylinder( (float ) RING_API_GETNUMBER(1), (float ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3));
+ RING_API_RETMANAGEDCPOINTER(pValue,"Mesh",ring_state_free);
+ }
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -5591,4 +5618,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("genmeshcube",ring_GenMeshCube);
ring_vm_funcregister("genmeshsphere",ring_GenMeshSphere);
ring_vm_funcregister("genmeshhemisphere",ring_GenMeshHemiSphere);
+ ring_vm_funcregister("genmeshcylinder",ring_GenMeshCylinder);
}
