REVIEWED: Data types validation
This commit is contained in:
parent
15716e59dc
commit
ab1e246367
1 changed files with 25 additions and 9 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue