synced with master
This commit is contained in:
commit
5eaa1d99ac
27 changed files with 3074 additions and 2028 deletions
|
|
@ -31,6 +31,7 @@ Some people ported raylib to other languages in form of bindings or wrappers to
|
||||||
| h-raylib | **4.5** | [Haskell](https://haskell.org/) | Apache-2.0 | https://github.com/Anut-py/h-raylib |
|
| h-raylib | **4.5** | [Haskell](https://haskell.org/) | Apache-2.0 | https://github.com/Anut-py/h-raylib |
|
||||||
| raylib-hx | 4.2 | [Haxe](https://haxe.org/) | Zlib | https://github.com/foreignsasquatch/raylib-hx |
|
| raylib-hx | 4.2 | [Haxe](https://haxe.org/) | Zlib | https://github.com/foreignsasquatch/raylib-hx |
|
||||||
| hb-raylib | 3.5 | [Harbour](https://harbour.github.io) | MIT | https://github.com/MarcosLeonardoMendezGerencir/hb-raylib |
|
| hb-raylib | 3.5 | [Harbour](https://harbour.github.io) | MIT | https://github.com/MarcosLeonardoMendezGerencir/hb-raylib |
|
||||||
|
| jaylib | 4.5 | [Janet](https://janet-lang.org/) | MIT | https://github.com/janet-lang/jaylib |
|
||||||
| jaylib | 4.2 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | GPLv3+CE | https://github.com/electronstudio/jaylib/ |
|
| jaylib | 4.2 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | GPLv3+CE | https://github.com/electronstudio/jaylib/ |
|
||||||
| raylib-j | 4.0 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | Zlib | https://github.com/CreedVI/Raylib-J |
|
| raylib-j | 4.0 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | Zlib | https://github.com/CreedVI/Raylib-J |
|
||||||
| raylib.jl | 4.2 | [Julia](https://julialang.org/) | Zlib | https://github.com/irishgreencitrus/raylib.jl |
|
| raylib.jl | 4.2 | [Julia](https://julialang.org/) | Zlib | https://github.com/irishgreencitrus/raylib.jl |
|
||||||
|
|
@ -133,7 +134,6 @@ These are older raylib bindings that are more than 2 versions old or have not be
|
||||||
| raylib-jai | 3.1-dev | [Jai](https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md) | https://github.com/kujukuju/raylib-jai |
|
| raylib-jai | 3.1-dev | [Jai](https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md) | https://github.com/kujukuju/raylib-jai |
|
||||||
| ray.zig | 2.5 | [Zig](https://ziglang.org/) | https://github.com/BitPuffin/zig-raylib-experiments |
|
| ray.zig | 2.5 | [Zig](https://ziglang.org/) | https://github.com/BitPuffin/zig-raylib-experiments |
|
||||||
| raylib-Ada | 3.0 | [Ada](https://www.adacore.com/about-ada) | https://github.com/mimo/raylib-Ada |
|
| raylib-Ada | 3.0 | [Ada](https://www.adacore.com/about-ada) | https://github.com/mimo/raylib-Ada |
|
||||||
| jaylib | 3.0 | [Janet](https://janet-lang.org/) | https://github.com/janet-lang/jaylib |
|
|
||||||
| raykit | ? | [Kit](https://www.kitlang.org/) | https://github.com/Gamerfiend/raykit |
|
| raykit | ? | [Kit](https://www.kitlang.org/) | https://github.com/Gamerfiend/raykit |
|
||||||
| ray.mod | 3.0 | [BlitzMax](https://blitzmax.org/) | https://github.com/bmx-ng/ray.mod |
|
| ray.mod | 3.0 | [BlitzMax](https://blitzmax.org/) | https://github.com/bmx-ng/ray.mod |
|
||||||
| raylib-mosaic | 3.0 | [Mosaic](https://github.com/sal55/langs/tree/master/Mosaic) | https://github.com/pluckyporcupine/raylib-mosaic |
|
| raylib-mosaic | 3.0 | [Mosaic](https://github.com/sal55/langs/tree/master/Mosaic) | https://github.com/pluckyporcupine/raylib-mosaic |
|
||||||
|
|
|
||||||
6
FAQ.md
6
FAQ.md
|
|
@ -14,7 +14,7 @@
|
||||||
- [What does raylib provide that other engines or libraries don't?](#what-does-raylib-provide-that-other-engines-or-libraries-dont)
|
- [What does raylib provide that other engines or libraries don't?](#what-does-raylib-provide-that-other-engines-or-libraries-dont)
|
||||||
- [How does raylib compare to Unity/Unreal/Godot?](#how-does-raylib-compare-to-unityunrealgodot)
|
- [How does raylib compare to Unity/Unreal/Godot?](#how-does-raylib-compare-to-unityunrealgodot)
|
||||||
- [What development tools are required for raylib?](#what-development-tools-are-required-for-raylib)
|
- [What development tools are required for raylib?](#what-development-tools-are-required-for-raylib)
|
||||||
- [Which are raylib external dependencies?](#which-are-raylib-external-dependencies)
|
- [What are raylib's external dependencies?](#what-are-raylibs-external-dependencies)
|
||||||
- [Can I use raylib with other technologies or libraries?](#can-i-use-raylib-with-other-technologies-or-libraries)
|
- [Can I use raylib with other technologies or libraries?](#can-i-use-raylib-with-other-technologies-or-libraries)
|
||||||
- [What file formats are supported by raylib?](#what-file-formats-are-supported-by-raylib)
|
- [What file formats are supported by raylib?](#what-file-formats-are-supported-by-raylib)
|
||||||
- [Does raylib support the Vulkan API?](#does-raylib-support-the-vulkan-api)
|
- [Does raylib support the Vulkan API?](#does-raylib-support-the-vulkan-api)
|
||||||
|
|
@ -119,8 +119,8 @@ raylib can load data from multiple standard file formats:
|
||||||
|
|
||||||
- Image/Textures: PNG, BMP, TGA, JPG, GIF, QOI, PSD, DDS, HDR, KTX, ASTC, PKM, PVR
|
- Image/Textures: PNG, BMP, TGA, JPG, GIF, QOI, PSD, DDS, HDR, KTX, ASTC, PKM, PVR
|
||||||
- Fonts: FNT (sprite font), TTF, OTF
|
- Fonts: FNT (sprite font), TTF, OTF
|
||||||
- Models/Meshes: OBJ, IQM, GLTF, VOX
|
- Models/Meshes: OBJ, IQM, GLTF, VOX, M3D
|
||||||
- Audio: WAV, OGG, MP3, FLAC, XM, MOD
|
- Audio: WAV, OGG, MP3, FLAC, XM, MOD, QOA
|
||||||
|
|
||||||
### Does raylib support the Vulkan API?
|
### Does raylib support the Vulkan API?
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<img align="left" src="https://github.com/raysan5/raylib/blob/master/logo/raylib_logo_animation.gif" width="288px">
|
<img align="left" style="width:260px" src="https://github.com/raysan5/raylib/blob/master/logo/raylib_logo_animation.gif" width="288px">
|
||||||
|
|
||||||
**raylib is a simple and easy-to-use library to enjoy videogames programming.**
|
**raylib is a simple and easy-to-use library to enjoy videogames programming.**
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const raylib = @import("src/build.zig");
|
const raylib = @import("src/build.zig");
|
||||||
|
|
||||||
pub fn build(b: *std.build.Builder) void {
|
// This has been tested to work with zig master branch as of commit 87de821 or May 14 2023
|
||||||
|
pub fn build(b: *std.Build) void {
|
||||||
raylib.build(b);
|
raylib.build(b);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ if (${PLATFORM} MATCHES "Desktop")
|
||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
find_package(OpenGL QUIET)
|
find_package(OpenGL QUIET)
|
||||||
set(LIBS_PRIVATE ${OPENGL_LIBRARIES} winmm)
|
set(LIBS_PRIVATE ${OPENGL_LIBRARIES} winmm)
|
||||||
else ()
|
elseif (UNIX)
|
||||||
find_library(pthread NAMES pthread)
|
find_library(pthread NAMES pthread)
|
||||||
find_package(OpenGL QUIET)
|
find_package(OpenGL QUIET)
|
||||||
if ("${OPENGL_LIBRARIES}" STREQUAL "")
|
if ("${OPENGL_LIBRARIES}" STREQUAL "")
|
||||||
|
|
@ -36,9 +36,22 @@ if (${PLATFORM} MATCHES "Desktop")
|
||||||
find_library(OSS_LIBRARY ossaudio)
|
find_library(OSS_LIBRARY ossaudio)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
set(LIBS_PRIVATE m pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY})
|
||||||
|
else ()
|
||||||
|
find_library(pthread NAMES pthread)
|
||||||
|
find_package(OpenGL QUIET)
|
||||||
|
if ("${OPENGL_LIBRARIES}" STREQUAL "")
|
||||||
|
set(OPENGL_LIBRARIES "GL")
|
||||||
|
endif ()
|
||||||
|
|
||||||
set(LIBS_PRIVATE m atomic pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY})
|
set(LIBS_PRIVATE m atomic pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY})
|
||||||
|
|
||||||
if (USE_AUDIO)
|
if ("${CMAKE_SYSTEM_NAME}" MATCHES "(Net|Open)BSD")
|
||||||
|
find_library(OSS_LIBRARY ossaudio)
|
||||||
|
set(LIBS_PRIVATE m pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY})
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (NOT "${CMAKE_SYSTEM_NAME}" MATCHES "(Net|Open)BSD" AND USE_AUDIO)
|
||||||
set(LIBS_PRIVATE ${LIBS_PRIVATE} dl)
|
set(LIBS_PRIVATE ${LIBS_PRIVATE} dl)
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
|
||||||
|
|
@ -453,6 +453,7 @@ TEXTURES = \
|
||||||
textures/textures_image_generation \
|
textures/textures_image_generation \
|
||||||
textures/textures_image_loading \
|
textures/textures_image_loading \
|
||||||
textures/textures_image_processing \
|
textures/textures_image_processing \
|
||||||
|
textures/textures_image_rotate \
|
||||||
textures/textures_image_text \
|
textures/textures_image_text \
|
||||||
textures/textures_to_image \
|
textures/textures_to_image \
|
||||||
textures/textures_raw_data \
|
textures/textures_raw_data \
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const builtin = @import("builtin");
|
const builtin = @import("builtin");
|
||||||
|
|
||||||
|
// This has been tested to work with zig master branch as of commit 87de821 or May 14 2023
|
||||||
fn add_module(comptime module: []const u8, b: *std.Build, target: std.zig.CrossTarget, optimize: std.builtin.OptimizeMode) !*std.Build.Step {
|
fn add_module(comptime module: []const u8, b: *std.Build, target: std.zig.CrossTarget, optimize: std.builtin.OptimizeMode) !*std.Build.Step {
|
||||||
if (target.getOsTag() == .emscripten) {
|
if (target.getOsTag() == .emscripten) {
|
||||||
@panic("Emscripten building via Zig unsupported");
|
@panic("Emscripten building via Zig unsupported");
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
#define NUM_TEXTURES 6 // Currently we have 7 generation algorithms
|
#define NUM_TEXTURES 9 // Currently we have 8 generation algorithms but some are have multiple purposes (Linear and Square Gradients)
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Program main entry point
|
// Program main entry point
|
||||||
|
|
@ -27,28 +27,37 @@ int main(void)
|
||||||
|
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [textures] example - procedural images generation");
|
InitWindow(screenWidth, screenHeight, "raylib [textures] example - procedural images generation");
|
||||||
|
|
||||||
Image verticalGradient = GenImageGradientV(screenWidth, screenHeight, RED, BLUE);
|
Image verticalGradient = GenImageGradientLinear(screenWidth, screenHeight, 0, RED, BLUE);
|
||||||
Image horizontalGradient = GenImageGradientH(screenWidth, screenHeight, RED, BLUE);
|
Image horizontalGradient = GenImageGradientLinear(screenWidth, screenHeight, 90, RED, BLUE);
|
||||||
|
Image diagonalGradient = GenImageGradientLinear(screenWidth, screenHeight, 45, RED, BLUE);
|
||||||
Image radialGradient = GenImageGradientRadial(screenWidth, screenHeight, 0.0f, WHITE, BLACK);
|
Image radialGradient = GenImageGradientRadial(screenWidth, screenHeight, 0.0f, WHITE, BLACK);
|
||||||
|
Image squareGradient = GenImageGradientSquare(screenWidth, screenHeight, 0.0f, WHITE, BLACK);
|
||||||
Image checked = GenImageChecked(screenWidth, screenHeight, 32, 32, RED, BLUE);
|
Image checked = GenImageChecked(screenWidth, screenHeight, 32, 32, RED, BLUE);
|
||||||
Image whiteNoise = GenImageWhiteNoise(screenWidth, screenHeight, 0.5f);
|
Image whiteNoise = GenImageWhiteNoise(screenWidth, screenHeight, 0.5f);
|
||||||
|
Image perlinNoise = GenImagePerlinNoise(screenWidth, screenHeight, 50, 50, 4.0f);
|
||||||
Image cellular = GenImageCellular(screenWidth, screenHeight, 32);
|
Image cellular = GenImageCellular(screenWidth, screenHeight, 32);
|
||||||
|
|
||||||
Texture2D textures[NUM_TEXTURES] = { 0 };
|
Texture2D textures[NUM_TEXTURES] = { 0 };
|
||||||
|
|
||||||
textures[0] = LoadTextureFromImage(verticalGradient);
|
textures[0] = LoadTextureFromImage(verticalGradient);
|
||||||
textures[1] = LoadTextureFromImage(horizontalGradient);
|
textures[1] = LoadTextureFromImage(horizontalGradient);
|
||||||
textures[2] = LoadTextureFromImage(radialGradient);
|
textures[2] = LoadTextureFromImage(diagonalGradient);
|
||||||
textures[3] = LoadTextureFromImage(checked);
|
textures[3] = LoadTextureFromImage(radialGradient);
|
||||||
textures[4] = LoadTextureFromImage(whiteNoise);
|
textures[4] = LoadTextureFromImage(squareGradient);
|
||||||
textures[5] = LoadTextureFromImage(cellular);
|
textures[5] = LoadTextureFromImage(checked);
|
||||||
|
textures[6] = LoadTextureFromImage(whiteNoise);
|
||||||
|
textures[7] = LoadTextureFromImage(perlinNoise);
|
||||||
|
textures[8] = LoadTextureFromImage(cellular);
|
||||||
|
|
||||||
// Unload image data (CPU RAM)
|
// Unload image data (CPU RAM)
|
||||||
UnloadImage(verticalGradient);
|
UnloadImage(verticalGradient);
|
||||||
UnloadImage(horizontalGradient);
|
UnloadImage(horizontalGradient);
|
||||||
|
UnloadImage(diagonalGradient);
|
||||||
UnloadImage(radialGradient);
|
UnloadImage(radialGradient);
|
||||||
|
UnloadImage(squareGradient);
|
||||||
UnloadImage(checked);
|
UnloadImage(checked);
|
||||||
UnloadImage(whiteNoise);
|
UnloadImage(whiteNoise);
|
||||||
|
UnloadImage(perlinNoise);
|
||||||
UnloadImage(cellular);
|
UnloadImage(cellular);
|
||||||
|
|
||||||
int currentTexture = 0;
|
int currentTexture = 0;
|
||||||
|
|
@ -83,10 +92,13 @@ int main(void)
|
||||||
{
|
{
|
||||||
case 0: DrawText("VERTICAL GRADIENT", 560, 10, 20, RAYWHITE); break;
|
case 0: DrawText("VERTICAL GRADIENT", 560, 10, 20, RAYWHITE); break;
|
||||||
case 1: DrawText("HORIZONTAL GRADIENT", 540, 10, 20, RAYWHITE); break;
|
case 1: DrawText("HORIZONTAL GRADIENT", 540, 10, 20, RAYWHITE); break;
|
||||||
case 2: DrawText("RADIAL GRADIENT", 580, 10, 20, LIGHTGRAY); break;
|
case 2: DrawText("DIAGONAL GRADIENT", 540, 10, 20, RAYWHITE); break;
|
||||||
case 3: DrawText("CHECKED", 680, 10, 20, RAYWHITE); break;
|
case 3: DrawText("RADIAL GRADIENT", 580, 10, 20, LIGHTGRAY); break;
|
||||||
case 4: DrawText("WHITE NOISE", 640, 10, 20, RED); break;
|
case 4: DrawText("SQUARE GRADIENT", 580, 10, 20, LIGHTGRAY); break;
|
||||||
case 5: DrawText("CELLULAR", 670, 10, 20, RAYWHITE); break;
|
case 5: DrawText("CHECKED", 680, 10, 20, RAYWHITE); break;
|
||||||
|
case 6: DrawText("WHITE NOISE", 640, 10, 20, RED); break;
|
||||||
|
case 7: DrawText("PERLIN NOISE", 640, 10, 20, RED); break;
|
||||||
|
case 8: DrawText("CELLULAR", 670, 10, 20, RAYWHITE); break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
79
examples/textures/textures_image_rotate.c
Normal file
79
examples/textures/textures_image_rotate.c
Normal file
|
|
@ -0,0 +1,79 @@
|
||||||
|
/*******************************************************************************************
|
||||||
|
*
|
||||||
|
* raylib [textures] example - Image Rotation
|
||||||
|
*
|
||||||
|
* Example originally created with raylib 1.0, last time updated with raylib 1.0
|
||||||
|
*
|
||||||
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||||
|
* BSD-like license that allows static linking with closed source software
|
||||||
|
*
|
||||||
|
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
|
||||||
|
*
|
||||||
|
********************************************************************************************/
|
||||||
|
|
||||||
|
#include "raylib.h"
|
||||||
|
|
||||||
|
#define NUM_TEXTURES 3
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
// Initialization
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
const int screenWidth = 800;
|
||||||
|
const int screenHeight = 450;
|
||||||
|
|
||||||
|
InitWindow(screenWidth, screenHeight, "raylib [textures] example - texture rotation");
|
||||||
|
|
||||||
|
// NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
|
||||||
|
Image image45 = LoadImage("resources/raylib_logo.png");
|
||||||
|
Image image90 = LoadImage("resources/raylib_logo.png");
|
||||||
|
Image imageNeg90 = LoadImage("resources/raylib_logo.png");
|
||||||
|
|
||||||
|
ImageRotate(&image45, 45);
|
||||||
|
ImageRotate(&image90, 90);
|
||||||
|
ImageRotate(&imageNeg90, -90);
|
||||||
|
|
||||||
|
Texture2D textures[NUM_TEXTURES] = { 0 };
|
||||||
|
|
||||||
|
textures[0] = LoadTextureFromImage(image45);
|
||||||
|
textures[1] = LoadTextureFromImage(image90);
|
||||||
|
textures[2] = LoadTextureFromImage(imageNeg90);
|
||||||
|
|
||||||
|
int currentTexture = 0;
|
||||||
|
//---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Main game loop
|
||||||
|
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||||
|
{
|
||||||
|
// Update
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT) || IsKeyPressed(KEY_RIGHT))
|
||||||
|
{
|
||||||
|
currentTexture = (currentTexture + 1)%NUM_TEXTURES; // Cycle between the textures
|
||||||
|
}
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Draw
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
BeginDrawing();
|
||||||
|
|
||||||
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
|
DrawTexture(textures[currentTexture], screenWidth/2 - textures[currentTexture].width/2, screenHeight/2 - textures[currentTexture].height/2, WHITE);
|
||||||
|
|
||||||
|
EndDrawing();
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
}
|
||||||
|
|
||||||
|
// De-Initialization
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
for (int i = 0; i < NUM_TEXTURES; i++) UnloadTexture(textures[i]);
|
||||||
|
|
||||||
|
CloseWindow(); // Close window and OpenGL context
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BIN
examples/textures/textures_image_rotate.png
Normal file
BIN
examples/textures/textures_image_rotate.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
|
|
@ -15,7 +15,7 @@
|
||||||
{
|
{
|
||||||
"name": "RAYLIB_VERSION_MINOR",
|
"name": "RAYLIB_VERSION_MINOR",
|
||||||
"type": "INT",
|
"type": "INT",
|
||||||
"value": 5,
|
"value": 6,
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
{
|
{
|
||||||
"name": "RAYLIB_VERSION",
|
"name": "RAYLIB_VERSION",
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
"value": "4.5",
|
"value": "4.6-dev",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1032,6 +1032,11 @@
|
||||||
"type": "Transform **",
|
"type": "Transform **",
|
||||||
"name": "framePoses",
|
"name": "framePoses",
|
||||||
"description": "Poses array by frame"
|
"description": "Poses array by frame"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "char[32]",
|
||||||
|
"name": "name",
|
||||||
|
"description": "Animation name"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -6236,8 +6241,8 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "GenImageGradientV",
|
"name": "GenImageGradientLinear",
|
||||||
"description": "Generate image: vertical gradient",
|
"description": "Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradient",
|
||||||
"returnType": "Image",
|
"returnType": "Image",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
|
|
@ -6248,36 +6253,17 @@
|
||||||
"type": "int",
|
"type": "int",
|
||||||
"name": "height"
|
"name": "height"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "Color",
|
|
||||||
"name": "top"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Color",
|
|
||||||
"name": "bottom"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "GenImageGradientH",
|
|
||||||
"description": "Generate image: horizontal gradient",
|
|
||||||
"returnType": "Image",
|
|
||||||
"params": [
|
|
||||||
{
|
{
|
||||||
"type": "int",
|
"type": "int",
|
||||||
"name": "width"
|
"name": "direction"
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "int",
|
|
||||||
"name": "height"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Color",
|
"type": "Color",
|
||||||
"name": "left"
|
"name": "start"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Color",
|
"type": "Color",
|
||||||
"name": "right"
|
"name": "end"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -6308,6 +6294,33 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "GenImageGradientSquare",
|
||||||
|
"description": "Generate image: square gradient",
|
||||||
|
"returnType": "Image",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "int",
|
||||||
|
"name": "width"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "int",
|
||||||
|
"name": "height"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "float",
|
||||||
|
"name": "density"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "inner"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "outer"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "GenImageChecked",
|
"name": "GenImageChecked",
|
||||||
"description": "Generate image: checked",
|
"description": "Generate image: checked",
|
||||||
|
|
@ -6744,6 +6757,21 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "ImageRotate",
|
||||||
|
"description": "Rotate image by input angle in degrees (-359 to 359) ",
|
||||||
|
"returnType": "void",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Image *",
|
||||||
|
"name": "image"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "int",
|
||||||
|
"name": "degrees"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "ImageRotateCW",
|
"name": "ImageRotateCW",
|
||||||
"description": "Rotate image clockwise 90deg",
|
"description": "Rotate image clockwise 90deg",
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ return {
|
||||||
{
|
{
|
||||||
name = "RAYLIB_VERSION_MINOR",
|
name = "RAYLIB_VERSION_MINOR",
|
||||||
type = "INT",
|
type = "INT",
|
||||||
value = 5,
|
value = 6,
|
||||||
description = ""
|
description = ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -27,7 +27,7 @@ return {
|
||||||
{
|
{
|
||||||
name = "RAYLIB_VERSION",
|
name = "RAYLIB_VERSION",
|
||||||
type = "STRING",
|
type = "STRING",
|
||||||
value = "4.5",
|
value = "4.6-dev",
|
||||||
description = ""
|
description = ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -1032,6 +1032,11 @@ return {
|
||||||
type = "Transform **",
|
type = "Transform **",
|
||||||
name = "framePoses",
|
name = "framePoses",
|
||||||
description = "Poses array by frame"
|
description = "Poses array by frame"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "char[32]",
|
||||||
|
name = "name",
|
||||||
|
description = "Animation name"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -4991,25 +4996,15 @@ return {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "GenImageGradientV",
|
name = "GenImageGradientLinear",
|
||||||
description = "Generate image: vertical gradient",
|
description = "Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradient",
|
||||||
returnType = "Image",
|
returnType = "Image",
|
||||||
params = {
|
params = {
|
||||||
{type = "int", name = "width"},
|
{type = "int", name = "width"},
|
||||||
{type = "int", name = "height"},
|
{type = "int", name = "height"},
|
||||||
{type = "Color", name = "top"},
|
{type = "int", name = "direction"},
|
||||||
{type = "Color", name = "bottom"}
|
{type = "Color", name = "start"},
|
||||||
}
|
{type = "Color", name = "end"}
|
||||||
},
|
|
||||||
{
|
|
||||||
name = "GenImageGradientH",
|
|
||||||
description = "Generate image: horizontal gradient",
|
|
||||||
returnType = "Image",
|
|
||||||
params = {
|
|
||||||
{type = "int", name = "width"},
|
|
||||||
{type = "int", name = "height"},
|
|
||||||
{type = "Color", name = "left"},
|
|
||||||
{type = "Color", name = "right"}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -5024,6 +5019,18 @@ return {
|
||||||
{type = "Color", name = "outer"}
|
{type = "Color", name = "outer"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "GenImageGradientSquare",
|
||||||
|
description = "Generate image: square gradient",
|
||||||
|
returnType = "Image",
|
||||||
|
params = {
|
||||||
|
{type = "int", name = "width"},
|
||||||
|
{type = "int", name = "height"},
|
||||||
|
{type = "float", name = "density"},
|
||||||
|
{type = "Color", name = "inner"},
|
||||||
|
{type = "Color", name = "outer"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "GenImageChecked",
|
name = "GenImageChecked",
|
||||||
description = "Generate image: checked",
|
description = "Generate image: checked",
|
||||||
|
|
@ -5259,6 +5266,15 @@ return {
|
||||||
{type = "Image *", name = "image"}
|
{type = "Image *", name = "image"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "ImageRotate",
|
||||||
|
description = "Rotate image by input angle in degrees (-359 to 359) ",
|
||||||
|
returnType = "void",
|
||||||
|
params = {
|
||||||
|
{type = "Image *", name = "image"},
|
||||||
|
{type = "int", name = "degrees"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "ImageRotateCW",
|
name = "ImageRotateCW",
|
||||||
description = "Rotate image clockwise 90deg",
|
description = "Rotate image clockwise 90deg",
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -3,9 +3,9 @@
|
||||||
<Defines count="56">
|
<Defines count="56">
|
||||||
<Define name="RAYLIB_H" type="GUARD" value="" desc="" />
|
<Define name="RAYLIB_H" type="GUARD" value="" desc="" />
|
||||||
<Define name="RAYLIB_VERSION_MAJOR" type="INT" value="4" desc="" />
|
<Define name="RAYLIB_VERSION_MAJOR" type="INT" value="4" desc="" />
|
||||||
<Define name="RAYLIB_VERSION_MINOR" type="INT" value="5" desc="" />
|
<Define name="RAYLIB_VERSION_MINOR" type="INT" value="6" desc="" />
|
||||||
<Define name="RAYLIB_VERSION_PATCH" type="INT" value="0" desc="" />
|
<Define name="RAYLIB_VERSION_PATCH" type="INT" value="0" desc="" />
|
||||||
<Define name="RAYLIB_VERSION" type="STRING" value="4.5" desc="" />
|
<Define name="RAYLIB_VERSION" type="STRING" value="4.6-dev" desc="" />
|
||||||
<Define name="__declspec(x)" type="MACRO" value="__attribute__((x))" desc="" />
|
<Define name="__declspec(x)" type="MACRO" value="__attribute__((x))" desc="" />
|
||||||
<Define name="RLAPI" type="UNKNOWN" value="__declspec(dllexport)" desc="We are building the library as a Win32 shared library (.dll)" />
|
<Define name="RLAPI" type="UNKNOWN" value="__declspec(dllexport)" desc="We are building the library as a Win32 shared library (.dll)" />
|
||||||
<Define name="PI" type="FLOAT" value="3.14159265358979323846" desc="" />
|
<Define name="PI" type="FLOAT" value="3.14159265358979323846" desc="" />
|
||||||
|
|
@ -210,11 +210,12 @@
|
||||||
<Field type="BoneInfo *" name="bones" desc="Bones information (skeleton)" />
|
<Field type="BoneInfo *" name="bones" desc="Bones information (skeleton)" />
|
||||||
<Field type="Transform *" name="bindPose" desc="Bones base transformation (pose)" />
|
<Field type="Transform *" name="bindPose" desc="Bones base transformation (pose)" />
|
||||||
</Struct>
|
</Struct>
|
||||||
<Struct name="ModelAnimation" fieldCount="4" desc="ModelAnimation">
|
<Struct name="ModelAnimation" fieldCount="5" desc="ModelAnimation">
|
||||||
<Field type="int" name="boneCount" desc="Number of bones" />
|
<Field type="int" name="boneCount" desc="Number of bones" />
|
||||||
<Field type="int" name="frameCount" desc="Number of animation frames" />
|
<Field type="int" name="frameCount" desc="Number of animation frames" />
|
||||||
<Field type="BoneInfo *" name="bones" desc="Bones information (skeleton)" />
|
<Field type="BoneInfo *" name="bones" desc="Bones information (skeleton)" />
|
||||||
<Field type="Transform **" name="framePoses" desc="Poses array by frame" />
|
<Field type="Transform **" name="framePoses" desc="Poses array by frame" />
|
||||||
|
<Field type="char[32]" name="name" desc="Animation name" />
|
||||||
</Struct>
|
</Struct>
|
||||||
<Struct name="Ray" fieldCount="2" desc="Ray, ray for raycasting">
|
<Struct name="Ray" fieldCount="2" desc="Ray, ray for raycasting">
|
||||||
<Field type="Vector3" name="position" desc="Ray position (origin)" />
|
<Field type="Vector3" name="position" desc="Ray position (origin)" />
|
||||||
|
|
@ -655,7 +656,7 @@
|
||||||
<Param type="unsigned int" name="frames" desc="" />
|
<Param type="unsigned int" name="frames" desc="" />
|
||||||
</Callback>
|
</Callback>
|
||||||
</Callbacks>
|
</Callbacks>
|
||||||
<Functions count="517">
|
<Functions count="518">
|
||||||
<Function name="InitWindow" retType="void" paramCount="3" desc="Initialize window and OpenGL context">
|
<Function name="InitWindow" retType="void" paramCount="3" desc="Initialize window and OpenGL context">
|
||||||
<Param type="int" name="width" desc="" />
|
<Param type="int" name="width" desc="" />
|
||||||
<Param type="int" name="height" desc="" />
|
<Param type="int" name="height" desc="" />
|
||||||
|
|
@ -1548,17 +1549,12 @@
|
||||||
<Param type="int" name="height" desc="" />
|
<Param type="int" name="height" desc="" />
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="GenImageGradientV" retType="Image" paramCount="4" desc="Generate image: vertical gradient">
|
<Function name="GenImageGradientLinear" retType="Image" paramCount="5" desc="Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradient">
|
||||||
<Param type="int" name="width" desc="" />
|
<Param type="int" name="width" desc="" />
|
||||||
<Param type="int" name="height" desc="" />
|
<Param type="int" name="height" desc="" />
|
||||||
<Param type="Color" name="top" desc="" />
|
<Param type="int" name="direction" desc="" />
|
||||||
<Param type="Color" name="bottom" desc="" />
|
<Param type="Color" name="start" desc="" />
|
||||||
</Function>
|
<Param type="Color" name="end" desc="" />
|
||||||
<Function name="GenImageGradientH" retType="Image" paramCount="4" desc="Generate image: horizontal gradient">
|
|
||||||
<Param type="int" name="width" desc="" />
|
|
||||||
<Param type="int" name="height" desc="" />
|
|
||||||
<Param type="Color" name="left" desc="" />
|
|
||||||
<Param type="Color" name="right" desc="" />
|
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="GenImageGradientRadial" retType="Image" paramCount="5" desc="Generate image: radial gradient">
|
<Function name="GenImageGradientRadial" retType="Image" paramCount="5" desc="Generate image: radial gradient">
|
||||||
<Param type="int" name="width" desc="" />
|
<Param type="int" name="width" desc="" />
|
||||||
|
|
@ -1567,6 +1563,13 @@
|
||||||
<Param type="Color" name="inner" desc="" />
|
<Param type="Color" name="inner" desc="" />
|
||||||
<Param type="Color" name="outer" desc="" />
|
<Param type="Color" name="outer" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="GenImageGradientSquare" retType="Image" paramCount="5" desc="Generate image: square gradient">
|
||||||
|
<Param type="int" name="width" desc="" />
|
||||||
|
<Param type="int" name="height" desc="" />
|
||||||
|
<Param type="float" name="density" desc="" />
|
||||||
|
<Param type="Color" name="inner" desc="" />
|
||||||
|
<Param type="Color" name="outer" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="GenImageChecked" retType="Image" paramCount="6" desc="Generate image: checked">
|
<Function name="GenImageChecked" retType="Image" paramCount="6" desc="Generate image: checked">
|
||||||
<Param type="int" name="width" desc="" />
|
<Param type="int" name="width" desc="" />
|
||||||
<Param type="int" name="height" desc="" />
|
<Param type="int" name="height" desc="" />
|
||||||
|
|
@ -1682,6 +1685,10 @@
|
||||||
<Function name="ImageFlipHorizontal" retType="void" paramCount="1" desc="Flip image horizontally">
|
<Function name="ImageFlipHorizontal" retType="void" paramCount="1" desc="Flip image horizontally">
|
||||||
<Param type="Image *" name="image" desc="" />
|
<Param type="Image *" name="image" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="ImageRotate" retType="void" paramCount="2" desc="Rotate image by input angle in degrees (-359 to 359) ">
|
||||||
|
<Param type="Image *" name="image" desc="" />
|
||||||
|
<Param type="int" name="degrees" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="ImageRotateCW" retType="void" paramCount="1" desc="Rotate image clockwise 90deg">
|
<Function name="ImageRotateCW" retType="void" paramCount="1" desc="Rotate image clockwise 90deg">
|
||||||
<Param type="Image *" name="image" desc="" />
|
<Param type="Image *" name="image" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,13 @@ project(example)
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
set(RAYLIB_VERSION 4.2.0)
|
set(RAYLIB_VERSION 4.5.0)
|
||||||
find_package(raylib ${RAYLIB_VERSION} QUIET) # QUIET or REQUIRED
|
find_package(raylib ${RAYLIB_VERSION} QUIET) # QUIET or REQUIRED
|
||||||
if (NOT raylib_FOUND) # If there's none, fetch and build raylib
|
if (NOT raylib_FOUND) # If there's none, fetch and build raylib
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
raylib
|
raylib
|
||||||
|
DOWNLOAD_EXTRACT_TIMESTAMP OFF
|
||||||
URL https://github.com/raysan5/raylib/archive/refs/tags/${RAYLIB_VERSION}.tar.gz
|
URL https://github.com/raysan5/raylib/archive/refs/tags/${RAYLIB_VERSION}.tar.gz
|
||||||
)
|
)
|
||||||
FetchContent_GetProperties(raylib)
|
FetchContent_GetProperties(raylib)
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,7 @@ ImageDrawText|void|(Image *dst, Vector2 position, const char *text, int fontSize
|
||||||
ImageDrawTextEx|void|(Image *dst, Vector2 position, Font font, const char *text, float fontSize, float spacing, Color color);|
|
ImageDrawTextEx|void|(Image *dst, Vector2 position, Font font, const char *text, float fontSize, float spacing, Color color);|
|
||||||
ImageFlipVertical|void|(Image *image);|
|
ImageFlipVertical|void|(Image *image);|
|
||||||
ImageFlipHorizontal|void|(Image *image);|
|
ImageFlipHorizontal|void|(Image *image);|
|
||||||
|
ImageRotate|void|(Image *image, int degrees);|
|
||||||
ImageRotateCW|void|(Image *image);|
|
ImageRotateCW|void|(Image *image);|
|
||||||
ImageRotateCCW|void|(Image *image);|
|
ImageRotateCCW|void|(Image *image);|
|
||||||
ImageColorTint|void|(Image *image, Color color);|
|
ImageColorTint|void|(Image *image, Color color);|
|
||||||
|
|
@ -211,9 +212,9 @@ ImageColorContrast|void|(Image *image, float contrast);|
|
||||||
ImageColorBrightness|void|(Image *image, int brightness);|
|
ImageColorBrightness|void|(Image *image, int brightness);|
|
||||||
ImageColorReplace|void|(Image *image, Color color, Color replace);|
|
ImageColorReplace|void|(Image *image, Color color, Color replace);|
|
||||||
GenImageColor|Image|(int width, int height, Color color);|
|
GenImageColor|Image|(int width, int height, Color color);|
|
||||||
GenImageGradientV|Image|(int width, int height, Color top, Color bottom);|
|
GenImageGradientLinear|Image|(int width, int height, int direction, Color start, Color end);|
|
||||||
GenImageGradientH|Image|(int width, int height, Color left, Color right);|
|
|
||||||
GenImageGradientRadial|Image|(int width, int height, float density, Color inner, Color outer);|
|
GenImageGradientRadial|Image|(int width, int height, float density, Color inner, Color outer);|
|
||||||
|
GenImageGradientSquare|Image|(int width, int height, float density, Color inner, Color outer);|
|
||||||
GenImageChecked|Image|(int width, int height, int checksX, int checksY, Color col1, Color col2);|
|
GenImageChecked|Image|(int width, int height, int checksX, int checksY, Color col1, Color col2);|
|
||||||
GenImageWhiteNoise|Image|(int width, int height, float factor);|
|
GenImageWhiteNoise|Image|(int width, int height, float factor);|
|
||||||
GenImagePerlinNoise|Image|(int width, int height, int offsetX, int offsetY, float scale);|
|
GenImagePerlinNoise|Image|(int width, int height, int offsetX, int offsetY, float scale);|
|
||||||
|
|
|
||||||
|
|
@ -1378,20 +1378,13 @@
|
||||||
<Param name="Color color" />
|
<Param name="Color color" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
<KeyWord name="GenImageGradientV" func="yes">
|
<KeyWord name="GenImageGradientLinear" func="yes">
|
||||||
<Overload retVal="Image" descr="Generate image: vertical gradient">
|
<Overload retVal="Image" descr="Generate image: linear gradient">
|
||||||
<Param name="int width" />
|
<Param name="int width" />
|
||||||
<Param name="int height" />
|
<Param name="int height" />
|
||||||
<Param name="Color top" />
|
<Param name="int direction" />
|
||||||
<Param name="Color bottom" />
|
<Param name="Color start" />
|
||||||
</Overload>
|
<Param name="Color end" />
|
||||||
</KeyWord>
|
|
||||||
<KeyWord name="GenImageGradientH" func="yes">
|
|
||||||
<Overload retVal="Image" descr="Generate image: horizontal gradient">
|
|
||||||
<Param name="int width" />
|
|
||||||
<Param name="int height" />
|
|
||||||
<Param name="Color left" />
|
|
||||||
<Param name="Color right" />
|
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
<KeyWord name="GenImageGradientRadial" func="yes">
|
<KeyWord name="GenImageGradientRadial" func="yes">
|
||||||
|
|
@ -1403,6 +1396,15 @@
|
||||||
<Param name="Color outer" />
|
<Param name="Color outer" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="GenImageGradientSquare" func="yes">
|
||||||
|
<Overload retVal="Image" descr="Generate image: square gradient">
|
||||||
|
<Param name="int width" />
|
||||||
|
<Param name="int height" />
|
||||||
|
<Param name="float density" />
|
||||||
|
<Param name="Color inner" />
|
||||||
|
<Param name="Color outer" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="GenImageChecked" func="yes">
|
<KeyWord name="GenImageChecked" func="yes">
|
||||||
<Overload retVal="Image" descr="Generate image: checked">
|
<Overload retVal="Image" descr="Generate image: checked">
|
||||||
<Param name="int width" />
|
<Param name="int width" />
|
||||||
|
|
@ -1568,6 +1570,12 @@
|
||||||
<Param name="Image *image" />
|
<Param name="Image *image" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="ImageRotate" func="yes">
|
||||||
|
<Overload retVal="void" descr="Rotate image by input angle in degrees (-359 to 359)">
|
||||||
|
<Param name="Image *image" />
|
||||||
|
<Param name="int degrees" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="ImageRotateCW" func="yes">
|
<KeyWord name="ImageRotateCW" func="yes">
|
||||||
<Overload retVal="void" descr="Rotate image clockwise 90deg">
|
<Overload retVal="void" descr="Rotate image clockwise 90deg">
|
||||||
<Param name="Image *image" />
|
<Param name="Image *image" />
|
||||||
|
|
|
||||||
|
|
@ -317,9 +317,9 @@ RLAPI bool ExportImageAsCode(Image image, const char *fileName);
|
||||||
|
|
||||||
// Image generation functions
|
// Image generation functions
|
||||||
RLAPI Image GenImageColor(int width, int height, Color color); // Generate image: plain color
|
RLAPI Image GenImageColor(int width, int height, Color color); // Generate image: plain color
|
||||||
RLAPI Image GenImageGradientV(int width, int height, Color top, Color bottom); // Generate image: vertical gradient
|
RLAPI Image GenImageGradientLinear(int width, int height, int direction, Color start, Color end); // Generate image: linear gradient
|
||||||
RLAPI Image GenImageGradientH(int width, int height, Color left, Color right); // Generate image: horizontal gradient
|
|
||||||
RLAPI Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); // Generate image: radial gradient
|
RLAPI Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); // Generate image: radial gradient
|
||||||
|
RLAPI Image GenImageGradientSquare(int width, int height, float density, Color inner, Color outer); // Generate image: square gradient
|
||||||
RLAPI Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2); // Generate image: checked
|
RLAPI Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2); // Generate image: checked
|
||||||
RLAPI Image GenImageWhiteNoise(int width, int height, float factor); // Generate image: white noise
|
RLAPI Image GenImageWhiteNoise(int width, int height, float factor); // Generate image: white noise
|
||||||
RLAPI Image GenImagePerlinNoise(int width, int height, int offsetX, int offsetY, float scale); // Generate image: perlin noise
|
RLAPI Image GenImagePerlinNoise(int width, int height, int offsetX, int offsetY, float scale); // Generate image: perlin noise
|
||||||
|
|
@ -346,6 +346,7 @@ RLAPI void ImageMipmaps(Image *image);
|
||||||
RLAPI void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
|
RLAPI void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
|
||||||
RLAPI void ImageFlipVertical(Image *image); // Flip image vertically
|
RLAPI void ImageFlipVertical(Image *image); // Flip image vertically
|
||||||
RLAPI void ImageFlipHorizontal(Image *image); // Flip image horizontally
|
RLAPI void ImageFlipHorizontal(Image *image); // Flip image horizontally
|
||||||
|
RLAPI void ImageRotate(Image *image, int degrees); // Rotate image by input angle in degrees (-359 to 359)
|
||||||
RLAPI void ImageRotateCW(Image *image); // Rotate image clockwise 90deg
|
RLAPI void ImageRotateCW(Image *image); // Rotate image clockwise 90deg
|
||||||
RLAPI void ImageRotateCCW(Image *image); // Rotate image counter-clockwise 90deg
|
RLAPI void ImageRotateCCW(Image *image); // Rotate image counter-clockwise 90deg
|
||||||
RLAPI void ImageColorTint(Image *image, Color color); // Modify image color: tint
|
RLAPI void ImageColorTint(Image *image, Color color); // Modify image color: tint
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
|
|
||||||
pub fn addRaylib(b: *std.build.Builder, target: std.zig.CrossTarget) *std.build.LibExeObjStep {
|
// This has been tested to work with zig master branch as of commit 87de821 or May 14 2023
|
||||||
|
pub fn addRaylib(b: *std.Build, target: std.zig.CrossTarget, optimize: std.builtin.OptimizeMode) *std.Build.CompileStep {
|
||||||
const raylib_flags = &[_][]const u8{
|
const raylib_flags = &[_][]const u8{
|
||||||
"-std=gnu99",
|
"-std=gnu99",
|
||||||
"-D_GNU_SOURCE",
|
"-D_GNU_SOURCE",
|
||||||
|
|
@ -8,7 +9,11 @@ pub fn addRaylib(b: *std.build.Builder, target: std.zig.CrossTarget) *std.build.
|
||||||
"-fno-sanitize=undefined", // https://github.com/raysan5/raylib/issues/1891
|
"-fno-sanitize=undefined", // https://github.com/raysan5/raylib/issues/1891
|
||||||
};
|
};
|
||||||
|
|
||||||
const raylib = b.addStaticLibrary("raylib", null);
|
const raylib = b.addStaticLibrary(.{
|
||||||
|
.name = "raylib",
|
||||||
|
.target = target,
|
||||||
|
.optimize = optimize,
|
||||||
|
});
|
||||||
raylib.linkLibC();
|
raylib.linkLibC();
|
||||||
|
|
||||||
raylib.addIncludePath(srcdir ++ "/external/glfw/include");
|
raylib.addIncludePath(srcdir ++ "/external/glfw/include");
|
||||||
|
|
@ -99,7 +104,7 @@ pub fn addRaylib(b: *std.build.Builder, target: std.zig.CrossTarget) *std.build.
|
||||||
return raylib;
|
return raylib;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build(b: *std.build.Builder) void {
|
pub fn build(b: *std.Build) void {
|
||||||
// Standard target options allows the person running `zig build` to choose
|
// Standard target options allows the person running `zig build` to choose
|
||||||
// what target to build for. Here we do not override the defaults, which
|
// what target to build for. Here we do not override the defaults, which
|
||||||
// means any target is allowed, and the default is native. Other options
|
// means any target is allowed, and the default is native. Other options
|
||||||
|
|
@ -108,10 +113,10 @@ pub fn build(b: *std.build.Builder) void {
|
||||||
// Standard optimization options allow the person running `zig build` to select
|
// Standard optimization options allow the person running `zig build` to select
|
||||||
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do not
|
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do not
|
||||||
// set a preferred release mode, allowing the user to decide how to optimize.
|
// set a preferred release mode, allowing the user to decide how to optimize.
|
||||||
// const optimize = b.standardReleaseOptions();
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
const lib = addRaylib(b, target);
|
const lib = addRaylib(b, target, optimize);
|
||||||
b.installFile("src/raylib.h", "raylib.h");
|
lib.installHeader("src/raylib.h", "raylib.h");
|
||||||
b.installArtifact(lib);
|
b.installArtifact(lib);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
3964
src/external/miniaudio.h
vendored
3964
src/external/miniaudio.h
vendored
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue