Added a lot of mesh and model functions...

This commit is contained in:
Ognjen Milan Robovic 2024-04-05 07:45:25 -04:00
parent 027dd77c92
commit ee8307f855

View File

@ -718,6 +718,8 @@ package Raylib is
Parent : Integer := 0; Parent : Integer := 0;
end record with Convention => C_Pass_By_Copy; end record with Convention => C_Pass_By_Copy;
No_Bone_Info : Bone_Info;
type Material_Array_4 is array (0 .. 3) of Material; type Material_Array_4 is array (0 .. 3) of Material;
type Material_Array is array (Natural range <>) of Material; type Material_Array is array (Natural range <>) of Material;
@ -743,6 +745,8 @@ package Raylib is
Name : Character_Array_32 := Empty; Name : Character_Array_32 := Empty;
end record with Convention => C_Pass_By_Copy; end record with Convention => C_Pass_By_Copy;
No_Model_Animation : Model_Animation;
type Ray is record type Ray is record
Position : Vector_3D := (0.0, 0.0, 0.0); Position : Vector_3D := (0.0, 0.0, 0.0);
Direction : Vector_3D := (0.0, 0.0, 0.0); Direction : Vector_3D := (0.0, 0.0, 0.0);
@ -3770,105 +3774,171 @@ package Raylib is
Convention => C, Convention => C,
External_Name => "GenMeshPlane"; External_Name => "GenMeshPlane";
--~function Mesh GenMeshCube (float width, float height, float length) with function Gen_Mesh_Cube (
--~Import => True, Width : Float := 0.0;
--~Convention => C, Height : Float := 0.0;
--~External_Name => ""; Length : Float := 0.0
) return Mesh with
Import => True,
Convention => C,
External_Name => "GenMeshCube";
--~function Mesh GenMeshSphere (float radius, int rings, int slices) with function Gen_Mesh_Sphere (
--~Import => True, Radius : Float := 0.0;
--~Convention => C, Rings : Integer := 0;
--~External_Name => ""; Slices : Integer := 0
) return Mesh with
Import => True,
Convention => C,
External_Name => "GenMeshSphere";
--~function Mesh GenMeshHemiSphere (float radius, int rings, int slices) with function Gen_Mesh_Hemisphere (
--~Import => True, Radius : Float := 0.0;
--~Convention => C, Rings : Integer := 0;
--~External_Name => ""; Slices : Integer := 0
) return Mesh with
Import => True,
Convention => C,
External_Name => "GenMeshHemiSphere";
--~function Mesh GenMeshCylinder (float radius, float height, int slices) with function Gen_Mesh_Cylinder (
--~Import => True, Radius : Float := 0.0;
--~Convention => C, Height : Float := 0.0;
--~External_Name => ""; Slices : Integer := 0
) return Mesh with
Import => True,
Convention => C,
External_Name => "GenMeshCylinder";
--~function Mesh GenMeshCone (float radius, float height, int slices) with function Gen_Mesh_Cone (
--~Import => True, Radius : Float := 0.0;
--~Convention => C, Height : Float := 0.0;
--~External_Name => ""; Slices : Integer := 0
) return Mesh with
Import => True,
Convention => C,
External_Name => "GenMeshCone";
--~function Mesh GenMeshTorus (float radius, float size, int radSeg, int sides) with function Gen_Mesh_Torus (
--~Import => True, Radius : Float := 0.0;
--~Convention => C, Size : Float := 0.0;
--~External_Name => ""; Segments : Integer := 0;
Sides : Integer := 0
) return Mesh with
Import => True,
Convention => C,
External_Name => "GenMeshTorus";
--~function Mesh GenMeshKnot (float radius, float size, int radSeg, int sides) with function Gen_Mesh_Knot (
--~Import => True, Radius : Float := 0.0;
--~Convention => C, Size : Float := 0.0;
--~External_Name => ""; Segments : Integer := 0;
Sides : Integer := 0
) return Mesh with
Import => True,
Convention => C,
External_Name => "GenMeshKnot";
--~function Mesh GenMeshHeightmap (Image heightmap, Vector3 size) with function Gen_Mesh_Height_Map (
--~Import => True, Height_Map : Image := No_Image;
--~Convention => C, Size : Vector_3D := (0.0, 0.0, 0.0)
--~External_Name => ""; ) return Mesh with
Import => True,
Convention => C,
External_Name => "GenMeshHeightmap";
--~function Mesh GenMeshCubicmap (Image cubicmap, Vector3 cubeSize) with function Gen_Mesh_Cubic_Map (
--~Import => True, Cubic_Map : Image := No_Image;
--~Convention => C, Size : Vector_3D := (0.0, 0.0, 0.0)
--~External_Name => ""; ) return Mesh with
Import => True,
Convention => C,
External_Name => "GenMeshCubicmap";
--~function Material *LoadMaterials (const char *fileName, int *materialCount) with function Load_Materials (
--~Import => True, File_Name : String := "";
--~Convention => C, Counts : access Integer := null
--~External_Name => ""; ) return access Material with
Import => True,
Convention => C,
External_Name => "LoadMaterials";
--~function Material LoadMaterialDefault (void) with function Load_Material_Default return Material with
--~Import => True, Import => True,
--~Convention => C, Convention => C,
--~External_Name => ""; External_Name => "LoadMaterialDefault";
--~function bool IsMaterialReady (Material material) with function Is_Material_Ready (
--~Import => True, Data : Material := No_Material
--~Convention => C, ) return Logical with
--~External_Name => ""; Import => True,
Convention => C,
External_Name => "IsMaterialReady";
--~procedure UnloadMaterial (Material material) with procedure Unload_Material (
--~Import => True, Data : Material := No_Material
--~Convention => C, ) with
--~External_Name => ""; Import => True,
Convention => C,
External_Name => "UnloadMaterial";
--~procedure SetMaterialTexture (Material *material, int mapType, Texture2D texture) with procedure Set_Material_Texture (
--~Import => True, Data : access Material := null;
--~Convention => C, Kind : Material_Map_Index := Material_Map_Height;
--~External_Name => ""; This : Texture := No_Texture
) with
Import => True,
Convention => C,
External_Name => "SetMaterialTexture";
--~procedure SetModelMeshMaterial (Model *model, int meshId, int materialId) with procedure Set_Model_Mesh_Material (
--~Import => True, Data : access Model := null;
--~Convention => C, Mesh_Id : Integer := 0;
--~External_Name => ""; Material_Id : Integer := 0
) with
Import => True,
Convention => C,
External_Name => "SetModelMeshMaterial";
--~function ModelAnimation *LoadModelAnimations (const char *fileName, int *animCount) with function Load_Model_Animations (
--~Import => True, File_Name : String := "";
--~Convention => C, Counts : access Integer := null
--~External_Name => ""; ) return access Model_Animation with
Import => True,
Convention => C,
External_Name => "LoadModelAnimations";
--~procedure UpdateModelAnimation (Model model, ModelAnimation anim, int frame) with procedure Update_Model_Animation (
--~Import => True, Data : Model := No_Model;
--~Convention => C, Animation : Model_Animation := No_Model_Animation;
--~External_Name => ""; Frame : Integer := 0
) with
Import => True,
Convention => C,
External_Name => "UpdateModelAnimation";
--~procedure UnloadModelAnimation (ModelAnimation anim) with procedure Unload_Model_Animation (
--~Import => True, Animation : Model_Animation := No_Model_Animation
--~Convention => C, ) with
--~External_Name => ""; Import => True,
Convention => C,
External_Name => "UnloadModelAnimation";
--~procedure UnloadModelAnimations (ModelAnimation *animations, int animCount) with procedure Unload_Model_Animations (
--~Import => True, Animations : access Model_Animation := null;
--~Convention => C, Animation_Count : Natural := 0
--~External_Name => ""; ) with
Import => True,
Convention => C,
External_Name => "UnloadModelAnimations";
--~function bool IsModelAnimationValid (Model model, ModelAnimation anim) with function Is_Model_Animation_Valid (
--~Import => True, Data : Model := No_Model;
--~Convention => C, Animation : Model_Animation := No_Model_Animation
--~External_Name => ""; ) return Logical with
Import => True,
Convention => C,
External_Name => "IsModelAnimationValid";
function Check_Collision_Spheres ( function Check_Collision_Spheres (
Center_1 : Vector_3D := (0.0, 0.0, 0.0); Center_1 : Vector_3D := (0.0, 0.0, 0.0);
@ -3974,20 +4044,28 @@ package Raylib is
Convention => C, Convention => C,
External_Name => "GetMasterVolume"; External_Name => "GetMasterVolume";
--~function Wave LoadWave (const char *fileName) with function Load_Wave (
--~Import => True, File_Name : String := ""
--~Convention => C, ) return Wave with
--~External_Name => ""; Import => True,
Convention => C,
External_Name => "LoadWave";
--~function Wave LoadWaveFromMemory (const char *fileType, const unsigned char *fileData, int dataSize) with function Load_Wave_From_Memory (
--~Import => True, File_Type : String := "";
--~Convention => C, File_Data : Pointer := null;
--~External_Name => ""; Data_Size : Natural := 0
) return Wave with
Import => True,
Convention => C,
External_Name => "LoadWaveFromMemory";
--~function bool IsWaveReady (Wave wave) with function Is_Wave_Ready (
--~Import => True, Data : Wave := No_Wave
--~Convention => C, ) return Logical with
--~External_Name => ""; Import => True,
Convention => C,
External_Name => "IsWaveReady";
function Load_Sound ( function Load_Sound (
File_Name : String := "" File_Name : String := ""
@ -3996,30 +4074,42 @@ package Raylib is
Convention => C, Convention => C,
External_Name => "LoadSound"; External_Name => "LoadSound";
--~function Sound LoadSoundFromWave (Wave wave) with function Load_Sound_From_Wave (
--~Import => True, Data : Wave := No_Wave
--~Convention => C, ) return Sound with
--~External_Name => ""; Import => True,
Convention => C,
External_Name => "LoadSoundFromWave";
--~function Sound LoadSoundAlias (Sound source) with function Load_Sound_Alias (
--~Import => True, Source : Sound := No_Sound
--~Convention => C, ) return Sound with
--~External_Name => ""; Import => True,
Convention => C,
External_Name => "LoadSoundAlias";
--~function bool IsSoundReady (Sound sound) with function Is_Sound_Ready (
--~Import => True, Source : Sound := No_Sound
--~Convention => C, ) return Logical with
--~External_Name => ""; Import => True,
Convention => C,
External_Name => "IsSoundReady";
--~procedure UpdateSound (Sound sound, const void *data, int sampleCount) with procedure Update_Sound (
--~Import => True, Source : Sound := No_Sound;
--~Convention => C, Data : Pointer := null;
--~External_Name => ""; Sample_Count : Integer := 0
) with
Import => True,
Convention => C,
External_Name => "UpdateSound";
--~procedure UnloadWave (Wave wave) with procedure Unload_Wave (
--~Import => True, Data : Wave := No_Wave
--~Convention => C, ) with
--~External_Name => ""; Import => True,
Convention => C,
External_Name => "UnloadWave";
procedure Unload_Sound ( procedure Unload_Sound (
Data : Sound := No_Sound Data : Sound := No_Sound
@ -4028,20 +4118,28 @@ package Raylib is
Convention => C, Convention => C,
External_Name => "UnloadSound"; External_Name => "UnloadSound";
--~procedure UnloadSoundAlias (Sound alias) with procedure Unload_Sound_Alias (
--~Import => True, Alias : Sound := No_Sound
--~Convention => C, ) with
--~External_Name => ""; Import => True,
Convention => C,
External_Name => "UnloadSoundAlias";
--~function bool ExportWave (Wave wave, const char *fileName) with function Export_Wave (
--~Import => True, Data : Wave := No_Wave;
--~Convention => C, File_Name : String := ""
--~External_Name => ""; ) return Logical with
Import => True,
Convention => C,
External_Name => "ExportWave";
--~function bool ExportWaveAsCode (Wave wave, const char *fileName) with function Export_Wave_As_Code (
--~Import => True, Data : Wave := No_Wave;
--~Convention => C, File_Name : String := ""
--~External_Name => ""; ) return Logical with
Import => True,
Convention => C,
External_Name => "ExportWaveAsCode";
procedure Play_Sound ( procedure Play_Sound (
Data : Sound := No_Sound Data : Sound := No_Sound