ADDED: IsModelReady(), IsMaterialReady(), IsTextureReady(), IsRenderTextureReady() (#2895)
This commit is contained in:
parent
0b42da4085
commit
7fff1ba0b0
1 changed files with 29 additions and 1 deletions
|
|
@ -1109,6 +1109,12 @@ Model LoadModelFromMesh(Mesh mesh)
|
|||
return model;
|
||||
}
|
||||
|
||||
// Check if a model is ready
|
||||
bool IsModelReady(Model model)
|
||||
{
|
||||
return model.meshes != NULL && model.materials != NULL && model.meshMaterial != NULL && model.meshCount > 0 && model.materialCount > 0;
|
||||
}
|
||||
|
||||
// Unload model (meshes/materials) from memory (RAM and/or VRAM)
|
||||
// NOTE: This function takes care of all model elements, for a detailed control
|
||||
// over them, use UnloadMesh() and UnloadMaterial()
|
||||
|
|
@ -1950,6 +1956,12 @@ Material LoadMaterialDefault(void)
|
|||
return material;
|
||||
}
|
||||
|
||||
// Check if a material is ready
|
||||
bool IsMaterialReady(Material material)
|
||||
{
|
||||
return material.maps != NULL;
|
||||
}
|
||||
|
||||
// Unload material from memory
|
||||
void UnloadMaterial(Material material)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue