Explorar el Código

REVIEWED: `UnloadRenderTexture()`, additional check

pull/3322/head
Ray hace 2 años
padre
commit
97c4333803
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. +5
    -2
      src/rtextures.c

+ 5
- 2
src/rtextures.c Ver fichero

@ -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

Cargando…
Cancelar
Guardar