浏览代码

REVIEWED: `UnloadRenderTexture()`, additional check

pull/3322/head
Ray 2 年前
父节点
当前提交
97c4333803
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. +5
    -2
      src/rtextures.c

+ 5
- 2
src/rtextures.c 查看文件

@ -3793,8 +3793,11 @@ void UnloadRenderTexture(RenderTexture2D target)
{
if (target.id > 0)
{
// Color texture attached to FBO is deleted
rlUnloadTexture(target.texture.id);
if (target.texture.id > 0)
{
// Color texture attached to FBO is deleted
rlUnloadTexture(target.texture.id);
}
// NOTE: Depth texture/renderbuffer is automatically
// queried and deleted before deleting framebuffer

正在加载...
取消
保存