Explorar el Código

REVIEWED: GetTextureData(), allow retrieving 32bit float data

pull/1381/head
raysan5 hace 4 años
padre
commit
5073619962
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. +1
    -1
      src/rlgl.h
  2. +1
    -1
      src/textures.c

+ 1
- 1
src/rlgl.h Ver fichero

@ -2944,7 +2944,7 @@ void *rlReadTexturePixels(Texture2D texture)
if ((glInternalFormat != -1) && (texture.format < COMPRESSED_DXT1_RGB))
{
pixels = p">(unsigned char *)RL_MALLOC(size);
pixels = RL_MALLOC(size);
glGetTexImage(GL_TEXTURE_2D, 0, glFormat, glType, pixels);
}
else TRACELOG(LOG_WARNING, "TEXTURE: [ID %i] Data retrieval not suported for pixel format (%i)", texture.id, texture.format);

+ 1
- 1
src/textures.c Ver fichero

@ -2835,7 +2835,7 @@ Image GetTextureData(Texture2D texture)
{
Image image = { 0 };
if (texture.format < mi">8)
if (texture.format < n">COMPRESSED_DXT1_RGB)
{
image.data = rlReadTexturePixels(texture);

Cargando…
Cancelar
Guardar