minor tweaks
This commit is contained in:
parent
f14955512f
commit
178a356cb4
44
src/external/rl_gputex.h
vendored
44
src/external/rl_gputex.h
vendored
@ -778,28 +778,28 @@ static int get_pixel_data_size(int width, int height, int format)
|
||||
|
||||
switch (format)
|
||||
{
|
||||
case PIXELFORMAT_UNCOMPRESSED_GRAYSCALE: bpp = 8; break;
|
||||
case PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA:
|
||||
case PIXELFORMAT_UNCOMPRESSED_R5G6B5:
|
||||
case PIXELFORMAT_UNCOMPRESSED_R5G5B5A1:
|
||||
case PIXELFORMAT_UNCOMPRESSED_R4G4B4A4: bpp = 16; break;
|
||||
case PIXELFORMAT_UNCOMPRESSED_R8G8B8A8: bpp = 32; break;
|
||||
case PIXELFORMAT_UNCOMPRESSED_R8G8B8: bpp = 24; break;
|
||||
case PIXELFORMAT_UNCOMPRESSED_R32: bpp = 32; break;
|
||||
case PIXELFORMAT_UNCOMPRESSED_R32G32B32: bpp = 32*3; break;
|
||||
case PIXELFORMAT_UNCOMPRESSED_R32G32B32A32: bpp = 32*4; break;
|
||||
case PIXELFORMAT_COMPRESSED_DXT1_RGB:
|
||||
case PIXELFORMAT_COMPRESSED_DXT1_RGBA:
|
||||
case PIXELFORMAT_COMPRESSED_ETC1_RGB:
|
||||
case PIXELFORMAT_COMPRESSED_ETC2_RGB:
|
||||
case PIXELFORMAT_COMPRESSED_PVRT_RGB:
|
||||
case PIXELFORMAT_COMPRESSED_PVRT_RGBA: bpp = 4; break;
|
||||
case PIXELFORMAT_COMPRESSED_DXT3_RGBA:
|
||||
case PIXELFORMAT_COMPRESSED_DXT5_RGBA:
|
||||
case PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA:
|
||||
case PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA: bpp = 8; break;
|
||||
case PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA: bpp = 2; break;
|
||||
default: break;
|
||||
case PIXELFORMAT_UNCOMPRESSED_GRAYSCALE: bpp = 8; break;
|
||||
case PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA:
|
||||
case PIXELFORMAT_UNCOMPRESSED_R5G6B5:
|
||||
case PIXELFORMAT_UNCOMPRESSED_R5G5B5A1:
|
||||
case PIXELFORMAT_UNCOMPRESSED_R4G4B4A4: bpp = 16; break;
|
||||
case PIXELFORMAT_UNCOMPRESSED_R8G8B8A8: bpp = 32; break;
|
||||
case PIXELFORMAT_UNCOMPRESSED_R8G8B8: bpp = 24; break;
|
||||
case PIXELFORMAT_UNCOMPRESSED_R32: bpp = 32; break;
|
||||
case PIXELFORMAT_UNCOMPRESSED_R32G32B32: bpp = 32*3; break;
|
||||
case PIXELFORMAT_UNCOMPRESSED_R32G32B32A32: bpp = 32*4; break;
|
||||
case PIXELFORMAT_COMPRESSED_DXT1_RGB:
|
||||
case PIXELFORMAT_COMPRESSED_DXT1_RGBA:
|
||||
case PIXELFORMAT_COMPRESSED_ETC1_RGB:
|
||||
case PIXELFORMAT_COMPRESSED_ETC2_RGB:
|
||||
case PIXELFORMAT_COMPRESSED_PVRT_RGB:
|
||||
case PIXELFORMAT_COMPRESSED_PVRT_RGBA: bpp = 4; break;
|
||||
case PIXELFORMAT_COMPRESSED_DXT3_RGBA:
|
||||
case PIXELFORMAT_COMPRESSED_DXT5_RGBA:
|
||||
case PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA:
|
||||
case PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA: bpp = 8; break;
|
||||
case PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA: bpp = 2; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
data_size = width*height*bpp/8; // Total data size in bytes
|
||||
|
@ -402,7 +402,6 @@ Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, i
|
||||
#if defined(SUPPORT_FILEFORMAT_DDS)
|
||||
else if (strcmp(fileType, ".dds") == 0)
|
||||
{
|
||||
int format = 0;
|
||||
image.data = rl_load_dds_from_memory(fileData, dataSize, &image.width, &image.height, &image.format, &image.mipmaps);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user