ADDED: UploadMesh() #1529
Upload mesh data to GPU and get VAO/VBO identifiers
This commit is contained in:
parent
721768bdb0
commit
f4f208c4ae
2 changed files with 7 additions and 0 deletions
|
@ -849,6 +849,12 @@ Mesh *LoadMeshes(const char *fileName, int *meshCount)
|
||||||
return meshes;
|
return meshes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Upload mesh vertex data to GPU
|
||||||
|
void UploadMesh(Mesh *mesh)
|
||||||
|
{
|
||||||
|
rlLoadMesh(&mesh, false); // Static mesh by default
|
||||||
|
}
|
||||||
|
|
||||||
// Unload mesh from memory (RAM and/or VRAM)
|
// Unload mesh from memory (RAM and/or VRAM)
|
||||||
void UnloadMesh(Mesh mesh)
|
void UnloadMesh(Mesh mesh)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1339,6 +1339,7 @@ RLAPI void UnloadModelKeepMeshes(Model model);
|
||||||
|
|
||||||
// Mesh loading/unloading functions
|
// Mesh loading/unloading functions
|
||||||
RLAPI Mesh *LoadMeshes(const char *fileName, int *meshCount); // Load meshes from model file
|
RLAPI Mesh *LoadMeshes(const char *fileName, int *meshCount); // Load meshes from model file
|
||||||
|
RLAPI void UploadMesh(Mesh *mesh); // Upload mesh vertex data to GPU (VRAM)
|
||||||
RLAPI void UnloadMesh(Mesh mesh); // Unload mesh from memory (RAM and/or VRAM)
|
RLAPI void UnloadMesh(Mesh mesh); // Unload mesh from memory (RAM and/or VRAM)
|
||||||
RLAPI bool ExportMesh(Mesh mesh, const char *fileName); // Export mesh data to file, returns true on success
|
RLAPI bool ExportMesh(Mesh mesh, const char *fileName); // Export mesh data to file, returns true on success
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue