REVIEWED: Data types validation

This commit is contained in:
Ray
2023-03-07 20:33:45 +01:00
parent 15716e59dc
commit ab1e246367
4 changed files with 25 additions and 9 deletions

View File

@@ -3362,7 +3362,9 @@ void UnloadTexture(Texture2D texture)
// Check if a render texture is ready
bool IsRenderTextureReady(RenderTexture2D target)
{
return target.id > 0 && IsTextureReady(target.depth) && IsTextureReady(target.texture);
return ((target.id > 0) && // Validate OpenGL id
IsTextureReady(target.depth) && // Validate FBO depth texture/renderbuffer
IsTextureReady(target.texture)); // Validate FBO texture
}
// Unload render texture from GPU memory (VRAM)