mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-21 22:05:34 +00:00
ADDED: IsModelReady(), IsMaterialReady(), IsTextureReady(), IsRenderTextureReady() (#2895)
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user