diff options
| author | raysan5 <[email protected]> | 2021-10-06 21:20:36 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2021-10-06 21:20:36 +0200 |
| commit | 3e71232a04a7d570d139f019dfb873fff672878d (patch) | |
| tree | 2bd98e1bcb67aa7a6d14544abf6d0a4f7a75be7e /examples/textures | |
| parent | 700d448d75debea32572dc87cf3add0f755fed43 (diff) | |
| download | raylib-3e71232a04a7d570d139f019dfb873fff672878d.tar.gz raylib-3e71232a04a7d570d139f019dfb873fff672878d.zip | |
WARNING: BREAKING: REMOVED: `GenImagePerlinNoise()`
raylib was using `stb_perlin.h` library to generate perlin noise, it seems that recently this library has been flagged as it could be infringing some algorythm patent. For security, it has been removed from raylib.
Diffstat (limited to 'examples/textures')
| -rw-r--r-- | examples/textures/textures_image_generation.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/examples/textures/textures_image_generation.c b/examples/textures/textures_image_generation.c index e2513a87..d138d3c7 100644 --- a/examples/textures/textures_image_generation.c +++ b/examples/textures/textures_image_generation.c @@ -5,13 +5,13 @@ * This example has been created using raylib 1.8 (www.raylib.com) * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) * -* Copyright (c) 2O17 Wilhem Barbier (@nounoursheureux) +* Copyright (c) 2O17-2021 Wilhem Barbier (@nounoursheureux) and Ramon Santamaria (@raysan5) * ********************************************************************************************/ #include "raylib.h" -#define NUM_TEXTURES 7 // Currently we have 7 generation algorithms +#define NUM_TEXTURES 6 // Currently we have 7 generation algorithms int main(void) { @@ -27,7 +27,6 @@ int main(void) Image radialGradient = GenImageGradientRadial(screenWidth, screenHeight, 0.0f, WHITE, BLACK); Image checked = GenImageChecked(screenWidth, screenHeight, 32, 32, RED, BLUE); Image whiteNoise = GenImageWhiteNoise(screenWidth, screenHeight, 0.5f); - Image perlinNoise = GenImagePerlinNoise(screenWidth, screenHeight, 50, 50, 4.0f); Image cellular = GenImageCellular(screenWidth, screenHeight, 32); Texture2D textures[NUM_TEXTURES] = { 0 }; @@ -37,8 +36,7 @@ int main(void) textures[2] = LoadTextureFromImage(radialGradient); textures[3] = LoadTextureFromImage(checked); textures[4] = LoadTextureFromImage(whiteNoise); - textures[5] = LoadTextureFromImage(perlinNoise); - textures[6] = LoadTextureFromImage(cellular); + textures[5] = LoadTextureFromImage(cellular); // Unload image data (CPU RAM) UnloadImage(verticalGradient); @@ -46,7 +44,6 @@ int main(void) UnloadImage(radialGradient); UnloadImage(checked); UnloadImage(whiteNoise); - UnloadImage(perlinNoise); UnloadImage(cellular); int currentTexture = 0; @@ -84,8 +81,7 @@ int main(void) case 2: DrawText("RADIAL GRADIENT", 580, 10, 20, LIGHTGRAY); break; case 3: DrawText("CHECKED", 680, 10, 20, RAYWHITE); break; case 4: DrawText("WHITE NOISE", 640, 10, 20, RED); break; - case 5: DrawText("PERLIN NOISE", 630, 10, 20, RAYWHITE); break; - case 6: DrawText("CELLULAR", 670, 10, 20, RAYWHITE); break; + case 5: DrawText("CELLULAR", 670, 10, 20, RAYWHITE); break; default: break; } |
