mirror of
https://github.com/raysan5/raylib.git
synced 2026-04-12 18:19:11 -04:00
Redesigned to support disabling features on compilation with `-DSUPPORT_FEATURE=0` REMOVED: `SUPPORT_DEFAULT_FONT`, always supported REMOVED: `SUPPORT_IMAGE_MANIPULATION `, always supported REMOVED: `SUPPORT_TEXT_MANIPULATION`, always supported REDESIGNED: `SUPPORT_FONT_ATLAS_WHITE_REC` to `FONT_ATLAS_CORNER_REC_SIZE` REVIEWED: Config values (other than 0-1) are already defined on respective modules Other config tweaks here and there
This commit is contained in:
137
src/rtextures.c
137
src/rtextures.c
@ -27,10 +27,6 @@
|
||||
* #define SUPPORT_IMAGE_EXPORT
|
||||
* Support image export in multiple file formats
|
||||
*
|
||||
* #define SUPPORT_IMAGE_MANIPULATION
|
||||
* Support multiple image editing functions to scale, adjust colors, flip, draw on images, crop...
|
||||
* If not defined only some image editing functions supported: ImageFormat(), ImageAlphaMask(), ImageResize*()
|
||||
*
|
||||
* #define SUPPORT_IMAGE_GENERATION
|
||||
* Support procedural image generation functionality (gradient, spot, perlin-noise, cellular)
|
||||
*
|
||||
@ -65,7 +61,7 @@
|
||||
|
||||
#include "config.h" // Defines module configuration flags
|
||||
|
||||
#if defined(SUPPORT_MODULE_RTEXTURES)
|
||||
#if SUPPORT_MODULE_RTEXTURES
|
||||
|
||||
#include "rlgl.h" // OpenGL abstraction layer to multiple versions
|
||||
|
||||
@ -103,32 +99,32 @@
|
||||
#define STBI_NO_PNM
|
||||
#endif
|
||||
|
||||
#if defined(SUPPORT_FILEFORMAT_DDS)
|
||||
#if SUPPORT_FILEFORMAT_DDS
|
||||
#define RL_GPUTEX_SUPPORT_DDS
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_PKM)
|
||||
#if SUPPORT_FILEFORMAT_PKM
|
||||
#define RL_GPUTEX_SUPPORT_PKM
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_KTX)
|
||||
#if SUPPORT_FILEFORMAT_KTX
|
||||
#define RL_GPUTEX_SUPPORT_KTX
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_PVR)
|
||||
#if SUPPORT_FILEFORMAT_PVR
|
||||
#define RL_GPUTEX_SUPPORT_PVR
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_ASTC)
|
||||
#if SUPPORT_FILEFORMAT_ASTC
|
||||
#define RL_GPUTEX_SUPPORT_ASTC
|
||||
#endif
|
||||
|
||||
// Image fileformats not supported by default
|
||||
#if (defined(SUPPORT_FILEFORMAT_BMP) || \
|
||||
defined(SUPPORT_FILEFORMAT_PNG) || \
|
||||
defined(SUPPORT_FILEFORMAT_TGA) || \
|
||||
defined(SUPPORT_FILEFORMAT_JPG) || \
|
||||
defined(SUPPORT_FILEFORMAT_PSD) || \
|
||||
defined(SUPPORT_FILEFORMAT_GIF) || \
|
||||
defined(SUPPORT_FILEFORMAT_HDR) || \
|
||||
defined(SUPPORT_FILEFORMAT_PIC) || \
|
||||
defined(SUPPORT_FILEFORMAT_PNM))
|
||||
#if (SUPPORT_FILEFORMAT_BMP || \
|
||||
SUPPORT_FILEFORMAT_PNG || \
|
||||
SUPPORT_FILEFORMAT_TGA || \
|
||||
SUPPORT_FILEFORMAT_JPG || \
|
||||
SUPPORT_FILEFORMAT_PSD || \
|
||||
SUPPORT_FILEFORMAT_GIF || \
|
||||
SUPPORT_FILEFORMAT_HDR || \
|
||||
SUPPORT_FILEFORMAT_PIC || \
|
||||
SUPPORT_FILEFORMAT_PNM)
|
||||
|
||||
#if defined(__GNUC__) // GCC and Clang
|
||||
#pragma GCC diagnostic push
|
||||
@ -177,7 +173,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(SUPPORT_FILEFORMAT_QOI)
|
||||
#if SUPPORT_FILEFORMAT_QOI
|
||||
#define QOI_MALLOC RL_MALLOC
|
||||
#define QOI_FREE RL_FREE
|
||||
|
||||
@ -195,7 +191,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(SUPPORT_IMAGE_EXPORT)
|
||||
#if SUPPORT_IMAGE_EXPORT
|
||||
#define STBIW_MALLOC RL_MALLOC
|
||||
#define STBIW_FREE RL_FREE
|
||||
#define STBIW_REALLOC RL_REALLOC
|
||||
@ -204,7 +200,7 @@
|
||||
#include "external/stb_image_write.h" // Required for: stbi_write_*()
|
||||
#endif
|
||||
|
||||
#if defined(SUPPORT_IMAGE_GENERATION)
|
||||
#if SUPPORT_IMAGE_GENERATION
|
||||
#define STB_PERLIN_IMPLEMENTATION
|
||||
#include "external/stb_perlin.h" // Required for: stb_perlin_fbm_noise3
|
||||
#endif
|
||||
@ -268,15 +264,15 @@ Image LoadImage(const char *fileName)
|
||||
{
|
||||
Image image = { 0 };
|
||||
|
||||
#if defined(SUPPORT_FILEFORMAT_PNG) || \
|
||||
defined(SUPPORT_FILEFORMAT_BMP) || \
|
||||
defined(SUPPORT_FILEFORMAT_TGA) || \
|
||||
defined(SUPPORT_FILEFORMAT_JPG) || \
|
||||
defined(SUPPORT_FILEFORMAT_GIF) || \
|
||||
defined(SUPPORT_FILEFORMAT_PIC) || \
|
||||
defined(SUPPORT_FILEFORMAT_HDR) || \
|
||||
defined(SUPPORT_FILEFORMAT_PNM) || \
|
||||
defined(SUPPORT_FILEFORMAT_PSD)
|
||||
#if SUPPORT_FILEFORMAT_PNG || \
|
||||
SUPPORT_FILEFORMAT_BMP || \
|
||||
SUPPORT_FILEFORMAT_TGA || \
|
||||
SUPPORT_FILEFORMAT_JPG || \
|
||||
SUPPORT_FILEFORMAT_GIF || \
|
||||
SUPPORT_FILEFORMAT_PIC || \
|
||||
SUPPORT_FILEFORMAT_HDR || \
|
||||
SUPPORT_FILEFORMAT_PNM || \
|
||||
SUPPORT_FILEFORMAT_PSD
|
||||
|
||||
#define STBI_REQUIRED
|
||||
#endif
|
||||
@ -338,7 +334,7 @@ Image LoadImageAnim(const char *fileName, int *frames)
|
||||
Image image = { 0 };
|
||||
int frameCount = 0;
|
||||
|
||||
#if defined(SUPPORT_FILEFORMAT_GIF)
|
||||
#if SUPPORT_FILEFORMAT_GIF
|
||||
if (IsFileExtension(fileName, ".gif"))
|
||||
{
|
||||
int dataSize = 0;
|
||||
@ -383,7 +379,7 @@ Image LoadImageAnimFromMemory(const char *fileType, const unsigned char *fileDat
|
||||
// Security check for input data
|
||||
if ((fileType == NULL) || (fileData == NULL) || (dataSize == 0)) return image;
|
||||
|
||||
#if defined(SUPPORT_FILEFORMAT_GIF)
|
||||
#if SUPPORT_FILEFORMAT_GIF
|
||||
if ((strcmp(fileType, ".gif") == 0) || (strcmp(fileType, ".GIF") == 0))
|
||||
{
|
||||
if (fileData != NULL)
|
||||
@ -430,30 +426,30 @@ Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, i
|
||||
}
|
||||
|
||||
if ((false)
|
||||
#if defined(SUPPORT_FILEFORMAT_PNG)
|
||||
#if SUPPORT_FILEFORMAT_PNG
|
||||
|| (strcmp(fileType, ".png") == 0) || (strcmp(fileType, ".PNG") == 0)
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_BMP)
|
||||
#if SUPPORT_FILEFORMAT_BMP
|
||||
|| (strcmp(fileType, ".bmp") == 0) || (strcmp(fileType, ".BMP") == 0)
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_TGA)
|
||||
#if SUPPORT_FILEFORMAT_TGA
|
||||
|| (strcmp(fileType, ".tga") == 0) || (strcmp(fileType, ".TGA") == 0)
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_JPG)
|
||||
#if SUPPORT_FILEFORMAT_JPG
|
||||
|| (strcmp(fileType, ".jpg") == 0) || (strcmp(fileType, ".jpeg") == 0)
|
||||
|| (strcmp(fileType, ".JPG") == 0) || (strcmp(fileType, ".JPEG") == 0)
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_GIF)
|
||||
#if SUPPORT_FILEFORMAT_GIF
|
||||
|| (strcmp(fileType, ".gif") == 0) || (strcmp(fileType, ".GIF") == 0)
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_PIC)
|
||||
#if SUPPORT_FILEFORMAT_PIC
|
||||
|| (strcmp(fileType, ".pic") == 0) || (strcmp(fileType, ".PIC") == 0)
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_PNM)
|
||||
#if SUPPORT_FILEFORMAT_PNM
|
||||
|| (strcmp(fileType, ".ppm") == 0) || (strcmp(fileType, ".pgm") == 0)
|
||||
|| (strcmp(fileType, ".PPM") == 0) || (strcmp(fileType, ".PGM") == 0)
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_PSD)
|
||||
#if SUPPORT_FILEFORMAT_PSD
|
||||
|| (strcmp(fileType, ".psd") == 0) || (strcmp(fileType, ".PSD") == 0)
|
||||
#endif
|
||||
)
|
||||
@ -478,7 +474,7 @@ Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, i
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#if defined(SUPPORT_FILEFORMAT_HDR)
|
||||
#if SUPPORT_FILEFORMAT_HDR
|
||||
else if ((strcmp(fileType, ".hdr") == 0) || (strcmp(fileType, ".HDR") == 0))
|
||||
{
|
||||
#if defined(STBI_REQUIRED)
|
||||
@ -501,7 +497,7 @@ Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, i
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_QOI)
|
||||
#if SUPPORT_FILEFORMAT_QOI
|
||||
else if ((strcmp(fileType, ".qoi") == 0) || (strcmp(fileType, ".QOI") == 0))
|
||||
{
|
||||
if (fileData != NULL)
|
||||
@ -515,31 +511,31 @@ Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, i
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_DDS)
|
||||
#if SUPPORT_FILEFORMAT_DDS
|
||||
else if ((strcmp(fileType, ".dds") == 0) || (strcmp(fileType, ".DDS") == 0))
|
||||
{
|
||||
image.data = rl_load_dds_from_memory(fileData, dataSize, &image.width, &image.height, &image.format, &image.mipmaps);
|
||||
}
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_PKM)
|
||||
#if SUPPORT_FILEFORMAT_PKM
|
||||
else if ((strcmp(fileType, ".pkm") == 0) || (strcmp(fileType, ".PKM") == 0))
|
||||
{
|
||||
image.data = rl_load_pkm_from_memory(fileData, dataSize, &image.width, &image.height, &image.format, &image.mipmaps);
|
||||
}
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_KTX)
|
||||
#if SUPPORT_FILEFORMAT_KTX
|
||||
else if ((strcmp(fileType, ".ktx") == 0) || (strcmp(fileType, ".KTX") == 0))
|
||||
{
|
||||
image.data = rl_load_ktx_from_memory(fileData, dataSize, &image.width, &image.height, &image.format, &image.mipmaps);
|
||||
}
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_PVR)
|
||||
#if SUPPORT_FILEFORMAT_PVR
|
||||
else if ((strcmp(fileType, ".pvr") == 0) || (strcmp(fileType, ".PVR") == 0))
|
||||
{
|
||||
image.data = rl_load_pvr_from_memory(fileData, dataSize, &image.width, &image.height, &image.format, &image.mipmaps);
|
||||
}
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_ASTC)
|
||||
#if SUPPORT_FILEFORMAT_ASTC
|
||||
else if ((strcmp(fileType, ".astc") == 0) || (strcmp(fileType, ".ASTC") == 0))
|
||||
{
|
||||
image.data = rl_load_astc_from_memory(fileData, dataSize, &image.width, &image.height, &image.format, &image.mipmaps);
|
||||
@ -628,7 +624,7 @@ bool ExportImage(Image image, const char *fileName)
|
||||
// Security check for input data
|
||||
if ((image.width == 0) || (image.height == 0) || (image.data == NULL)) return result;
|
||||
|
||||
#if defined(SUPPORT_IMAGE_EXPORT)
|
||||
#if SUPPORT_IMAGE_EXPORT
|
||||
int channels = 4;
|
||||
bool allocatedData = false;
|
||||
unsigned char *imgData = (unsigned char *)image.data;
|
||||
@ -645,7 +641,7 @@ bool ExportImage(Image image, const char *fileName)
|
||||
}
|
||||
|
||||
if (false) { } // Required to attach following 'else' cases
|
||||
#if defined(SUPPORT_FILEFORMAT_PNG)
|
||||
#if SUPPORT_FILEFORMAT_PNG
|
||||
else if (IsFileExtension(fileName, ".png"))
|
||||
{
|
||||
int dataSize = 0;
|
||||
@ -654,17 +650,17 @@ bool ExportImage(Image image, const char *fileName)
|
||||
RL_FREE(fileData);
|
||||
}
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_BMP)
|
||||
#if SUPPORT_FILEFORMAT_BMP
|
||||
else if (IsFileExtension(fileName, ".bmp")) result = stbi_write_bmp(fileName, image.width, image.height, channels, imgData);
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_TGA)
|
||||
#if SUPPORT_FILEFORMAT_TGA
|
||||
else if (IsFileExtension(fileName, ".tga")) result = stbi_write_tga(fileName, image.width, image.height, channels, imgData);
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_JPG)
|
||||
#if SUPPORT_FILEFORMAT_JPG
|
||||
else if (IsFileExtension(fileName, ".jpg") ||
|
||||
IsFileExtension(fileName, ".jpeg")) result = stbi_write_jpg(fileName, image.width, image.height, channels, imgData, 90); // JPG quality: between 1 and 100
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_QOI)
|
||||
#if SUPPORT_FILEFORMAT_QOI
|
||||
else if (IsFileExtension(fileName, ".qoi"))
|
||||
{
|
||||
channels = 0;
|
||||
@ -684,7 +680,7 @@ bool ExportImage(Image image, const char *fileName)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(SUPPORT_FILEFORMAT_KTX)
|
||||
#if SUPPORT_FILEFORMAT_KTX
|
||||
else if (IsFileExtension(fileName, ".ktx"))
|
||||
{
|
||||
result = rl_save_ktx(fileName, image.data, image.width, image.height, image.format, image.mipmaps);
|
||||
@ -699,7 +695,7 @@ bool ExportImage(Image image, const char *fileName)
|
||||
else TRACELOG(LOG_WARNING, "IMAGE: Export image format requested not supported");
|
||||
|
||||
if (allocatedData) RL_FREE(imgData);
|
||||
#endif // SUPPORT_IMAGE_EXPORT
|
||||
#endif // SUPPORT_IMAGE_EXPORT
|
||||
|
||||
if (result != 0) TRACELOG(LOG_INFO, "FILEIO: [%s] Image exported successfully", fileName);
|
||||
else TRACELOG(LOG_WARNING, "FILEIO: [%s] Failed to export image", fileName);
|
||||
@ -716,7 +712,6 @@ unsigned char *ExportImageToMemory(Image image, const char *fileType, int *dataS
|
||||
// Security check for input data
|
||||
if ((image.width == 0) || (image.height == 0) || (image.data == NULL)) return NULL;
|
||||
|
||||
#if defined(SUPPORT_IMAGE_EXPORT)
|
||||
int channels = 4;
|
||||
|
||||
if (image.format == PIXELFORMAT_UNCOMPRESSED_GRAYSCALE) channels = 1;
|
||||
@ -724,13 +719,13 @@ unsigned char *ExportImageToMemory(Image image, const char *fileType, int *dataS
|
||||
else if (image.format == PIXELFORMAT_UNCOMPRESSED_R8G8B8) channels = 3;
|
||||
else if (image.format == PIXELFORMAT_UNCOMPRESSED_R8G8B8A8) channels = 4;
|
||||
|
||||
#if defined(SUPPORT_FILEFORMAT_PNG)
|
||||
#if SUPPORT_IMAGE_EXPORT
|
||||
if ((strcmp(fileType, ".png") == 0) || (strcmp(fileType, ".PNG") == 0))
|
||||
{
|
||||
fileData = stbi_write_png_to_mem((const unsigned char *)image.data, image.width*channels, image.width, image.height, channels, dataSize);
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
TRACELOG(LOG_WARNING, "IMAGE: To export image, enable flag SUPPORT_IMAGE_EXPORT");
|
||||
#endif
|
||||
|
||||
return fileData;
|
||||
@ -741,8 +736,6 @@ bool ExportImageAsCode(Image image, const char *fileName)
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
#if defined(SUPPORT_IMAGE_EXPORT)
|
||||
|
||||
#ifndef TEXT_BYTES_PER_LINE
|
||||
#define TEXT_BYTES_PER_LINE 20
|
||||
#endif
|
||||
@ -785,8 +778,6 @@ bool ExportImageAsCode(Image image, const char *fileName)
|
||||
|
||||
RL_FREE(txtData);
|
||||
|
||||
#endif // SUPPORT_IMAGE_EXPORT
|
||||
|
||||
if (success != 0) TRACELOG(LOG_INFO, "FILEIO: [%s] Image as code exported successfully", fileName);
|
||||
else TRACELOG(LOG_WARNING, "FILEIO: [%s] Failed to export image as code", fileName);
|
||||
|
||||
@ -814,7 +805,7 @@ Image GenImageColor(int width, int height, Color color)
|
||||
return image;
|
||||
}
|
||||
|
||||
#if defined(SUPPORT_IMAGE_GENERATION)
|
||||
#if SUPPORT_IMAGE_GENERATION
|
||||
// Generate image: linear gradient
|
||||
// The direction value specifies the direction of the gradient (in degrees)
|
||||
// with 0 being vertical (from top to bottom), 90 being horizontal (from left to right)
|
||||
@ -1137,7 +1128,7 @@ Image GenImageText(int width, int height, const char *text)
|
||||
|
||||
return image;
|
||||
}
|
||||
#endif // SUPPORT_IMAGE_GENERATION
|
||||
#endif // SUPPORT_IMAGE_GENERATION
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Image manipulation functions
|
||||
@ -1451,9 +1442,7 @@ void ImageFormat(Image *image, int newFormat)
|
||||
if (image->mipmaps > 1)
|
||||
{
|
||||
image->mipmaps = 1;
|
||||
#if defined(SUPPORT_IMAGE_MANIPULATION)
|
||||
if (image->data != NULL) ImageMipmaps(image);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else TRACELOG(LOG_WARNING, "IMAGE: Data format is compressed, can not be converted");
|
||||
@ -1464,7 +1453,7 @@ void ImageFormat(Image *image, int newFormat)
|
||||
Image ImageText(const char *text, int fontSize, Color color)
|
||||
{
|
||||
Image imText = { 0 };
|
||||
#if defined(SUPPORT_MODULE_RTEXT)
|
||||
#if SUPPORT_MODULE_RTEXT
|
||||
int defaultFontSize = 10; // Default Font chars height in pixel
|
||||
if (fontSize < defaultFontSize) fontSize = defaultFontSize;
|
||||
int spacing = fontSize/defaultFontSize;
|
||||
@ -1481,7 +1470,7 @@ Image ImageText(const char *text, int fontSize, Color color)
|
||||
Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint)
|
||||
{
|
||||
Image imText = { 0 };
|
||||
#if defined(SUPPORT_MODULE_RTEXT)
|
||||
#if SUPPORT_MODULE_RTEXT
|
||||
if (text == NULL) return imText;
|
||||
|
||||
int textLength = (int)strlen(text); // Get length of text in bytes
|
||||
@ -1873,7 +1862,6 @@ void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, i
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(SUPPORT_IMAGE_MANIPULATION)
|
||||
// Convert image to POT (power-of-two)
|
||||
// NOTE: It could be useful on OpenGL ES 2.0 (RPI, HTML5)
|
||||
void ImageToPOT(Image *image, Color fill)
|
||||
@ -2944,7 +2932,6 @@ void ImageColorReplace(Image *image, Color color, Color replace)
|
||||
(format == PIXELFORMAT_COMPRESSED_ETC2_RGB) ||
|
||||
(format == PIXELFORMAT_COMPRESSED_PVRT_RGB)) ImageFormat(image, format);
|
||||
}
|
||||
#endif // SUPPORT_IMAGE_MANIPULATION
|
||||
|
||||
// Load color data from image as a Color array (RGBA - 32bit)
|
||||
// NOTE: Memory allocated should be freed using UnloadImageColors();
|
||||
@ -4095,7 +4082,7 @@ void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color
|
||||
// Draw text (default font) within an image (destination)
|
||||
void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color)
|
||||
{
|
||||
#if defined(SUPPORT_MODULE_RTEXT) && defined(SUPPORT_DEFAULT_FONT)
|
||||
#if SUPPORT_MODULE_RTEXT
|
||||
// Make sure default font is loaded to be used on image text drawing
|
||||
if (GetFontDefault().texture.id == 0) LoadFontDefault();
|
||||
|
||||
@ -4234,13 +4221,11 @@ TextureCubemap LoadTextureCubemap(Image image, int layout)
|
||||
ImageFormat(&faces, image.format);
|
||||
|
||||
Image mipmapped = ImageCopy(image);
|
||||
#if defined(SUPPORT_IMAGE_MANIPULATION)
|
||||
if (image.mipmaps > 1)
|
||||
{
|
||||
ImageMipmaps(&mipmapped);
|
||||
ImageMipmaps(&faces);
|
||||
}
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < 6; i++) ImageDraw(&faces, mipmapped, faceRecs[i], (Rectangle){ 0, (float)size*i, (float)size, (float)size }, WHITE);
|
||||
|
||||
@ -5599,4 +5584,4 @@ static Vector4 *LoadImageDataNormalized(Image image)
|
||||
return pixels;
|
||||
}
|
||||
|
||||
#endif // SUPPORT_MODULE_RTEXTURES
|
||||
#endif // SUPPORT_MODULE_RTEXTURES
|
||||
|
||||
Reference in New Issue
Block a user