mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-12 06:18:14 +00:00
REMOVED: GenMeshDefault()
This commit is contained in:
19
src/models.c
19
src/models.c
@@ -1522,25 +1522,6 @@ bool IsModelAnimationValid(Model model, ModelAnimation anim)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(SUPPORT_MESH_GENERATION)
|
#if defined(SUPPORT_MESH_GENERATION)
|
||||||
Mesh GenMeshDefault(int vertexCount)
|
|
||||||
{
|
|
||||||
Mesh mesh = { 0 };
|
|
||||||
|
|
||||||
mesh.vertexCount = vertexCount;
|
|
||||||
mesh.triangleCount = vertexCount/3;
|
|
||||||
|
|
||||||
mesh.vertices = (float *)RL_CALLOC(mesh.vertexCount*3, sizeof(float));
|
|
||||||
mesh.texcoords = (float *)RL_CALLOC(mesh.vertexCount*2, sizeof(float));
|
|
||||||
mesh.normals = (float *)RL_CALLOC(mesh.vertexCount*3, sizeof(float));
|
|
||||||
mesh.colors = (unsigned char *)RL_CALLOC(mesh.vertexCount*4, sizeof(unsigned char));
|
|
||||||
|
|
||||||
// Upload vertex data to GPU (dynamic mesh)
|
|
||||||
// NOTE: mesh.vboId array is allocated inside UploadMesh()
|
|
||||||
UploadMesh(&mesh, true);
|
|
||||||
|
|
||||||
return mesh;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Generate polygonal mesh
|
// Generate polygonal mesh
|
||||||
Mesh GenMeshPoly(int sides, float radius)
|
Mesh GenMeshPoly(int sides, float radius)
|
||||||
{
|
{
|
||||||
|
@@ -1408,7 +1408,6 @@ RLAPI void UnloadModelAnimations(ModelAnimation* animations, unsigned int count)
|
|||||||
RLAPI bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
|
RLAPI bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
|
||||||
|
|
||||||
// Mesh generation functions
|
// Mesh generation functions
|
||||||
RLAPI Mesh GenMeshDefault(int vertexCount); // Generate an empty mesh with vertex: position, texcoords, normals, colors
|
|
||||||
RLAPI Mesh GenMeshPoly(int sides, float radius); // Generate polygonal mesh
|
RLAPI Mesh GenMeshPoly(int sides, float radius); // Generate polygonal mesh
|
||||||
RLAPI Mesh GenMeshPlane(float width, float length, int resX, int resZ); // Generate plane mesh (with subdivisions)
|
RLAPI Mesh GenMeshPlane(float width, float length, int resX, int resZ); // Generate plane mesh (with subdivisions)
|
||||||
RLAPI Mesh GenMeshCube(float width, float height, float length); // Generate cuboid mesh
|
RLAPI Mesh GenMeshCube(float width, float height, float length); // Generate cuboid mesh
|
||||||
|
Reference in New Issue
Block a user