diff options
| author | Ray <[email protected]> | 2017-09-26 09:13:16 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-09-26 09:13:16 +0200 |
| commit | 4a63e5dfb3006483cace85c8161d12057a9e8488 (patch) | |
| tree | 53f1ca68df7c2d398a157a825c21fc4ea704f07d /src/textures.c | |
| parent | 7ca90d87f9fa6f399d3316df347c63baf0eb675d (diff) | |
| parent | 5ace947a809d32d0177334933b0709b3164a79d5 (diff) | |
| download | raylib-4a63e5dfb3006483cace85c8161d12057a9e8488.tar.gz raylib-4a63e5dfb3006483cace85c8161d12057a9e8488.zip | |
Merge pull request #360 from raysan5/develop
Integrate Develop branch
Diffstat (limited to 'src/textures.c')
| -rw-r--r-- | src/textures.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/textures.c b/src/textures.c index 9322004b..b9fc5c19 100644 --- a/src/textures.c +++ b/src/textures.c @@ -23,6 +23,9 @@ * Support multiple image editing functions to scale, adjust colors, flip, draw on images, crop... * If not defined only three image editing functions supported: ImageFormat(), ImageAlphaMask(), ImageToPOT() * +* #define SUPPORT_IMAGE_GENERATION +* Support proedural image generation functionality (gradient, spot, perlin-noise, cellular) +* * DEPENDENCIES: * stb_image - Multiple image formats loading (JPEG, PNG, BMP, TGA, PSD, GIF, PIC) * NOTE: stb_image has been slightly modified to support Android platform. @@ -56,6 +59,7 @@ #define SUPPORT_FILEFORMAT_DDS #define SUPPORT_FILEFORMAT_HDR #define SUPPORT_IMAGE_MANIPULATION +#define SUPPORT_IMAGE_GENERATION //------------------------------------------------- #include "raylib.h" @@ -1064,7 +1068,7 @@ Image ImageTextEx(SpriteFont font, const char *text, float fontSize, int spacing Vector2 imSize = MeasureTextEx(font, text, font.baseSize, spacing); - // NOTE: GetTextureData() not available in OpenGL ES + // NOTE: glGetTexImage() not available in OpenGL ES Image imFont = GetTextureData(font.texture); ImageFormat(&imFont, UNCOMPRESSED_R8G8B8A8); // Convert to 32 bit for color tint @@ -1447,6 +1451,7 @@ void ImageColorBrightness(Image *image, int brightness) } #endif // SUPPORT_IMAGE_MANIPULATION +#if defined(SUPPORT_IMAGE_GENERATION) // Generate image: vertical gradient Image GenImageGradientV(int width, int height, Color top, Color bottom) { @@ -1647,6 +1652,7 @@ Image GenImageCellular(int width, int height, int tileSize) return image; } +#endif // SUPPORT_IMAGE_GENERATION // Generate GPU mipmaps for a texture void GenTextureMipmaps(Texture2D *texture) |
