Ver código fonte

REVIEWED: LoadTextureFromImage()

Allow texture loading with no data transfer (in case image.data = NULL)
pull/2146/head
Ray 3 anos atrás
pai
commit
be371ebf99
1 arquivos alterados com 1 adições e 1 exclusões
  1. +1
    -1
      src/rtextures.c

+ 1
- 1
src/rtextures.c Ver arquivo

@ -2812,7 +2812,7 @@ Texture2D LoadTextureFromImage(Image image)
{ {
Texture2D texture = { 0 }; Texture2D texture = { 0 };
if ((image.data != NULL) && (image.width != 0) && (image.height != 0))
if ((image.width != 0) && (image.height != 0))
{ {
texture.id = rlLoadTexture(image.data, image.width, image.height, image.format, image.mipmaps); texture.id = rlLoadTexture(image.data, image.width, image.height, image.format, image.mipmaps);
} }

Carregando…
Cancelar
Salvar