mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-15 15:58:14 +00:00
ADDED: IsShaderReady()
, IsImageReady()
, IsFontReady()
, IsWaveReady()
, IsSoundReady()
, IsMusicReady()
(#2892)
These IsReady() functions provide a method in order to verify whether or not the object was loaded successfully. They're useful to make sure the assets are there prior to using them.
This commit is contained in:
@@ -2509,6 +2509,12 @@ Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode)
|
||||
return shader;
|
||||
}
|
||||
|
||||
// Check if a shader is ready
|
||||
bool IsShaderReady(Shader shader)
|
||||
{
|
||||
return shader.locs != NULL;
|
||||
}
|
||||
|
||||
// Unload shader from GPU memory (VRAM)
|
||||
void UnloadShader(Shader shader)
|
||||
{
|
||||
|
Reference in New Issue
Block a user