mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-06 22:29:17 -05:00
REVIEWED: UnloadRenderTexture(), additional check
This commit is contained in:
@ -3792,9 +3792,12 @@ bool IsRenderTextureReady(RenderTexture2D target)
|
|||||||
void UnloadRenderTexture(RenderTexture2D target)
|
void UnloadRenderTexture(RenderTexture2D target)
|
||||||
{
|
{
|
||||||
if (target.id > 0)
|
if (target.id > 0)
|
||||||
|
{
|
||||||
|
if (target.texture.id > 0)
|
||||||
{
|
{
|
||||||
// Color texture attached to FBO is deleted
|
// Color texture attached to FBO is deleted
|
||||||
rlUnloadTexture(target.texture.id);
|
rlUnloadTexture(target.texture.id);
|
||||||
|
}
|
||||||
|
|
||||||
// NOTE: Depth texture/renderbuffer is automatically
|
// NOTE: Depth texture/renderbuffer is automatically
|
||||||
// queried and deleted before deleting framebuffer
|
// queried and deleted before deleting framebuffer
|
||||||
|
|||||||
Reference in New Issue
Block a user