Merge branch 'raysan5:master' into Basic-Audio-Capture
This commit is contained in:
commit
0f4e3a2326
|
|
@ -26,6 +26,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers
|
|||
| [raylib-cr](https://github.com/sol-vin/raylib-cr) | 4.6-dev (5e1a81) | [Crystal](https://crystal-lang.org) | Apache-2.0 |
|
||||
| [ray-cyber](https://github.com/fubark/ray-cyber) | **5.0** | [Cyber](https://cyberscript.dev) | MIT |
|
||||
| [dart-raylib](https://gitlab.com/wolfenrain/dart-raylib) | 4.0 | [Dart](https://dart.dev) | MIT |
|
||||
| [raylib_dart](https://pub.dev/packages/raylib_dart) | 6.0 | [Dart](https://dart.dev) | MIT |
|
||||
| [bindbc-raylib3](https://github.com/o3o/bindbc-raylib3) | **5.0** | [D](https://dlang.org) | BSL-1.0 |
|
||||
| [dray](https://github.com/redthing1/dray) | **5.0** | [D](https://dlang.org) | Apache-2.0 |
|
||||
| [raylib-d](https://github.com/schveiguy/raylib-d) | **6.0** | [D](https://dlang.org) | Zlib |
|
||||
|
|
@ -62,7 +63,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers
|
|||
| [node-raylib](https://github.com/RobLoach/node-raylib) | 4.5 | [Node.js](https://nodejs.org/en) | Zlib |
|
||||
| [raylib-odin](https://github.com/odin-lang/Odin/tree/master/vendor/raylib) | **5.5** | [Odin](https://odin-lang.org) | Zlib |
|
||||
| [raylib_odin_bindings](https://github.com/Deathbat2190/raylib_odin_bindings) | 4.0-dev | [Odin](https://odin-lang.org) | MIT |
|
||||
| [raylib-ocaml](https://github.com/tjammer/raylib-ocaml) | **5.0** | [OCaml](https://ocaml.org) | MIT |
|
||||
| [raylib-ocaml](https://github.com/tjammer/raylib-ocaml) | **6.0** | [OCaml](https://ocaml.org) | MIT |
|
||||
| [TurboRaylib](https://github.com/turborium/TurboRaylib) | 4.5 | [Object Pascal](https://en.wikipedia.org/wiki/Object_Pascal) | MIT |
|
||||
| [Ray4Laz](https://github.com/GuvaCode/Ray4Laz) | **6.0** | [Free Pascal](https://en.wikipedia.org/wiki/Free_Pascal)/[Delphi](https://en.wikipedia.org/wiki/Delphi_(software)) | Zlib |
|
||||
| [Raylib.4.0.Pascal](https://github.com/sysrpl/Raylib.4.0.Pascal) | 4.0 | [Free Pascal](https://en.wikipedia.org/wiki/Free_Pascal) | Zlib |
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ int main(void)
|
|||
{
|
||||
// Cast a ray from the screen center (where crosshair would be)
|
||||
Vector2 screenCenter = { GetScreenWidth()/2.0f, GetScreenHeight()/2.0f };
|
||||
Ray ray = GetMouseRay(screenCenter, camera);
|
||||
Ray ray = GetScreenToWorldRay(screenCenter, camera);
|
||||
|
||||
// Check ray collision with all voxels
|
||||
float closestDistance = 99999.0f;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@ int main(void)
|
|||
Image parrots = LoadImage("resources/parrots.png"); // Load image in CPU memory (RAM)
|
||||
|
||||
// Draw one image over the other with a scaling of 1.5f
|
||||
ImageDraw(&parrots, cat, (Rectangle){ 0, 0, (float)cat.width, (float)cat.height }, (Rectangle){ 30, 40, cat.width*1.5f, cat.height*1.5f }, WHITE);
|
||||
ImageDrawImagePro(&parrots, cat, (Rectangle){ 0, 0, (float)cat.width, (float)cat.height },
|
||||
(Rectangle){ 30, 40, cat.width*1.5f, cat.height*1.5f }, (Vector2){ 0 }, 0.0f, WHITE);
|
||||
ImageCrop(&parrots, (Rectangle){ 0, 50, (float)parrots.width, (float)parrots.height - 100 }); // Crop resulting image
|
||||
|
||||
// Draw on the image with a few image draw methods
|
||||
|
|
|
|||
4340
src/external/RGFW/RGFW.h
vendored
4340
src/external/RGFW/RGFW.h
vendored
File diff suppressed because it is too large
Load Diff
|
|
@ -76,7 +76,7 @@
|
|||
|
||||
void ShowCursor(void);
|
||||
void CloseWindow(void);
|
||||
double get_time_seconds(void);
|
||||
double GetTimeSeconds(void);
|
||||
|
||||
#if defined(__unix__) || defined(__linux__)
|
||||
#define _XTYPEDEF_FONT
|
||||
|
|
@ -310,113 +310,113 @@ static PlatformData platform = { 0 }; // Platform specific
|
|||
|
||||
static const unsigned short RGFW_keyConvertTable[] = {
|
||||
[RGFW_keyNULL] = KEY_NULL,
|
||||
[RGFW_apostrophe] = KEY_APOSTROPHE,
|
||||
[RGFW_comma] = KEY_COMMA,
|
||||
[RGFW_minus] = KEY_MINUS,
|
||||
[RGFW_period] = KEY_PERIOD,
|
||||
[RGFW_slash] = KEY_SLASH,
|
||||
[RGFW_0] = KEY_ZERO,
|
||||
[RGFW_1] = KEY_ONE,
|
||||
[RGFW_2] = KEY_TWO,
|
||||
[RGFW_3] = KEY_THREE,
|
||||
[RGFW_4] = KEY_FOUR,
|
||||
[RGFW_5] = KEY_FIVE,
|
||||
[RGFW_6] = KEY_SIX,
|
||||
[RGFW_7] = KEY_SEVEN,
|
||||
[RGFW_8] = KEY_EIGHT,
|
||||
[RGFW_9] = KEY_NINE,
|
||||
[RGFW_semicolon] = KEY_SEMICOLON,
|
||||
[RGFW_equals] = KEY_EQUAL,
|
||||
[RGFW_a] = KEY_A,
|
||||
[RGFW_b] = KEY_B,
|
||||
[RGFW_c] = KEY_C,
|
||||
[RGFW_d] = KEY_D,
|
||||
[RGFW_e] = KEY_E,
|
||||
[RGFW_f] = KEY_F,
|
||||
[RGFW_g] = KEY_G,
|
||||
[RGFW_h] = KEY_H,
|
||||
[RGFW_i] = KEY_I,
|
||||
[RGFW_j] = KEY_J,
|
||||
[RGFW_k] = KEY_K,
|
||||
[RGFW_l] = KEY_L,
|
||||
[RGFW_m] = KEY_M,
|
||||
[RGFW_n] = KEY_N,
|
||||
[RGFW_o] = KEY_O,
|
||||
[RGFW_p] = KEY_P,
|
||||
[RGFW_q] = KEY_Q,
|
||||
[RGFW_r] = KEY_R,
|
||||
[RGFW_s] = KEY_S,
|
||||
[RGFW_t] = KEY_T,
|
||||
[RGFW_u] = KEY_U,
|
||||
[RGFW_v] = KEY_V,
|
||||
[RGFW_w] = KEY_W,
|
||||
[RGFW_x] = KEY_X,
|
||||
[RGFW_y] = KEY_Y,
|
||||
[RGFW_z] = KEY_Z,
|
||||
[RGFW_bracket] = KEY_LEFT_BRACKET,
|
||||
[RGFW_backSlash] = KEY_BACKSLASH,
|
||||
[RGFW_closeBracket] = KEY_RIGHT_BRACKET,
|
||||
[RGFW_backtick] = KEY_GRAVE,
|
||||
[RGFW_space] = KEY_SPACE,
|
||||
[RGFW_escape] = KEY_ESCAPE,
|
||||
[RGFW_return] = KEY_ENTER,
|
||||
[RGFW_tab] = KEY_TAB,
|
||||
[RGFW_backSpace] = KEY_BACKSPACE,
|
||||
[RGFW_insert] = KEY_INSERT,
|
||||
[RGFW_delete] = KEY_DELETE,
|
||||
[RGFW_right] = KEY_RIGHT,
|
||||
[RGFW_left] = KEY_LEFT,
|
||||
[RGFW_down] = KEY_DOWN,
|
||||
[RGFW_up] = KEY_UP,
|
||||
[RGFW_pageUp] = KEY_PAGE_UP,
|
||||
[RGFW_pageDown] = KEY_PAGE_DOWN,
|
||||
[RGFW_home] = KEY_HOME,
|
||||
[RGFW_end] = KEY_END,
|
||||
[RGFW_capsLock] = KEY_CAPS_LOCK,
|
||||
[RGFW_scrollLock] = KEY_SCROLL_LOCK,
|
||||
[RGFW_numLock] = KEY_NUM_LOCK,
|
||||
[RGFW_printScreen] = KEY_PRINT_SCREEN,
|
||||
[RGFW_pause] = KEY_PAUSE,
|
||||
[RGFW_F1] = KEY_F1,
|
||||
[RGFW_F2] = KEY_F2,
|
||||
[RGFW_F3] = KEY_F3,
|
||||
[RGFW_F4] = KEY_F4,
|
||||
[RGFW_F5] = KEY_F5,
|
||||
[RGFW_F6] = KEY_F6,
|
||||
[RGFW_F7] = KEY_F7,
|
||||
[RGFW_F8] = KEY_F8,
|
||||
[RGFW_F9] = KEY_F9,
|
||||
[RGFW_F10] = KEY_F10,
|
||||
[RGFW_F11] = KEY_F11,
|
||||
[RGFW_F12] = KEY_F12,
|
||||
[RGFW_shiftL] = KEY_LEFT_SHIFT,
|
||||
[RGFW_controlL] = KEY_LEFT_CONTROL,
|
||||
[RGFW_altL] = KEY_LEFT_ALT,
|
||||
[RGFW_superL] = KEY_LEFT_SUPER,
|
||||
[RGFW_keyApostrophe] = KEY_APOSTROPHE,
|
||||
[RGFW_keyComma] = KEY_COMMA,
|
||||
[RGFW_keyMinus] = KEY_MINUS,
|
||||
[RGFW_keyPeriod] = KEY_PERIOD,
|
||||
[RGFW_keySlash] = KEY_SLASH,
|
||||
[RGFW_key0] = KEY_ZERO,
|
||||
[RGFW_key1] = KEY_ONE,
|
||||
[RGFW_key2] = KEY_TWO,
|
||||
[RGFW_key3] = KEY_THREE,
|
||||
[RGFW_key4] = KEY_FOUR,
|
||||
[RGFW_key5] = KEY_FIVE,
|
||||
[RGFW_key6] = KEY_SIX,
|
||||
[RGFW_key7] = KEY_SEVEN,
|
||||
[RGFW_key8] = KEY_EIGHT,
|
||||
[RGFW_key9] = KEY_NINE,
|
||||
[RGFW_keySemicolon] = KEY_SEMICOLON,
|
||||
[RGFW_keyEquals] = KEY_EQUAL,
|
||||
[RGFW_keyA] = KEY_A,
|
||||
[RGFW_keyB] = KEY_B,
|
||||
[RGFW_keyC] = KEY_C,
|
||||
[RGFW_keyD] = KEY_D,
|
||||
[RGFW_keyE] = KEY_E,
|
||||
[RGFW_keyF] = KEY_F,
|
||||
[RGFW_keyG] = KEY_G,
|
||||
[RGFW_keyH] = KEY_H,
|
||||
[RGFW_keyI] = KEY_I,
|
||||
[RGFW_keyJ] = KEY_J,
|
||||
[RGFW_keyK] = KEY_K,
|
||||
[RGFW_keyL] = KEY_L,
|
||||
[RGFW_keyM] = KEY_M,
|
||||
[RGFW_keyN] = KEY_N,
|
||||
[RGFW_keyO] = KEY_O,
|
||||
[RGFW_keyP] = KEY_P,
|
||||
[RGFW_keyQ] = KEY_Q,
|
||||
[RGFW_keyR] = KEY_R,
|
||||
[RGFW_keyS] = KEY_S,
|
||||
[RGFW_keyT] = KEY_T,
|
||||
[RGFW_keyU] = KEY_U,
|
||||
[RGFW_keyV] = KEY_V,
|
||||
[RGFW_keyW] = KEY_W,
|
||||
[RGFW_keyX] = KEY_X,
|
||||
[RGFW_keyY] = KEY_Y,
|
||||
[RGFW_keyZ] = KEY_Z,
|
||||
[RGFW_keyBracket] = KEY_LEFT_BRACKET,
|
||||
[RGFW_keyBackSlash] = KEY_BACKSLASH,
|
||||
[RGFW_keyCloseBracket] = KEY_RIGHT_BRACKET,
|
||||
[RGFW_keyBacktick] = KEY_GRAVE,
|
||||
[RGFW_keySpace] = KEY_SPACE,
|
||||
[RGFW_keyEscape] = KEY_ESCAPE,
|
||||
[RGFW_keyReturn] = KEY_ENTER,
|
||||
[RGFW_keyTab] = KEY_TAB,
|
||||
[RGFW_keyBackSpace] = KEY_BACKSPACE,
|
||||
[RGFW_keyInsert] = KEY_INSERT,
|
||||
[RGFW_keyDelete] = KEY_DELETE,
|
||||
[RGFW_keyRight] = KEY_RIGHT,
|
||||
[RGFW_keyLeft] = KEY_LEFT,
|
||||
[RGFW_keyDown] = KEY_DOWN,
|
||||
[RGFW_keyUp] = KEY_UP,
|
||||
[RGFW_keyPageUp] = KEY_PAGE_UP,
|
||||
[RGFW_keyPageDown] = KEY_PAGE_DOWN,
|
||||
[RGFW_keyHome] = KEY_HOME,
|
||||
[RGFW_keyEnd] = KEY_END,
|
||||
[RGFW_keyCapsLock] = KEY_CAPS_LOCK,
|
||||
[RGFW_keyScrollLock] = KEY_SCROLL_LOCK,
|
||||
[RGFW_keyNumLock] = KEY_NUM_LOCK,
|
||||
[RGFW_keyPrintScreen] = KEY_PRINT_SCREEN,
|
||||
[RGFW_keyPause] = KEY_PAUSE,
|
||||
[RGFW_keyF1] = KEY_F1,
|
||||
[RGFW_keyF2] = KEY_F2,
|
||||
[RGFW_keyF3] = KEY_F3,
|
||||
[RGFW_keyF4] = KEY_F4,
|
||||
[RGFW_keyF5] = KEY_F5,
|
||||
[RGFW_keyF6] = KEY_F6,
|
||||
[RGFW_keyF7] = KEY_F7,
|
||||
[RGFW_keyF8] = KEY_F8,
|
||||
[RGFW_keyF9] = KEY_F9,
|
||||
[RGFW_keyF10] = KEY_F10,
|
||||
[RGFW_keyF11] = KEY_F11,
|
||||
[RGFW_keyF12] = KEY_F12,
|
||||
[RGFW_keyShiftL] = KEY_LEFT_SHIFT,
|
||||
[RGFW_keyControlL] = KEY_LEFT_CONTROL,
|
||||
[RGFW_keyAltL] = KEY_LEFT_ALT,
|
||||
[RGFW_keySuperL] = KEY_LEFT_SUPER,
|
||||
// #ifndef RGFW_MACOS
|
||||
[RGFW_shiftR] = KEY_RIGHT_SHIFT,
|
||||
[RGFW_controlR] = KEY_RIGHT_CONTROL,
|
||||
[RGFW_altR] = KEY_RIGHT_ALT,
|
||||
[RGFW_superR] = KEY_RIGHT_SUPER,
|
||||
[RGFW_keyShiftR] = KEY_RIGHT_SHIFT,
|
||||
[RGFW_keyControlR] = KEY_RIGHT_CONTROL,
|
||||
[RGFW_keyAltR] = KEY_RIGHT_ALT,
|
||||
[RGFW_keySuperR] = KEY_RIGHT_SUPER,
|
||||
// #endif
|
||||
[RGFW_menu] = KEY_KB_MENU,
|
||||
[RGFW_kp0] = KEY_KP_0,
|
||||
[RGFW_kp1] = KEY_KP_1,
|
||||
[RGFW_kp2] = KEY_KP_2,
|
||||
[RGFW_kp3] = KEY_KP_3,
|
||||
[RGFW_kp4] = KEY_KP_4,
|
||||
[RGFW_kp5] = KEY_KP_5,
|
||||
[RGFW_kp6] = KEY_KP_6,
|
||||
[RGFW_kp7] = KEY_KP_7,
|
||||
[RGFW_kp8] = KEY_KP_8,
|
||||
[RGFW_kp9] = KEY_KP_9,
|
||||
[RGFW_kpPeriod] = KEY_KP_DECIMAL,
|
||||
[RGFW_kpSlash] = KEY_KP_DIVIDE,
|
||||
[RGFW_kpMultiply] = KEY_KP_MULTIPLY,
|
||||
[RGFW_kpMinus] = KEY_KP_SUBTRACT,
|
||||
[RGFW_kpPlus] = KEY_KP_ADD,
|
||||
[RGFW_kpReturn] = KEY_KP_ENTER,
|
||||
[RGFW_kpEqual] = KEY_KP_EQUAL,
|
||||
[RGFW_keyMenu] = KEY_KB_MENU,
|
||||
[RGFW_keyPad0] = KEY_KP_0,
|
||||
[RGFW_keyPad1] = KEY_KP_1,
|
||||
[RGFW_keyPad2] = KEY_KP_2,
|
||||
[RGFW_keyPad3] = KEY_KP_3,
|
||||
[RGFW_keyPad4] = KEY_KP_4,
|
||||
[RGFW_keyPad5] = KEY_KP_5,
|
||||
[RGFW_keyPad6] = KEY_KP_6,
|
||||
[RGFW_keyPad7] = KEY_KP_7,
|
||||
[RGFW_keyPad8] = KEY_KP_8,
|
||||
[RGFW_keyPad9] = KEY_KP_9,
|
||||
[RGFW_keyPadPeriod] = KEY_KP_DECIMAL,
|
||||
[RGFW_keyPadSlash] = KEY_KP_DIVIDE,
|
||||
[RGFW_keyPadMultiply] = KEY_KP_MULTIPLY,
|
||||
[RGFW_keyPadMinus] = KEY_KP_SUBTRACT,
|
||||
[RGFW_keyPadPlus] = KEY_KP_ADD,
|
||||
[RGFW_keyPadReturn] = KEY_KP_ENTER,
|
||||
[RGFW_keyPadEqual] = KEY_KP_EQUAL,
|
||||
};
|
||||
|
||||
static int mg_buttonConvertTable[] = {
|
||||
|
|
@ -456,14 +456,297 @@ static int mg_axisConvertTable[] = {
|
|||
[MG_AXIS_HAT_DPAD_DOWN] = -1,
|
||||
};
|
||||
|
||||
static KeyboardKey ConvertScancodeToKey(u32 keycode);
|
||||
void RemapMouseToTouch(int touchAction);
|
||||
|
||||
// ---------------------------------------------------------------------------------
|
||||
// RGFW Callbacks (instead of the older polling)
|
||||
// ---------------------------------------------------------------------------------
|
||||
static void RGFW_cb_mousenotifyfunc(const RGFW_event* e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
CORE.Input.Mouse.cursorOnScreen = e->mouse.inWindow;
|
||||
}
|
||||
// static void RGFW_cb_windowclosefunc(const RGFW_event* e)
|
||||
// {
|
||||
// if (e->common.win != platform.window) return;
|
||||
|
||||
// // we don't want to close here. raylib handles it
|
||||
// // RGFW_window_setShouldClose(platform.window, true);
|
||||
// }
|
||||
static void RGFW_cb_dropfunc(const RGFW_event* e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
if (CORE.Window.dropFileCount == 0)
|
||||
{
|
||||
CORE.Window.dropFilepaths = (char **)RL_CALLOC(1024, sizeof(char *));
|
||||
|
||||
CORE.Window.dropFilepaths[CORE.Window.dropFileCount] = (char *)RL_CALLOC(MAX_FILEPATH_LENGTH, sizeof(char));
|
||||
strcpy(CORE.Window.dropFilepaths[CORE.Window.dropFileCount], e->drop.value->data);
|
||||
|
||||
CORE.Window.dropFileCount++;
|
||||
}
|
||||
else if (CORE.Window.dropFileCount < 1024)
|
||||
{
|
||||
CORE.Window.dropFilepaths[CORE.Window.dropFileCount] = (char *)RL_CALLOC(MAX_FILEPATH_LENGTH, sizeof(char));
|
||||
strcpy(CORE.Window.dropFilepaths[CORE.Window.dropFileCount], e->drop.value->data);
|
||||
|
||||
CORE.Window.dropFileCount++;
|
||||
}
|
||||
else TRACELOG(LOG_WARNING, "FILE: Maximum drag and drop files at once is limited to 1024 files!");
|
||||
}
|
||||
static void RGFW_cb_windowresizefunc(const RGFW_event* e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
CORE.Window.resizedLastFrame = true;
|
||||
|
||||
#if defined(__APPLE__)
|
||||
if (FLAG_IS_SET(CORE.Window.flags, FLAG_WINDOW_HIGHDPI))
|
||||
{
|
||||
RGFW_monitor* currentMonitor = RGFW_window_getMonitor(platform.window);
|
||||
SetupViewport(platform.window->w*currentMonitor->pixelRatio, platform.window->h*currentMonitor->pixelRatio);
|
||||
CORE.Window.screenScale = MatrixScale(currentMonitor->pixelRatio, currentMonitor->pixelRatio, 1.0f);
|
||||
|
||||
CORE.Window.screen.width = platform.window->w;
|
||||
CORE.Window.screen.height = platform.window->h;
|
||||
CORE.Window.render.width = CORE.Window.screen.width*currentMonitor->pixelRatio;
|
||||
CORE.Window.render.height = CORE.Window.screen.height*currentMonitor->pixelRatio;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetupViewport(platform.window->w, platform.window->h);
|
||||
CORE.Window.screen.width = platform.window->w;
|
||||
CORE.Window.screen.height = platform.window->h;
|
||||
CORE.Window.render.width = CORE.Window.screen.width;
|
||||
CORE.Window.render.height = CORE.Window.screen.height;
|
||||
}
|
||||
|
||||
CORE.Window.currentFbo.width = CORE.Window.render.width;
|
||||
CORE.Window.currentFbo.height = CORE.Window.render.height;
|
||||
#elif defined(PLATFORM_WEB_RGFW)
|
||||
// do nothing but prevent other behavior
|
||||
#else
|
||||
SetupViewport(platform.window->w, platform.window->h);
|
||||
|
||||
// Consider content scaling if required
|
||||
if (FLAG_IS_SET(CORE.Window.flags, FLAG_WINDOW_HIGHDPI))
|
||||
{
|
||||
Vector2 scaleDpi = GetWindowScaleDPI();
|
||||
CORE.Window.screen.width = (int)(platform.window->w/scaleDpi.x);
|
||||
CORE.Window.screen.height = (int)(platform.window->h/scaleDpi.y);
|
||||
CORE.Window.screenScale = MatrixScale(scaleDpi.x, scaleDpi.y, 1.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
CORE.Window.screen.width = platform.window->w;
|
||||
CORE.Window.screen.height = platform.window->h;
|
||||
}
|
||||
|
||||
CORE.Window.currentFbo.width = CORE.Window.screen.width;
|
||||
CORE.Window.currentFbo.height = CORE.Window.screen.height;
|
||||
#endif
|
||||
|
||||
#if defined(GRAPHICS_API_OPENGL_SOFTWARE)
|
||||
#if defined(__APPLE__)
|
||||
RGFW_monitor* currentMonitor = RGFW_window_getMonitor(platform.window);
|
||||
CORE.Window.screenScale = MatrixScale(currentMonitor->pixelRatio, currentMonitor->pixelRatio, 1.0f);
|
||||
SetupViewport(platform.window->w*currentMonitor->pixelRatio, platform.window->h*currentMonitor->pixelRatio);
|
||||
|
||||
CORE.Window.render.width = CORE.Window.screen.width*currentMonitor->pixelRatio;
|
||||
CORE.Window.render.height = CORE.Window.screen.height*currentMonitor->pixelRatio;
|
||||
CORE.Window.currentFbo.width = CORE.Window.render.width;
|
||||
CORE.Window.currentFbo.height = CORE.Window.render.height;
|
||||
#endif
|
||||
platform.surfaceWidth = CORE.Window.currentFbo.width;
|
||||
platform.surfaceHeight = CORE.Window.currentFbo.height;
|
||||
|
||||
// in software mode we dont have the viewport so we need to reverse the highdpi changes
|
||||
if (FLAG_IS_SET(CORE.Window.flags, FLAG_WINDOW_HIGHDPI))
|
||||
{
|
||||
Vector2 scaleDpi = GetWindowScaleDPI();
|
||||
platform.surfaceWidth *= scaleDpi.x;
|
||||
platform.surfaceHeight *= scaleDpi.y;
|
||||
}
|
||||
|
||||
if (platform.surfacePixels != NULL)
|
||||
{
|
||||
RL_FREE(platform.surfacePixels);
|
||||
platform.surfacePixels = RL_MALLOC(platform.surfaceWidth*platform.surfaceHeight*4);
|
||||
}
|
||||
|
||||
if (platform.surface != NULL)
|
||||
{
|
||||
RGFW_surface_free(platform.surface);
|
||||
platform.surface = RGFW_window_createSurface(platform.window, platform.surfacePixels, platform.surfaceWidth, platform.surfaceHeight, RGFW_formatBGRA8);
|
||||
swResize(platform.surfaceWidth, platform.surfaceHeight);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
static void RGFW_cb_windowmaximizefunc(const RGFW_event* e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
FLAG_SET(CORE.Window.flags, FLAG_WINDOW_MAXIMIZED); // The window was maximized
|
||||
}
|
||||
static void RGFW_cb_windowminimizefunc(const RGFW_event* e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
FLAG_SET(CORE.Window.flags, FLAG_WINDOW_MINIMIZED); // The window was iconified
|
||||
}
|
||||
static void RGFW_cb_windowrestorefunc(const RGFW_event* e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
if (RGFW_window_isMaximized(platform.window))
|
||||
FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_MAXIMIZED); // The window was restored
|
||||
if (RGFW_window_isMinimized(platform.window))
|
||||
FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_MINIMIZED); // The window was restored
|
||||
}
|
||||
static void RGFW_cb_windowmovefunc(const RGFW_event* e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
CORE.Window.position.x = platform.window->x;
|
||||
CORE.Window.position.y = platform.window->x;
|
||||
}
|
||||
static void RGFW_cb_keycharfunc(const RGFW_event* e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
// NOTE: event.text.text data comes an UTF-8 text sequence but registering codepoints (int)
|
||||
// Check if there is space available in the queue
|
||||
if (CORE.Input.Keyboard.charPressedQueueCount < MAX_CHAR_PRESSED_QUEUE)
|
||||
{
|
||||
// Add character (codepoint) to the queue
|
||||
CORE.Input.Keyboard.charPressedQueue[CORE.Input.Keyboard.charPressedQueueCount] = e->keyChar.value;
|
||||
CORE.Input.Keyboard.charPressedQueueCount++;
|
||||
}
|
||||
}
|
||||
static void RGFW_cb_scrollfunc(const RGFW_event* e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
CORE.Input.Mouse.currentWheelMove.x += e->delta.x;
|
||||
CORE.Input.Mouse.currentWheelMove.y += e->delta.y;
|
||||
}
|
||||
static void RGFW_cb_mousebuttonfunc(const RGFW_event* e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
int btn = e->button.value;
|
||||
if (btn == RGFW_mouseLeft) btn = 1;
|
||||
else if (btn == RGFW_mouseRight) btn = 2;
|
||||
else if (btn == RGFW_mouseMiddle) btn = 3;
|
||||
|
||||
// pressed or released
|
||||
if (e->button.state){
|
||||
CORE.Input.Mouse.currentButtonState[btn - 1] = 1;
|
||||
CORE.Input.Touch.currentTouchState[btn - 1] = 1;
|
||||
|
||||
// simulate touch with the mouse
|
||||
RemapMouseToTouch(1);
|
||||
} else
|
||||
{
|
||||
CORE.Input.Mouse.currentButtonState[btn - 1] = 0;
|
||||
CORE.Input.Touch.currentTouchState[btn - 1] = 0;
|
||||
|
||||
// simulate touch with the mouse
|
||||
RemapMouseToTouch(0);
|
||||
}
|
||||
}
|
||||
static void RGFW_cb_mouserawmotionfunc(const RGFW_event* e)
|
||||
{
|
||||
if (!RGFW_window_isRawMouseMode(platform.window))
|
||||
{
|
||||
// if not raw, use non-raw motion. this prevents the doubled events
|
||||
return;
|
||||
}
|
||||
|
||||
float mouseX = 0.0f;
|
||||
float mouseY = 0.0f;
|
||||
mouseX = e->delta.x;
|
||||
mouseY = e->delta.y;
|
||||
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
double canvasWidth = 0.0;
|
||||
double canvasHeight = 0.0;
|
||||
emscripten_get_element_css_size("#canvas", &canvasWidth, &canvasHeight);
|
||||
mouseX *= ((float)GetScreenWidth()/(float)canvasWidth);
|
||||
mouseY *= ((float)GetScreenHeight()/(float)canvasHeight);
|
||||
#endif
|
||||
|
||||
CORE.Input.Mouse.currentPosition.x += mouseX;
|
||||
CORE.Input.Mouse.currentPosition.y += mouseY;
|
||||
|
||||
// simulate touch with the mouse
|
||||
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
|
||||
RemapMouseToTouch(2);
|
||||
}
|
||||
static void RGFW_cb_mousemotionfunc(const RGFW_event* e)
|
||||
{
|
||||
if (RGFW_window_isRawMouseMode(platform.window))
|
||||
{
|
||||
// if raw, use raw motion. this prevents the doubled events
|
||||
return;
|
||||
}
|
||||
|
||||
float mouseX = 0.0f;
|
||||
float mouseY = 0.0f;
|
||||
mouseX = e->mouse.x;
|
||||
mouseY = e->mouse.y;
|
||||
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
double canvasWidth = 0.0;
|
||||
double canvasHeight = 0.0;
|
||||
emscripten_get_element_css_size("#canvas", &canvasWidth, &canvasHeight);
|
||||
mouseX *= ((float)GetScreenWidth()/(float)canvasWidth);
|
||||
mouseY *= ((float)GetScreenHeight()/(float)canvasHeight);
|
||||
#endif
|
||||
|
||||
CORE.Input.Mouse.currentPosition.x = mouseX;
|
||||
CORE.Input.Mouse.currentPosition.y = mouseY;
|
||||
|
||||
// simulate touch with the mouse
|
||||
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
|
||||
RemapMouseToTouch(2);
|
||||
}
|
||||
static void RGFW_cb_keyfunc(const RGFW_keyEvent* e)
|
||||
{
|
||||
if (e->win != platform.window) return;
|
||||
|
||||
KeyboardKey key = ConvertScancodeToKey(e->value);
|
||||
if (key == KEY_NULL) return;
|
||||
|
||||
// pressed or released
|
||||
if (e->state)
|
||||
{
|
||||
// If key was up, add it to the key pressed queue
|
||||
if ((CORE.Input.Keyboard.currentKeyState[key] == 0) && (CORE.Input.Keyboard.keyPressedQueueCount < MAX_KEY_PRESSED_QUEUE))
|
||||
{
|
||||
CORE.Input.Keyboard.keyPressedQueue[CORE.Input.Keyboard.keyPressedQueueCount] = key;
|
||||
CORE.Input.Keyboard.keyPressedQueueCount++;
|
||||
}
|
||||
|
||||
CORE.Input.Keyboard.currentKeyState[key] = 1;
|
||||
|
||||
if (CORE.Input.Keyboard.currentKeyState[CORE.Input.Keyboard.exitKey]) RGFW_window_setShouldClose(platform.window, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
CORE.Input.Keyboard.currentKeyState[key] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// Module Internal Functions Declaration
|
||||
//----------------------------------------------------------------------------------
|
||||
int InitPlatform(void); // Initialize platform (graphics, inputs and more)
|
||||
bool InitGraphicsDevice(void); // Initialize graphics device
|
||||
|
||||
static KeyboardKey ConvertScancodeToKey(u32 keycode);
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// Module Functions Declaration
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
@ -476,10 +759,9 @@ static KeyboardKey ConvertScancodeToKey(u32 keycode);
|
|||
// Check if application should close
|
||||
bool WindowShouldClose(void)
|
||||
{
|
||||
if (CORE.Window.shouldClose == false)
|
||||
CORE.Window.shouldClose = RGFW_window_shouldClose(platform.window);
|
||||
if (CORE.Window.shouldClose == false) CORE.Window.shouldClose = RGFW_window_shouldClose(platform.window);
|
||||
if (CORE.Window.ready) return CORE.Window.shouldClose;
|
||||
else return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Toggle fullscreen mode
|
||||
|
|
@ -1181,7 +1463,7 @@ double GetTime(void)
|
|||
{
|
||||
// CORE.Time.base is nanoseconds as integer
|
||||
double baseTime = (double)CORE.Time.base*1e-9;
|
||||
double time = get_time_seconds() - baseTime;
|
||||
double time = GetTimeSeconds() - baseTime;
|
||||
|
||||
return time;
|
||||
}
|
||||
|
|
@ -1288,9 +1570,6 @@ void PollInputEvents(void)
|
|||
// Map touch position to mouse position for convenience
|
||||
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
|
||||
|
||||
int touchAction = -1; // 0-TOUCH_ACTION_UP, 1-TOUCH_ACTION_DOWN, 2-TOUCH_ACTION_MOVE
|
||||
bool realTouch = false; // Flag to differentiate real touch gestures from mouse ones
|
||||
|
||||
// Register previous keys states
|
||||
// NOTE: Android supports up to 260 keys
|
||||
for (int i = 0; i < MAX_KEYBOARD_KEYS; i++)
|
||||
|
|
@ -1322,291 +1601,9 @@ void PollInputEvents(void)
|
|||
CORE.Time.previous = GetTime();
|
||||
}
|
||||
|
||||
RGFW_event rgfw_event;
|
||||
while (RGFW_window_checkEvent(platform.window, &rgfw_event))
|
||||
{
|
||||
// All input events can be processed after polling
|
||||
switch (rgfw_event.type)
|
||||
{
|
||||
case RGFW_mouseEnter: CORE.Input.Mouse.cursorOnScreen = true; break;
|
||||
case RGFW_mouseLeave: CORE.Input.Mouse.cursorOnScreen = false; break;
|
||||
case RGFW_quit:
|
||||
RGFW_window_setShouldClose(platform.window, true);
|
||||
return;
|
||||
case RGFW_dataDrop: // Dropped file
|
||||
{
|
||||
for (int i = 0; i < rgfw_event.drop.count; i++)
|
||||
{
|
||||
if (CORE.Window.dropFileCount == 0)
|
||||
{
|
||||
// When a new file is dropped, reserve a fixed number of slots for all possible dropped files
|
||||
// at the moment limiting the number of drops at once to 1024 files but this behaviour should probably be reviewed
|
||||
// TODO: Pointers should probably be reallocated for any new file added...
|
||||
CORE.Window.dropFilepaths = (char **)RL_CALLOC(1024, sizeof(char *));
|
||||
|
||||
CORE.Window.dropFilepaths[CORE.Window.dropFileCount] = (char *)RL_CALLOC(MAX_FILEPATH_LENGTH, sizeof(char));
|
||||
strcpy(CORE.Window.dropFilepaths[CORE.Window.dropFileCount], rgfw_event.drop.files[i]);
|
||||
|
||||
CORE.Window.dropFileCount++;
|
||||
}
|
||||
else if (CORE.Window.dropFileCount < 1024)
|
||||
{
|
||||
CORE.Window.dropFilepaths[CORE.Window.dropFileCount] = (char *)RL_CALLOC(MAX_FILEPATH_LENGTH, sizeof(char));
|
||||
strcpy(CORE.Window.dropFilepaths[CORE.Window.dropFileCount], rgfw_event.drop.files[i]);
|
||||
|
||||
CORE.Window.dropFileCount++;
|
||||
}
|
||||
else TRACELOG(LOG_WARNING, "FILE: Maximum drag and drop files at once is limited to 1024 files!");
|
||||
}
|
||||
} break;
|
||||
|
||||
// Window events are also polled (Minimized, maximized, close...)
|
||||
case RGFW_windowResized:
|
||||
{
|
||||
// set flag that the window was resized
|
||||
CORE.Window.resizedLastFrame = true;
|
||||
|
||||
#if defined(__APPLE__)
|
||||
if (FLAG_IS_SET(CORE.Window.flags, FLAG_WINDOW_HIGHDPI))
|
||||
{
|
||||
RGFW_monitor* currentMonitor = RGFW_window_getMonitor(platform.window);
|
||||
SetupViewport(platform.window->w*currentMonitor->pixelRatio, platform.window->h*currentMonitor->pixelRatio);
|
||||
CORE.Window.screenScale = MatrixScale(currentMonitor->pixelRatio, currentMonitor->pixelRatio, 1.0f);
|
||||
|
||||
CORE.Window.screen.width = platform.window->w;
|
||||
CORE.Window.screen.height = platform.window->h;
|
||||
CORE.Window.render.width = CORE.Window.screen.width*currentMonitor->pixelRatio;
|
||||
CORE.Window.render.height = CORE.Window.screen.height*currentMonitor->pixelRatio;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetupViewport(platform.window->w, platform.window->h);
|
||||
CORE.Window.screen.width = platform.window->w;
|
||||
CORE.Window.screen.height = platform.window->h;
|
||||
CORE.Window.render.width = CORE.Window.screen.width;
|
||||
CORE.Window.render.height = CORE.Window.screen.height;
|
||||
}
|
||||
|
||||
CORE.Window.currentFbo.width = CORE.Window.render.width;
|
||||
CORE.Window.currentFbo.height = CORE.Window.render.height;
|
||||
#elif defined(PLATFORM_WEB_RGFW)
|
||||
// do nothing but prevent other behavior
|
||||
#else
|
||||
SetupViewport(platform.window->w, platform.window->h);
|
||||
|
||||
// Consider content scaling if required
|
||||
if (FLAG_IS_SET(CORE.Window.flags, FLAG_WINDOW_HIGHDPI))
|
||||
{
|
||||
Vector2 scaleDpi = GetWindowScaleDPI();
|
||||
CORE.Window.screen.width = (int)(platform.window->w/scaleDpi.x);
|
||||
CORE.Window.screen.height = (int)(platform.window->h/scaleDpi.y);
|
||||
CORE.Window.screenScale = MatrixScale(scaleDpi.x, scaleDpi.y, 1.0f);
|
||||
|
||||
// Mouse scale does not seem to be needed
|
||||
//SetMouseScale(1.0f/scaleDpi.x, 1.0f/scaleDpi.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
CORE.Window.screen.width = platform.window->w;
|
||||
CORE.Window.screen.height = platform.window->h;
|
||||
}
|
||||
|
||||
CORE.Window.currentFbo.width = CORE.Window.screen.width;
|
||||
CORE.Window.currentFbo.height = CORE.Window.screen.height;
|
||||
#endif
|
||||
|
||||
#if defined(GRAPHICS_API_OPENGL_SOFTWARE)
|
||||
#if defined(__APPLE__)
|
||||
RGFW_monitor* currentMonitor = RGFW_window_getMonitor(platform.window);
|
||||
CORE.Window.screenScale = MatrixScale(currentMonitor->pixelRatio, currentMonitor->pixelRatio, 1.0f);
|
||||
SetupViewport(platform.window->w*currentMonitor->pixelRatio, platform.window->h*currentMonitor->pixelRatio);
|
||||
|
||||
CORE.Window.render.width = CORE.Window.screen.width*currentMonitor->pixelRatio;
|
||||
CORE.Window.render.height = CORE.Window.screen.height*currentMonitor->pixelRatio;
|
||||
CORE.Window.currentFbo.width = CORE.Window.render.width;
|
||||
CORE.Window.currentFbo.height = CORE.Window.render.height;
|
||||
#endif
|
||||
platform.surfaceWidth = CORE.Window.currentFbo.width;
|
||||
platform.surfaceHeight = CORE.Window.currentFbo.height;
|
||||
|
||||
// in software mode we dont have the viewport so we need to reverse the highdpi changes
|
||||
if (FLAG_IS_SET(CORE.Window.flags, FLAG_WINDOW_HIGHDPI))
|
||||
{
|
||||
Vector2 scaleDpi = GetWindowScaleDPI();
|
||||
platform.surfaceWidth *= scaleDpi.x;
|
||||
platform.surfaceHeight *= scaleDpi.y;
|
||||
}
|
||||
|
||||
if (platform.surfacePixels != NULL)
|
||||
{
|
||||
RL_FREE(platform.surfacePixels);
|
||||
platform.surfacePixels = RL_MALLOC(platform.surfaceWidth*platform.surfaceHeight*4);
|
||||
}
|
||||
|
||||
if (platform.surface != NULL)
|
||||
{
|
||||
RGFW_surface_free(platform.surface);
|
||||
platform.surface = RGFW_window_createSurface(platform.window, platform.surfacePixels, platform.surfaceWidth, platform.surfaceHeight, RGFW_formatBGRA8);
|
||||
swResize(platform.surfaceWidth, platform.surfaceHeight);
|
||||
}
|
||||
#endif
|
||||
} break;
|
||||
case RGFW_windowMaximized:
|
||||
{
|
||||
FLAG_SET(CORE.Window.flags, FLAG_WINDOW_MAXIMIZED); // The window was maximized
|
||||
} break;
|
||||
case RGFW_windowMinimized:
|
||||
{
|
||||
FLAG_SET(CORE.Window.flags, FLAG_WINDOW_MINIMIZED); // The window was iconified
|
||||
} break;
|
||||
case RGFW_windowRestored:
|
||||
{
|
||||
if (RGFW_window_isMaximized(platform.window))
|
||||
FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_MAXIMIZED); // The window was restored
|
||||
if (RGFW_window_isMinimized(platform.window))
|
||||
FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_MINIMIZED); // The window was restored
|
||||
} break;
|
||||
case RGFW_windowMoved:
|
||||
{
|
||||
CORE.Window.position.x = platform.window->x;
|
||||
CORE.Window.position.y = platform.window->x;
|
||||
} break;
|
||||
|
||||
// Keyboard events
|
||||
case RGFW_keyPressed:
|
||||
{
|
||||
KeyboardKey key = ConvertScancodeToKey(rgfw_event.key.value);
|
||||
if (key != KEY_NULL)
|
||||
{
|
||||
// If key was up, add it to the key pressed queue
|
||||
if ((CORE.Input.Keyboard.currentKeyState[key] == 0) && (CORE.Input.Keyboard.keyPressedQueueCount < MAX_KEY_PRESSED_QUEUE))
|
||||
{
|
||||
CORE.Input.Keyboard.keyPressedQueue[CORE.Input.Keyboard.keyPressedQueueCount] = key;
|
||||
CORE.Input.Keyboard.keyPressedQueueCount++;
|
||||
}
|
||||
|
||||
CORE.Input.Keyboard.currentKeyState[key] = 1;
|
||||
|
||||
if (CORE.Input.Keyboard.currentKeyState[CORE.Input.Keyboard.exitKey]) RGFW_window_setShouldClose(platform.window, true);
|
||||
}
|
||||
} break;
|
||||
case RGFW_keyReleased:
|
||||
{
|
||||
KeyboardKey key = ConvertScancodeToKey(rgfw_event.key.value);
|
||||
if (key != KEY_NULL) CORE.Input.Keyboard.currentKeyState[key] = 0;
|
||||
} break;
|
||||
|
||||
case RGFW_keyChar:
|
||||
{
|
||||
// NOTE: event.text.text data comes an UTF-8 text sequence but registering codepoints (int)
|
||||
// Check if there is space available in the queue
|
||||
if (CORE.Input.Keyboard.charPressedQueueCount < MAX_CHAR_PRESSED_QUEUE)
|
||||
{
|
||||
// Add character (codepoint) to the queue
|
||||
CORE.Input.Keyboard.charPressedQueue[CORE.Input.Keyboard.charPressedQueueCount] = rgfw_event.keyChar.value;
|
||||
CORE.Input.Keyboard.charPressedQueueCount++;
|
||||
}
|
||||
} break;
|
||||
|
||||
// Check mouse events
|
||||
case RGFW_mouseScroll:
|
||||
{
|
||||
CORE.Input.Mouse.currentWheelMove.x += rgfw_event.scroll.x;
|
||||
CORE.Input.Mouse.currentWheelMove.y += rgfw_event.scroll.y;
|
||||
} break;
|
||||
case RGFW_mouseButtonPressed:
|
||||
{
|
||||
int btn = rgfw_event.button.value;
|
||||
if (btn == RGFW_mouseLeft) btn = 1;
|
||||
else if (btn == RGFW_mouseRight) btn = 2;
|
||||
else if (btn == RGFW_mouseMiddle) btn = 3;
|
||||
|
||||
CORE.Input.Mouse.currentButtonState[btn - 1] = 1;
|
||||
CORE.Input.Touch.currentTouchState[btn - 1] = 1;
|
||||
|
||||
touchAction = 1;
|
||||
} break;
|
||||
case RGFW_mouseButtonReleased:
|
||||
{
|
||||
int btn = rgfw_event.button.value;
|
||||
if (btn == RGFW_mouseLeft) btn = 1;
|
||||
else if (btn == RGFW_mouseRight) btn = 2;
|
||||
else if (btn == RGFW_mouseMiddle) btn = 3;
|
||||
|
||||
CORE.Input.Mouse.currentButtonState[btn - 1] = 0;
|
||||
CORE.Input.Touch.currentTouchState[btn - 1] = 0;
|
||||
|
||||
touchAction = 0;
|
||||
} break;
|
||||
case RGFW_mousePosChanged:
|
||||
{
|
||||
float mouseX = 0.0f;
|
||||
float mouseY = 0.0f;
|
||||
if (RGFW_window_isCaptured(platform.window))
|
||||
{
|
||||
mouseX = (float)rgfw_event.mouse.vecX;
|
||||
mouseY = (float)rgfw_event.mouse.vecY;
|
||||
}
|
||||
else
|
||||
{
|
||||
mouseX = (float)rgfw_event.mouse.x;
|
||||
mouseY = (float)rgfw_event.mouse.y;
|
||||
}
|
||||
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
double canvasWidth = 0.0;
|
||||
double canvasHeight = 0.0;
|
||||
emscripten_get_element_css_size("#canvas", &canvasWidth, &canvasHeight);
|
||||
mouseX *= ((float)GetScreenWidth()/(float)canvasWidth);
|
||||
mouseY *= ((float)GetScreenHeight()/(float)canvasHeight);
|
||||
#endif
|
||||
if (RGFW_window_isCaptured(platform.window))
|
||||
{
|
||||
CORE.Input.Mouse.currentPosition.x += mouseX;
|
||||
CORE.Input.Mouse.currentPosition.y += mouseY;
|
||||
}
|
||||
else
|
||||
{
|
||||
CORE.Input.Mouse.currentPosition.x = mouseX;
|
||||
CORE.Input.Mouse.currentPosition.y = mouseY;
|
||||
}
|
||||
|
||||
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
|
||||
touchAction = 2;
|
||||
} break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
#if SUPPORT_GESTURES_SYSTEM
|
||||
if (touchAction > -1)
|
||||
{
|
||||
// Process mouse events as touches to be able to use mouse-gestures
|
||||
GestureEvent gestureEvent = { 0 };
|
||||
|
||||
// Register touch actions
|
||||
gestureEvent.touchAction = touchAction;
|
||||
|
||||
// Assign a pointer ID
|
||||
gestureEvent.pointId[0] = 0;
|
||||
|
||||
// Register touch points count
|
||||
gestureEvent.pointCount = 1;
|
||||
|
||||
// Register touch points position, only one point registered
|
||||
if (touchAction == 2 || realTouch) gestureEvent.position[0] = CORE.Input.Touch.position[0];
|
||||
else gestureEvent.position[0] = GetMousePosition();
|
||||
|
||||
// Normalize gestureEvent.position[0] for CORE.Window.screen.width and CORE.Window.screen.height
|
||||
gestureEvent.position[0].x /= (float)GetScreenWidth();
|
||||
gestureEvent.position[0].y /= (float)GetScreenHeight();
|
||||
|
||||
// Gesture data is sent to gestures-system for processing
|
||||
ProcessGestureEvent(gestureEvent);
|
||||
|
||||
touchAction = -1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
// using RGFW callbacks instead of polling
|
||||
RGFW_pollEvents();
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
mg_event gamepad_event;
|
||||
|
|
@ -1663,9 +1660,12 @@ void PollInputEvents(void)
|
|||
|
||||
int axisCount = 0;
|
||||
for (int i = 0; i < MG_AXIS_COUNT; i += 1) {
|
||||
if (platform.minigamepad.gamepads[gamepadIndex].axes[i].supported) {
|
||||
if (platform.minigamepad.gamepads[gamepadIndex].axes[i].supported)
|
||||
{
|
||||
axisCount += 1;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1886,6 +1886,25 @@ int InitPlatform(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
// Set callbacks
|
||||
RGFW_setEventCallback(RGFW_mouseEnter, RGFW_cb_mousenotifyfunc);
|
||||
RGFW_setEventCallback(RGFW_mouseLeave, RGFW_cb_mousenotifyfunc);
|
||||
// RGFW_setEventCallback(RGFW_windowClose, RGFW_cb_windowclosefunc); // do not close here. let raylib handle it
|
||||
RGFW_setEventCallback(RGFW_dataDrop, RGFW_cb_dropfunc);
|
||||
RGFW_setEventCallback(RGFW_windowResized, RGFW_cb_windowresizefunc);
|
||||
RGFW_setEventCallback(RGFW_windowMaximized, RGFW_cb_windowmaximizefunc);
|
||||
RGFW_setEventCallback(RGFW_windowMinimized, RGFW_cb_windowminimizefunc);
|
||||
RGFW_setEventCallback(RGFW_windowRestored, RGFW_cb_windowrestorefunc);
|
||||
RGFW_setEventCallback(RGFW_windowMoved, RGFW_cb_windowmovefunc);
|
||||
RGFW_setEventCallback(RGFW_keyChar, RGFW_cb_keycharfunc);
|
||||
RGFW_setEventCallback(RGFW_mouseScroll, RGFW_cb_scrollfunc);
|
||||
RGFW_setEventCallback(RGFW_mouseButtonPressed, RGFW_cb_mousebuttonfunc);
|
||||
RGFW_setEventCallback(RGFW_mouseButtonReleased, RGFW_cb_mousebuttonfunc);
|
||||
RGFW_setEventCallback(RGFW_mouseRawMotion, RGFW_cb_mouserawmotionfunc);
|
||||
RGFW_setEventCallback(RGFW_mouseMotion, RGFW_cb_mousemotionfunc);
|
||||
RGFW_setEventCallback(RGFW_keyPressed, (RGFW_genericFunc)RGFW_cb_keyfunc);
|
||||
RGFW_setEventCallback(RGFW_keyReleased, (RGFW_genericFunc)RGFW_cb_keyfunc);
|
||||
|
||||
TRACELOG(LOG_INFO, "DISPLAY: Device initialized successfully %s",
|
||||
FLAG_IS_SET(CORE.Window.flags, FLAG_WINDOW_HIGHDPI)? "(HighDPI)" : "");
|
||||
TRACELOG(LOG_INFO, " > Display size: %i x %i", CORE.Window.display.width, CORE.Window.display.height);
|
||||
|
|
@ -2007,8 +2026,39 @@ static KeyboardKey ConvertScancodeToKey(u32 keycode)
|
|||
return (KeyboardKey)RGFW_keyConvertTable[keycode];
|
||||
}
|
||||
|
||||
// assign mouse to touches
|
||||
// 0-TOUCH_ACTION_UP, 1-TOUCH_ACTION_DOWN, 2-TOUCH_ACTION_MOVE
|
||||
void RemapMouseToTouch(int touchAction)
|
||||
{
|
||||
#if SUPPORT_GESTURES_SYSTEM
|
||||
if (touchAction < 0) return;
|
||||
|
||||
GestureEvent gestureEvent = { 0 };
|
||||
|
||||
// Register touch actions
|
||||
gestureEvent.touchAction = touchAction;
|
||||
|
||||
// Assign a pointer ID
|
||||
gestureEvent.pointId[0] = 0;
|
||||
|
||||
// Register touch points count
|
||||
gestureEvent.pointCount = 1;
|
||||
|
||||
// Register touch points position, only one point registered
|
||||
if (touchAction == 2 /* || realTouch */) gestureEvent.position[0] = CORE.Input.Touch.position[0];
|
||||
else gestureEvent.position[0] = GetMousePosition();
|
||||
|
||||
// Normalize gestureEvent.position[0] for CORE.Window.screen.width and CORE.Window.screen.height
|
||||
gestureEvent.position[0].x /= (float)GetScreenWidth();
|
||||
gestureEvent.position[0].y /= (float)GetScreenHeight();
|
||||
|
||||
// Gesture data is sent to gestures-system for processing
|
||||
ProcessGestureEvent(gestureEvent);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Helper functions for Time
|
||||
double get_time_seconds(void)
|
||||
double GetTimeSeconds(void)
|
||||
{
|
||||
double currentTime = 0.0;
|
||||
|
||||
|
|
|
|||
|
|
@ -2034,7 +2034,7 @@ static void HandleKey(WPARAM wparam, LPARAM lparam, char state)
|
|||
{
|
||||
CORE.Input.Keyboard.currentKeyState[key] = state;
|
||||
|
||||
if ((key == KEY_ESCAPE) && (state == 1)) CORE.Window.shouldClose = true;
|
||||
if ((key == CORE.Input.Keyboard.exitKey) && (state == 1)) CORE.Window.shouldClose = true;
|
||||
}
|
||||
else TRACELOG(LOG_WARNING, "INPUT: Unknown (or currently unhandled) virtual keycode %d (0x%x)", wparam, wparam);
|
||||
|
||||
|
|
@ -2274,4 +2274,4 @@ static bool IsWglExtensionAvailable(HDC hdc, const char *extension)
|
|||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1791,7 +1791,7 @@ void UnloadMusicStream(Music music)
|
|||
else if (music.ctxType == MUSIC_AUDIO_QOA) qoaplay_close((qoaplay_desc *)music.ctxData);
|
||||
#endif
|
||||
#if SUPPORT_FILEFORMAT_FLAC
|
||||
else if (music.ctxType == MUSIC_AUDIO_FLAC) { drflac_close((drflac *)music.ctxData); drflac_free((drflac *)music.ctxData, NULL); }
|
||||
else if (music.ctxType == MUSIC_AUDIO_FLAC) drflac_close((drflac *)music.ctxData);
|
||||
#endif
|
||||
#if SUPPORT_FILEFORMAT_XM
|
||||
else if (music.ctxType == MUSIC_MODULE_XM) jar_xm_free_context((jar_xm_context_t *)music.ctxData);
|
||||
|
|
|
|||
79
src/raylib.h
79
src/raylib.h
|
|
@ -1080,7 +1080,6 @@ RLAPI void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture)
|
|||
RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM)
|
||||
|
||||
// Screen-space-related functions
|
||||
#define GetMouseRay GetScreenToWorldRay // Compatibility hack for previous raylib versions
|
||||
RLAPI Ray GetScreenToWorldRay(Vector2 position, Camera camera); // Get a ray trace from screen position (i.e mouse)
|
||||
RLAPI Ray GetScreenToWorldRayEx(Vector2 position, Camera camera, int width, int height); // Get a ray trace from screen position (i.e mouse) in a viewport
|
||||
RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Get screen space position for a 3d world space position
|
||||
|
|
@ -1280,6 +1279,26 @@ RLAPI void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color
|
|||
RLAPI void DrawLineStrip(const Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines)
|
||||
RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation
|
||||
RLAPI void DrawLineDashed(Vector2 startPos, Vector2 endPos, int dashSize, int spaceSize, Color color); // Draw a dashed line
|
||||
RLAPI void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle, counter-clockwise vertex order
|
||||
RLAPI void DrawTriangleGradient(Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors, counter-clockwise vertex/color order
|
||||
RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline, counter-clockwise vertex order
|
||||
RLAPI void DrawTriangleFan(const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
|
||||
RLAPI void DrawTriangleStrip(const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
||||
RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
|
||||
RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
|
||||
RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle
|
||||
RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters
|
||||
RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color top, Color bottom); // Draw a vertical-gradient-filled rectangle
|
||||
RLAPI void DrawRectangleGradientH(int posX, int posY, int width, int height, Color left, Color right); // Draw a horizontal-gradient-filled rectangle
|
||||
RLAPI void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rectangle with custom vertex colors, counter-clockwise color order
|
||||
RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline
|
||||
RLAPI void DrawRectangleLinesEx(Rectangle rec, float thick, Color color); // Draw rectangle outline with line thickness
|
||||
RLAPI void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges
|
||||
RLAPI void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle lines with rounded edges
|
||||
RLAPI void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, float thick, Color color); // Draw rectangle lines with rounded edges outline and line thickness
|
||||
RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon of n sides
|
||||
RLAPI void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
|
||||
RLAPI void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float thick, Color color); // Draw a polygon outline of n sides with line thickness
|
||||
RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle
|
||||
RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
|
||||
RLAPI void DrawCircleGradient(Vector2 center, float radius, Color inner, Color outer); // Draw a gradient-filled circle
|
||||
|
|
@ -1287,32 +1306,13 @@ RLAPI void DrawCircleSector(Vector2 center, float radius, float startAngle, floa
|
|||
RLAPI void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw circle sector outline
|
||||
RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
|
||||
RLAPI void DrawCircleLinesV(Vector2 center, float radius, Color color); // Draw circle outline (Vector version)
|
||||
RLAPI void DrawCircleLinesEx(Vector2 center, float radius, float thick, Color color); // Draw circle outline with line thickness
|
||||
RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse
|
||||
RLAPI void DrawEllipseV(Vector2 center, float radiusH, float radiusV, Color color); // Draw ellipse (Vector version)
|
||||
RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline
|
||||
RLAPI void DrawEllipseLinesV(Vector2 center, float radiusH, float radiusV, Color color); // Draw ellipse outline (Vector version)
|
||||
RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring
|
||||
RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring outline
|
||||
RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
|
||||
RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
|
||||
RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle
|
||||
RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters
|
||||
RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color top, Color bottom); // Draw a vertical-gradient-filled rectangle
|
||||
RLAPI void DrawRectangleGradientH(int posX, int posY, int width, int height, Color left, Color right); // Draw a horizontal-gradient-filled rectangle
|
||||
RLAPI void DrawRectangleGradientEx(Rectangle rec, Color topLeft, Color bottomLeft, Color bottomRight, Color topRight); // Draw a gradient-filled rectangle with custom vertex colors
|
||||
RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline
|
||||
RLAPI void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); // Draw rectangle outline with extended parameters
|
||||
RLAPI void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges
|
||||
RLAPI void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle lines with rounded edges
|
||||
RLAPI void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle lines with rounded edges outline
|
||||
RLAPI void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
|
||||
RLAPI void DrawTriangleGradient(Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors (vertex in counter-clockwise order!)
|
||||
RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline (vertex in counter-clockwise order!)
|
||||
RLAPI void DrawTriangleFan(const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
|
||||
RLAPI void DrawTriangleStrip(const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
||||
RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon of n sides
|
||||
RLAPI void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
|
||||
RLAPI void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); // Draw a polygon outline of n sides with extended parameters
|
||||
|
||||
// Splines drawing functions
|
||||
RLAPI void DrawSplineLinear(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points
|
||||
|
|
@ -1422,21 +1422,26 @@ RLAPI void ImageDrawPixelV(Image *dst, Vector2 position, Color color);
|
|||
RLAPI void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw line within an image
|
||||
RLAPI void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color); // Draw line within an image (Vector version)
|
||||
RLAPI void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color color); // Draw a line defining thickness within an image
|
||||
RLAPI void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color); // Draw a filled circle within an image
|
||||
RLAPI void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw a filled circle within an image (Vector version)
|
||||
RLAPI void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle outline within an image
|
||||
RLAPI void ImageDrawCircleLinesV(Image *dst, Vector2 center, int radius, Color color); // Draw circle outline within an image (Vector version)
|
||||
RLAPI void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rectangle within an image
|
||||
RLAPI void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version)
|
||||
RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
|
||||
RLAPI void ImageDrawRectangleLines(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rectangle lines within an image
|
||||
RLAPI void ImageDrawRectangleLinesEx(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image with extended parameters
|
||||
RLAPI void ImageDrawLineStrip(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a lines sequence within an image
|
||||
RLAPI void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle within an image
|
||||
RLAPI void ImageDrawTriangleGradient(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors within an image
|
||||
RLAPI void ImageDrawTriangleLines(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline within an image
|
||||
RLAPI void ImageDrawTriangleFan(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points within an image (first vertex is the center)
|
||||
RLAPI void ImageDrawTriangleStrip(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points within an image
|
||||
RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source)
|
||||
RLAPI void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rectangle within an image
|
||||
RLAPI void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version)
|
||||
RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
|
||||
RLAPI void ImageDrawRectangleLines(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rectangle lines within an image
|
||||
RLAPI void ImageDrawRectangleLinesEx(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image with line thickness
|
||||
RLAPI void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color); // Draw a filled circle within an image
|
||||
RLAPI void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw a filled circle within an image (Vector version)
|
||||
RLAPI void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle outline within an image
|
||||
RLAPI void ImageDrawCircleLinesV(Image *dst, Vector2 center, int radius, Color color); // Draw circle outline within an image (Vector version)
|
||||
RLAPI void ImageDrawCircleGradient(Image *dst, Vector2 center, float radius, Color inner, Color outer); // Draw a gradient-filled circle within an image
|
||||
|
||||
RLAPI void ImageDrawImage(Image *dst, Image src, int posX, int posY, Color tint); // Draw an image within an image
|
||||
RLAPI void ImageDrawImageRec(Image *dst, Image src, Rectangle srcRec, Vector2 position, Color tint); // Draw a part of an image defined by a rectangle within an image
|
||||
RLAPI void ImageDrawImagePro(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Vector2 origin, float rotation, Color tint); // Draw a part of an image defined by a rectangle into destination rectangle, with scaling and rotation, within an image
|
||||
RLAPI void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination)
|
||||
RLAPI void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination)
|
||||
|
||||
|
|
@ -1461,7 +1466,7 @@ RLAPI void SetTextureWrap(Texture2D texture, int wrap);
|
|||
// Texture drawing functions
|
||||
RLAPI void DrawTexture(Texture2D texture, int posX, int posY, Color tint); // Draw a Texture2D
|
||||
RLAPI void DrawTextureV(Texture2D texture, Vector2 position, Color tint); // Draw a Texture2D with position defined as Vector2
|
||||
RLAPI void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters
|
||||
RLAPI void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with rotation and scale
|
||||
RLAPI void DrawTextureRec(Texture2D texture, Rectangle rec, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle
|
||||
RLAPI void DrawTexturePro(Texture2D texture, Rectangle srcrec, Rectangle dstrec, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a source rectangle to destination rectangle, with scaling and rotation
|
||||
RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dstrec, Vector2 origin, float rotation, Color tint); // Draw a texture (or part of it) that stretches or shrinks nicely
|
||||
|
|
@ -1492,7 +1497,7 @@ RLAPI int GetPixelDataSize(int width, int height, int format); // G
|
|||
// Font loading/unloading functions
|
||||
RLAPI Font GetFontDefault(void); // Get the default Font
|
||||
RLAPI Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM)
|
||||
RLAPI Font LoadFontEx(const char *fileName, int fontSize, const int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height
|
||||
RLAPI Font LoadFontEx(const char *fileName, int fontSize, const int *codepoints, int codepointCount); // Load font from file with defined codepoints and generation size, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height
|
||||
RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
|
||||
RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, const int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
|
||||
RLAPI bool IsFontValid(Font font); // Check if font is valid (font data loaded, WARNING: GPU texture not checked)
|
||||
|
|
@ -1568,14 +1573,14 @@ RLAPI float TextToFloat(const char *text);
|
|||
RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space
|
||||
RLAPI void DrawPoint3D(Vector3 position, Color color); // Draw a point in 3D space, actually a small line
|
||||
RLAPI void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space
|
||||
RLAPI void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
|
||||
RLAPI void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color); // Draw a color-filled triangle, counter-clockwise vertex order
|
||||
RLAPI void DrawTriangleStrip3D(const Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
||||
RLAPI void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube
|
||||
RLAPI void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
|
||||
RLAPI void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); // Draw cube wires
|
||||
RLAPI void DrawCubeWiresV(Vector3 position, Vector3 size, Color color); // Draw cube wires (Vector version)
|
||||
RLAPI void DrawSphere(Vector3 centerPos, float radius, Color color); // Draw sphere
|
||||
RLAPI void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere with extended parameters
|
||||
RLAPI void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere with defined rings and slices
|
||||
RLAPI void DrawSphereWires(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere wires
|
||||
RLAPI void DrawCylinder(Vector3 position, float radiusTop, float radiusBottom, float height, int sides, Color color); // Draw a cylinder/cone
|
||||
RLAPI void DrawCylinderEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color); // Draw a cylinder with base at startPos and top at endPos
|
||||
|
|
@ -1600,9 +1605,9 @@ RLAPI BoundingBox GetModelBoundingBox(Model model);
|
|||
|
||||
// Model drawing functions
|
||||
RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set)
|
||||
RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters
|
||||
RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with custom transform
|
||||
RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set)
|
||||
RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters
|
||||
RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires with custom transform
|
||||
RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires)
|
||||
RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float scale, Color tint); // Draw a billboard texture
|
||||
RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle rec, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by rectangle
|
||||
|
|
|
|||
|
|
@ -435,7 +435,7 @@ void DrawSphere(Vector3 centerPos, float radius, Color color)
|
|||
DrawSphereEx(centerPos, radius, 16, 16, color);
|
||||
}
|
||||
|
||||
// Draw sphere with extended parameters
|
||||
// Draw sphere with defined rings and slices
|
||||
void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color)
|
||||
{
|
||||
#if 0
|
||||
|
|
@ -772,7 +772,7 @@ void DrawCylinderWiresEx(Vector3 startPos, Vector3 endPos, float startRadius, fl
|
|||
void DrawCapsule(Vector3 startPos, Vector3 endPos, float radius, int rings, int slices, Color color)
|
||||
{
|
||||
if (slices < 3) slices = 3;
|
||||
|
||||
if (rings < 1) rings = 1;
|
||||
Vector3 direction = { endPos.x - startPos.x, endPos.y - startPos.y, endPos.z - startPos.z };
|
||||
|
||||
// draw a sphere if start and end points are the same
|
||||
|
|
@ -911,7 +911,7 @@ void DrawCapsule(Vector3 startPos, Vector3 endPos, float radius, int rings, int
|
|||
void DrawCapsuleWires(Vector3 startPos, Vector3 endPos, float radius, int rings, int slices, Color color)
|
||||
{
|
||||
if (slices < 3) slices = 3;
|
||||
|
||||
if (rings < 1) rings = 1;
|
||||
Vector3 direction = { endPos.x - startPos.x, endPos.y - startPos.y, endPos.z - startPos.z };
|
||||
|
||||
// draw a sphere if start and end points are the same
|
||||
|
|
@ -1222,6 +1222,8 @@ void UnloadModel(Model model)
|
|||
// Unload animation data
|
||||
RL_FREE(model.skeleton.bones);
|
||||
RL_FREE(model.skeleton.bindPose);
|
||||
RL_FREE(model.currentPose);
|
||||
RL_FREE(model.boneMatrices);
|
||||
|
||||
TRACELOG(LOG_INFO, "MODEL: Unloaded model (and meshes) from RAM and VRAM");
|
||||
}
|
||||
|
|
@ -3916,7 +3918,7 @@ void DrawModel(Model model, Vector3 position, float scale, Color tint)
|
|||
DrawModelEx(model, position, rotationAxis, 0.0f, vScale, tint);
|
||||
}
|
||||
|
||||
// Draw a model with extended parameters
|
||||
// Draw a model with custom transform
|
||||
void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint)
|
||||
{
|
||||
// Calculate transformation matrix from function parameters
|
||||
|
|
@ -3970,7 +3972,7 @@ void DrawModelWires(Model model, Vector3 position, float scale, Color tint)
|
|||
rlDisableWireMode();
|
||||
}
|
||||
|
||||
// Draw a model wires (with texture if set) with extended parameters
|
||||
// Draw a model wires with custom transform
|
||||
void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint)
|
||||
{
|
||||
rlEnableWireMode();
|
||||
|
|
@ -6142,17 +6144,36 @@ static Model LoadGLTF(const char *fileName)
|
|||
|
||||
for (int i = 0; i < model.skeleton.boneCount; i++)
|
||||
{
|
||||
cgltf_node *node = skin.joints[i];
|
||||
cgltf_float worldTransform[16];
|
||||
cgltf_node_transform_world(node, worldTransform);
|
||||
Matrix worldMatrix = {
|
||||
worldTransform[0], worldTransform[4], worldTransform[8], worldTransform[12],
|
||||
worldTransform[1], worldTransform[5], worldTransform[9], worldTransform[13],
|
||||
worldTransform[2], worldTransform[6], worldTransform[10], worldTransform[14],
|
||||
worldTransform[3], worldTransform[7], worldTransform[11], worldTransform[15]
|
||||
};
|
||||
Matrix bindMatrix = { 0 };
|
||||
cgltf_float inverseBindTransform[16] = { 0 };
|
||||
|
||||
MatrixDecompose(worldMatrix,
|
||||
if ((skin.inverse_bind_matrices != NULL) &&
|
||||
(skin.inverse_bind_matrices->count >= skin.joints_count) &&
|
||||
cgltf_accessor_read_float(skin.inverse_bind_matrices, i, inverseBindTransform, 16))
|
||||
{
|
||||
Matrix inverseBindMatrix = {
|
||||
inverseBindTransform[0], inverseBindTransform[4], inverseBindTransform[8], inverseBindTransform[12],
|
||||
inverseBindTransform[1], inverseBindTransform[5], inverseBindTransform[9], inverseBindTransform[13],
|
||||
inverseBindTransform[2], inverseBindTransform[6], inverseBindTransform[10], inverseBindTransform[14],
|
||||
inverseBindTransform[3], inverseBindTransform[7], inverseBindTransform[11], inverseBindTransform[15]
|
||||
};
|
||||
bindMatrix = MatrixInvert(inverseBindMatrix);
|
||||
}
|
||||
else
|
||||
{
|
||||
cgltf_float worldTransform[16] = { 0 };
|
||||
cgltf_node_transform_world(skin.joints[i], worldTransform);
|
||||
|
||||
Matrix worldMatrix = {
|
||||
worldTransform[0], worldTransform[4], worldTransform[8], worldTransform[12],
|
||||
worldTransform[1], worldTransform[5], worldTransform[9], worldTransform[13],
|
||||
worldTransform[2], worldTransform[6], worldTransform[10], worldTransform[14],
|
||||
worldTransform[3], worldTransform[7], worldTransform[11], worldTransform[15]
|
||||
};
|
||||
bindMatrix = worldMatrix;
|
||||
}
|
||||
|
||||
MatrixDecompose(bindMatrix,
|
||||
&(model.skeleton.bindPose[i].translation),
|
||||
&(model.skeleton.bindPose[i].rotation),
|
||||
&(model.skeleton.bindPose[i].scale));
|
||||
|
|
|
|||
1047
src/rshapes.c
1047
src/rshapes.c
File diff suppressed because it is too large
Load Diff
10
src/rtext.c
10
src/rtext.c
|
|
@ -327,7 +327,7 @@ extern void UnloadFontDefault(void)
|
|||
defaultFont.recs = NULL;
|
||||
}
|
||||
|
||||
// Get the default font, useful to be used with extended parameters
|
||||
// Get the default font
|
||||
Font GetFontDefault()
|
||||
{
|
||||
return defaultFont;
|
||||
|
|
@ -381,9 +381,9 @@ Font LoadFont(const char *fileName)
|
|||
return font;
|
||||
}
|
||||
|
||||
// Load Font from TTF or BDF font file with generation parameters
|
||||
// NOTE: You can pass an array with desired characters, those characters should be available in the font
|
||||
// if array is NULL, default char set is selected 32..126
|
||||
// Load font from file with defined codepoints and generation size
|
||||
// NOTE: NULL for codepoints and 0 for codepointCount to load the default character set (32..126),
|
||||
// font size is provided in pixels height
|
||||
Font LoadFontEx(const char *fileName, int fontSize, const int *codepoints, int codepointCount)
|
||||
{
|
||||
Font font = { 0 };
|
||||
|
|
@ -2673,7 +2673,7 @@ static Font LoadBMFont(const char *fileName)
|
|||
{
|
||||
Rectangle srcRec = { 0.0f, 0.0f, (float)imWidth, (float)imHeight };
|
||||
Rectangle dstRec = { 0.0f, (float)imHeight*(float)i, (float)imWidth, (float)imHeight };
|
||||
ImageDraw(&fullFont, imFonts[i], srcRec, dstRec, WHITE);
|
||||
ImageDrawImagePro(&fullFont, imFonts[i], srcRec, dstRec, (Vector2){ 0 }, 0.0f, WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
314
src/rtextures.c
314
src/rtextures.c
|
|
@ -1500,7 +1500,8 @@ Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Co
|
|||
if ((codepoint != ' ') && (codepoint != '\t'))
|
||||
{
|
||||
Rectangle rec = { (float)(textOffsetX + font.glyphs[index].offsetX), (float)(textOffsetY + font.glyphs[index].offsetY), (float)font.recs[index].width, (float)font.recs[index].height };
|
||||
ImageDraw(&imText, font.glyphs[index].image, (Rectangle){ 0, 0, (float)font.glyphs[index].image.width, (float)font.glyphs[index].image.height }, rec, tint);
|
||||
ImageDrawImagePro(&imText, font.glyphs[index].image, (Rectangle){ 0, 0, (float)font.glyphs[index].image.width, (float)font.glyphs[index].image.height },
|
||||
rec, (Vector2){ 0 }, 0.0f, tint);
|
||||
}
|
||||
|
||||
if (font.glyphs[index].advanceX == 0) textOffsetX += (int)(font.recs[index].width + spacing);
|
||||
|
|
@ -3609,144 +3610,15 @@ void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color co
|
|||
}
|
||||
}
|
||||
|
||||
// Draw circle within an image
|
||||
void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color)
|
||||
// Draw a lines sequence within an image
|
||||
void ImageDrawLineStrip(Image *dst, const Vector2 *points, int pointCount, Color color)
|
||||
{
|
||||
int x = 0;
|
||||
int y = radius;
|
||||
int decesionParameter = 3 - 2*radius;
|
||||
|
||||
while (y >= x)
|
||||
for (int i = 0; i < pointCount - 1; i++)
|
||||
{
|
||||
ImageDrawRectangle(dst, centerX - x, centerY + y, x*2, 1, color);
|
||||
ImageDrawRectangle(dst, centerX - x, centerY - y, x*2, 1, color);
|
||||
ImageDrawRectangle(dst, centerX - y, centerY + x, y*2, 1, color);
|
||||
ImageDrawRectangle(dst, centerX - y, centerY - x, y*2, 1, color);
|
||||
x++;
|
||||
|
||||
if (decesionParameter > 0)
|
||||
{
|
||||
y--;
|
||||
decesionParameter = decesionParameter + 4*(x - y) + 10;
|
||||
}
|
||||
else decesionParameter = decesionParameter + 4*x + 6;
|
||||
ImageDrawLineV(dst, points[i], points[i + 1], color);
|
||||
}
|
||||
}
|
||||
|
||||
// Draw circle within an image (Vector version)
|
||||
void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color)
|
||||
{
|
||||
ImageDrawCircle(dst, (int)center.x, (int)center.y, radius, color);
|
||||
}
|
||||
|
||||
// Draw circle outline within an image
|
||||
void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color)
|
||||
{
|
||||
int x = 0;
|
||||
int y = radius;
|
||||
int decesionParameter = 3 - 2*radius;
|
||||
|
||||
while (y >= x)
|
||||
{
|
||||
ImageDrawPixel(dst, centerX + x, centerY + y, color);
|
||||
ImageDrawPixel(dst, centerX - x, centerY + y, color);
|
||||
ImageDrawPixel(dst, centerX + x, centerY - y, color);
|
||||
ImageDrawPixel(dst, centerX - x, centerY - y, color);
|
||||
ImageDrawPixel(dst, centerX + y, centerY + x, color);
|
||||
ImageDrawPixel(dst, centerX - y, centerY + x, color);
|
||||
ImageDrawPixel(dst, centerX + y, centerY - x, color);
|
||||
ImageDrawPixel(dst, centerX - y, centerY - x, color);
|
||||
x++;
|
||||
|
||||
if (decesionParameter > 0)
|
||||
{
|
||||
y--;
|
||||
decesionParameter = decesionParameter + 4*(x - y) + 10;
|
||||
}
|
||||
else decesionParameter = decesionParameter + 4*x + 6;
|
||||
}
|
||||
}
|
||||
|
||||
// Draw circle outline within an image (Vector version)
|
||||
void ImageDrawCircleLinesV(Image *dst, Vector2 center, int radius, Color color)
|
||||
{
|
||||
ImageDrawCircleLines(dst, (int)center.x, (int)center.y, radius, color);
|
||||
}
|
||||
|
||||
// Draw rectangle within an image
|
||||
void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color)
|
||||
{
|
||||
ImageDrawRectangleRec(dst, (Rectangle){ (float)posX, (float)posY, (float)width, (float)height }, color);
|
||||
}
|
||||
|
||||
// Draw rectangle within an image (Vector version)
|
||||
void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color)
|
||||
{
|
||||
ImageDrawRectangle(dst, (int)position.x, (int)position.y, (int)size.x, (int)size.y, color);
|
||||
}
|
||||
|
||||
// Draw rectangle within an image
|
||||
void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color)
|
||||
{
|
||||
// Security check to avoid program crash
|
||||
if ((dst->data == NULL) || (dst->width == 0) || (dst->height == 0)) return;
|
||||
|
||||
// Security check to avoid drawing out of bounds in case of bad user data
|
||||
if (rec.x < 0) { rec.width += rec.x; rec.x = 0; }
|
||||
if (rec.y < 0) { rec.height += rec.y; rec.y = 0; }
|
||||
if (rec.width < 0) rec.width = 0;
|
||||
if (rec.height < 0) rec.height = 0;
|
||||
|
||||
// Clamp the size the the image bounds
|
||||
if ((rec.x + rec.width) >= dst->width) rec.width = dst->width - rec.x;
|
||||
if ((rec.y + rec.height) >= dst->height) rec.height = dst->height - rec.y;
|
||||
|
||||
// Check if the rect is even inside the image
|
||||
if ((rec.x >= dst->width) || (rec.y >= dst->height)) return;
|
||||
if (((rec.x + rec.width) <= 0) || (rec.y + rec.height <= 0)) return;
|
||||
|
||||
int sy = (int)rec.y;
|
||||
int sx = (int)rec.x;
|
||||
|
||||
int bytesPerPixel = GetPixelDataSize(1, 1, dst->format);
|
||||
|
||||
// Fill in the first pixel of the first row based on image format
|
||||
ImageDrawPixel(dst, sx, sy, color);
|
||||
|
||||
int bytesOffset = ((sy*dst->width) + sx)*bytesPerPixel;
|
||||
unsigned char *pSrcPixel = (unsigned char *)dst->data + bytesOffset;
|
||||
|
||||
// Repeat the first pixel data throughout the row
|
||||
for (int x = 1; x < (int)rec.width; x *= 2)
|
||||
{
|
||||
int pixelsToCopy = MIN(x, (int)rec.width - x);
|
||||
memcpy(pSrcPixel + x*bytesPerPixel, pSrcPixel, pixelsToCopy*bytesPerPixel);
|
||||
}
|
||||
|
||||
// Repeat the first row data for all other rows
|
||||
int bytesPerRow = bytesPerPixel*(int)rec.width;
|
||||
for (int y = 1; y < (int)rec.height; y++)
|
||||
{
|
||||
memcpy(pSrcPixel + (y*dst->width)*bytesPerPixel, pSrcPixel, bytesPerRow);
|
||||
}
|
||||
}
|
||||
|
||||
// Draw rectangle lines within an image
|
||||
void ImageDrawRectangleLines(Image *dst, int posX, int posY, int width, int height, Color color)
|
||||
{
|
||||
Rectangle rec = { posX, posY, width, height };
|
||||
ImageDrawRectangleLinesEx(dst, rec, 1, color);
|
||||
}
|
||||
|
||||
// Draw rectangle lines within an image with extended parameters
|
||||
void ImageDrawRectangleLinesEx(Image *dst, Rectangle rec, int thick, Color color)
|
||||
{
|
||||
ImageDrawRectangle(dst, (int)rec.x, (int)rec.y, (int)rec.width, thick, color);
|
||||
ImageDrawRectangle(dst, (int)rec.x, (int)(rec.y + thick), thick, (int)(rec.height - thick*2), color);
|
||||
ImageDrawRectangle(dst, (int)(rec.x + rec.width - thick), (int)(rec.y + thick), thick, (int)(rec.height - thick*2), color);
|
||||
ImageDrawRectangle(dst, (int)rec.x, (int)(rec.y + rec.height - thick), (int)rec.width, thick, color);
|
||||
}
|
||||
|
||||
// Draw triangle within an image
|
||||
void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color)
|
||||
{
|
||||
|
|
@ -3932,9 +3804,169 @@ void ImageDrawTriangleStrip(Image *dst, const Vector2 *points, int pointCount, C
|
|||
}
|
||||
}
|
||||
|
||||
// Draw an image (source) within an image (destination)
|
||||
// Draw rectangle within an image
|
||||
void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color)
|
||||
{
|
||||
ImageDrawRectangleRec(dst, (Rectangle){ (float)posX, (float)posY, (float)width, (float)height }, color);
|
||||
}
|
||||
|
||||
// Draw rectangle within an image (Vector version)
|
||||
void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color)
|
||||
{
|
||||
ImageDrawRectangle(dst, (int)position.x, (int)position.y, (int)size.x, (int)size.y, color);
|
||||
}
|
||||
|
||||
// Draw rectangle within an image
|
||||
void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color)
|
||||
{
|
||||
// Security check to avoid program crash
|
||||
if ((dst->data == NULL) || (dst->width == 0) || (dst->height == 0)) return;
|
||||
|
||||
// Security check to avoid drawing out of bounds in case of bad user data
|
||||
if (rec.x < 0) { rec.width += rec.x; rec.x = 0; }
|
||||
if (rec.y < 0) { rec.height += rec.y; rec.y = 0; }
|
||||
if (rec.width < 0) rec.width = 0;
|
||||
if (rec.height < 0) rec.height = 0;
|
||||
|
||||
// Clamp the size the the image bounds
|
||||
if ((rec.x + rec.width) >= dst->width) rec.width = dst->width - rec.x;
|
||||
if ((rec.y + rec.height) >= dst->height) rec.height = dst->height - rec.y;
|
||||
|
||||
// Check if the rect is even inside the image
|
||||
if ((rec.x >= dst->width) || (rec.y >= dst->height)) return;
|
||||
if (((rec.x + rec.width) <= 0) || (rec.y + rec.height <= 0)) return;
|
||||
|
||||
int sy = (int)rec.y;
|
||||
int sx = (int)rec.x;
|
||||
|
||||
int bytesPerPixel = GetPixelDataSize(1, 1, dst->format);
|
||||
|
||||
// Fill in the first pixel of the first row based on image format
|
||||
ImageDrawPixel(dst, sx, sy, color);
|
||||
|
||||
int bytesOffset = ((sy*dst->width) + sx)*bytesPerPixel;
|
||||
unsigned char *pSrcPixel = (unsigned char *)dst->data + bytesOffset;
|
||||
|
||||
// Repeat the first pixel data throughout the row
|
||||
for (int x = 1; x < (int)rec.width; x *= 2)
|
||||
{
|
||||
int pixelsToCopy = MIN(x, (int)rec.width - x);
|
||||
memcpy(pSrcPixel + x*bytesPerPixel, pSrcPixel, pixelsToCopy*bytesPerPixel);
|
||||
}
|
||||
|
||||
// Repeat the first row data for all other rows
|
||||
int bytesPerRow = bytesPerPixel*(int)rec.width;
|
||||
for (int y = 1; y < (int)rec.height; y++)
|
||||
{
|
||||
memcpy(pSrcPixel + (y*dst->width)*bytesPerPixel, pSrcPixel, bytesPerRow);
|
||||
}
|
||||
}
|
||||
|
||||
// Draw rectangle lines within an image
|
||||
void ImageDrawRectangleLines(Image *dst, int posX, int posY, int width, int height, Color color)
|
||||
{
|
||||
Rectangle rec = { posX, posY, width, height };
|
||||
ImageDrawRectangleLinesEx(dst, rec, 1, color);
|
||||
}
|
||||
|
||||
// Draw rectangle lines within an image with line thickness
|
||||
void ImageDrawRectangleLinesEx(Image *dst, Rectangle rec, int thick, Color color)
|
||||
{
|
||||
ImageDrawRectangle(dst, (int)rec.x, (int)rec.y, (int)rec.width, thick, color);
|
||||
ImageDrawRectangle(dst, (int)rec.x, (int)(rec.y + thick), thick, (int)(rec.height - thick*2), color);
|
||||
ImageDrawRectangle(dst, (int)(rec.x + rec.width - thick), (int)(rec.y + thick), thick, (int)(rec.height - thick*2), color);
|
||||
ImageDrawRectangle(dst, (int)rec.x, (int)(rec.y + rec.height - thick), (int)rec.width, thick, color);
|
||||
}
|
||||
|
||||
// Draw circle within an image
|
||||
void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color)
|
||||
{
|
||||
int x = 0;
|
||||
int y = radius;
|
||||
int decesionParameter = 3 - 2*radius;
|
||||
|
||||
while (y >= x)
|
||||
{
|
||||
ImageDrawRectangle(dst, centerX - x, centerY + y, x*2, 1, color);
|
||||
ImageDrawRectangle(dst, centerX - x, centerY - y, x*2, 1, color);
|
||||
ImageDrawRectangle(dst, centerX - y, centerY + x, y*2, 1, color);
|
||||
ImageDrawRectangle(dst, centerX - y, centerY - x, y*2, 1, color);
|
||||
x++;
|
||||
|
||||
if (decesionParameter > 0)
|
||||
{
|
||||
y--;
|
||||
decesionParameter = decesionParameter + 4*(x - y) + 10;
|
||||
}
|
||||
else decesionParameter = decesionParameter + 4*x + 6;
|
||||
}
|
||||
}
|
||||
|
||||
// Draw circle within an image (Vector version)
|
||||
void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color)
|
||||
{
|
||||
ImageDrawCircle(dst, (int)center.x, (int)center.y, radius, color);
|
||||
}
|
||||
|
||||
// Draw circle outline within an image
|
||||
void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color)
|
||||
{
|
||||
int x = 0;
|
||||
int y = radius;
|
||||
int decesionParameter = 3 - 2*radius;
|
||||
|
||||
while (y >= x)
|
||||
{
|
||||
ImageDrawPixel(dst, centerX + x, centerY + y, color);
|
||||
ImageDrawPixel(dst, centerX - x, centerY + y, color);
|
||||
ImageDrawPixel(dst, centerX + x, centerY - y, color);
|
||||
ImageDrawPixel(dst, centerX - x, centerY - y, color);
|
||||
ImageDrawPixel(dst, centerX + y, centerY + x, color);
|
||||
ImageDrawPixel(dst, centerX - y, centerY + x, color);
|
||||
ImageDrawPixel(dst, centerX + y, centerY - x, color);
|
||||
ImageDrawPixel(dst, centerX - y, centerY - x, color);
|
||||
x++;
|
||||
|
||||
if (decesionParameter > 0)
|
||||
{
|
||||
y--;
|
||||
decesionParameter = decesionParameter + 4*(x - y) + 10;
|
||||
}
|
||||
else decesionParameter = decesionParameter + 4*x + 6;
|
||||
}
|
||||
}
|
||||
|
||||
// Draw circle outline within an image (Vector version)
|
||||
void ImageDrawCircleLinesV(Image *dst, Vector2 center, int radius, Color color)
|
||||
{
|
||||
ImageDrawCircleLines(dst, (int)center.x, (int)center.y, radius, color);
|
||||
}
|
||||
|
||||
// Draw a gradient-filled circle within an image
|
||||
void ImageDrawCircleGradient(Image *dst, Vector2 center, float radius, Color inner, Color outer)
|
||||
{
|
||||
// TODO: Implement gradient circle drawing
|
||||
}
|
||||
|
||||
// Draw an image within an image
|
||||
void ImageDrawImage(Image *dst, Image src, int posX, int posY, Color tint)
|
||||
{
|
||||
Rectangle srcRec = { 0, 0, src.width, src.height };
|
||||
Rectangle dstRec = { posX, posY, srcRec.width, srcRec.height };
|
||||
ImageDrawImagePro(dst, src, srcRec, dstRec, (Vector2){ 0 }, 0.0f, tint);
|
||||
}
|
||||
|
||||
// Draw a part of an image defined by a rectangle within an image
|
||||
void ImageDrawImageRec(Image *dst, Image src, Rectangle srcRec, Vector2 position, Color tint)
|
||||
{
|
||||
Rectangle dstRec = { position.x, position.y, srcRec.width, srcRec.height };
|
||||
ImageDrawImagePro(dst, src, srcRec, dstRec, (Vector2){ 0 }, 0.0f, tint);
|
||||
}
|
||||
|
||||
// Draw a part of an image defined by a rectangle into destination rectangle, with scaling and rotation, within an image
|
||||
// NOTE: Color tint is applied to source image
|
||||
void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint)
|
||||
// TODO: WARNING: origin and rotation are not implemented
|
||||
void ImageDrawImagePro(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Vector2 origin, float rotation, Color tint)
|
||||
{
|
||||
// Security check to avoid program crash
|
||||
if ((dst->data == NULL) || (dst->width == 0) || (dst->height == 0) ||
|
||||
|
|
@ -3995,7 +4027,7 @@ void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color
|
|||
// [x] Consider fast path: no alpha blending required cases (src has no alpha)
|
||||
// [x] Consider fast path: same src/dst format with no alpha -> direct line copy
|
||||
// [-] GetPixelColor(): Get Vector4 instead of Color, easier for ColorAlphaBlend()
|
||||
// [ ] TODO: Support 16bit and 32bit (float) channels drawing
|
||||
// [-] Support 16bit and 32bit (float) channels drawing
|
||||
|
||||
Color colSrc = { 0 };
|
||||
Color colDst = { 0 };
|
||||
|
|
@ -4079,7 +4111,7 @@ void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color
|
|||
mipmapDstRec.x /= 2;
|
||||
mipmapDstRec.y /= 2;
|
||||
|
||||
ImageDraw(&mipmapDst, mipmapSrc, mipmapSrcRec, mipmapDstRec, tint);
|
||||
ImageDrawImagePro(&mipmapDst, mipmapSrc, mipmapSrcRec, mipmapDstRec, (Vector2){ 0 }, 0.0f, tint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4106,7 +4138,7 @@ void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position,
|
|||
Rectangle srcRec = { 0.0f, 0.0f, (float)imText.width, (float)imText.height };
|
||||
Rectangle dstRec = { position.x, position.y, (float)imText.width, (float)imText.height };
|
||||
|
||||
ImageDraw(dst, imText, srcRec, dstRec, WHITE);
|
||||
ImageDrawImagePro(dst, imText, srcRec, dstRec, (Vector2){ 0 }, 0.0f, WHITE);
|
||||
|
||||
UnloadImage(imText);
|
||||
}
|
||||
|
|
@ -4232,7 +4264,7 @@ TextureCubemap LoadTextureCubemap(Image image, int layout)
|
|||
ImageMipmaps(&faces);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 6; i++) ImageDraw(&faces, mipmapped, faceRecs[i], (Rectangle){ 0, (float)size*i, (float)size, (float)size }, WHITE);
|
||||
for (int i = 0; i < 6; i++) ImageDrawImagePro(&faces, mipmapped, faceRecs[i], (Rectangle){ 0, (float)size*i, (float)size, (float)size }, (Vector2){ 0 }, 0.0f, WHITE);
|
||||
|
||||
UnloadImage(mipmapped);
|
||||
}
|
||||
|
|
@ -4488,7 +4520,7 @@ void DrawTextureV(Texture2D texture, Vector2 position, Color tint)
|
|||
DrawTextureEx(texture, position, 0, 1.0f, tint);
|
||||
}
|
||||
|
||||
// Draw a texture with extended parameters
|
||||
// Draw a texture with rotation and scale
|
||||
void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint)
|
||||
{
|
||||
Rectangle srcrec = { 0.0f, 0.0f, (float)texture.width, (float)texture.height };
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -335,12 +335,6 @@ return {
|
|||
type = "UNKNOWN",
|
||||
value = "SHADER_LOC_MAP_METALNESS",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
name = "GetMouseRay",
|
||||
type = "UNKNOWN",
|
||||
value = "GetScreenToWorldRay",
|
||||
description = "Compatibility hack for previous raylib versions"
|
||||
}
|
||||
},
|
||||
structs = {
|
||||
|
|
@ -4850,6 +4844,234 @@ return {
|
|||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawTriangle",
|
||||
description = "Draw a color-filled triangle, counter-clockwise vertex order",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2", name = "v1"},
|
||||
{type = "Vector2", name = "v2"},
|
||||
{type = "Vector2", name = "v3"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawTriangleGradient",
|
||||
description = "Draw triangle with interpolated colors, counter-clockwise vertex/color order",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2", name = "v1"},
|
||||
{type = "Vector2", name = "v2"},
|
||||
{type = "Vector2", name = "v3"},
|
||||
{type = "Color", name = "c1"},
|
||||
{type = "Color", name = "c2"},
|
||||
{type = "Color", name = "c3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawTriangleLines",
|
||||
description = "Draw triangle outline, counter-clockwise vertex order",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2", name = "v1"},
|
||||
{type = "Vector2", name = "v2"},
|
||||
{type = "Vector2", name = "v3"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawTriangleFan",
|
||||
description = "Draw a triangle fan defined by points (first vertex is the center)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "const Vector2 *", name = "points"},
|
||||
{type = "int", name = "pointCount"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawTriangleStrip",
|
||||
description = "Draw a triangle strip defined by points",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "const Vector2 *", name = "points"},
|
||||
{type = "int", name = "pointCount"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangle",
|
||||
description = "Draw a color-filled rectangle",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "int", name = "posX"},
|
||||
{type = "int", name = "posY"},
|
||||
{type = "int", name = "width"},
|
||||
{type = "int", name = "height"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleV",
|
||||
description = "Draw a color-filled rectangle (Vector version)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2", name = "position"},
|
||||
{type = "Vector2", name = "size"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleRec",
|
||||
description = "Draw a color-filled rectangle",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectanglePro",
|
||||
description = "Draw a color-filled rectangle with pro parameters",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "Vector2", name = "origin"},
|
||||
{type = "float", name = "rotation"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleGradientV",
|
||||
description = "Draw a vertical-gradient-filled rectangle",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "int", name = "posX"},
|
||||
{type = "int", name = "posY"},
|
||||
{type = "int", name = "width"},
|
||||
{type = "int", name = "height"},
|
||||
{type = "Color", name = "top"},
|
||||
{type = "Color", name = "bottom"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleGradientH",
|
||||
description = "Draw a horizontal-gradient-filled rectangle",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "int", name = "posX"},
|
||||
{type = "int", name = "posY"},
|
||||
{type = "int", name = "width"},
|
||||
{type = "int", name = "height"},
|
||||
{type = "Color", name = "left"},
|
||||
{type = "Color", name = "right"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleGradientEx",
|
||||
description = "Draw a gradient-filled rectangle with custom vertex colors, counter-clockwise color order",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "Color", name = "col1"},
|
||||
{type = "Color", name = "col2"},
|
||||
{type = "Color", name = "col3"},
|
||||
{type = "Color", name = "col4"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleLines",
|
||||
description = "Draw rectangle outline",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "int", name = "posX"},
|
||||
{type = "int", name = "posY"},
|
||||
{type = "int", name = "width"},
|
||||
{type = "int", name = "height"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleLinesEx",
|
||||
description = "Draw rectangle outline with line thickness",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "float", name = "thick"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleRounded",
|
||||
description = "Draw rectangle with rounded edges",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "float", name = "roundness"},
|
||||
{type = "int", name = "segments"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleRoundedLines",
|
||||
description = "Draw rectangle lines with rounded edges",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "float", name = "roundness"},
|
||||
{type = "int", name = "segments"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleRoundedLinesEx",
|
||||
description = "Draw rectangle lines with rounded edges outline and line thickness",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "float", name = "roundness"},
|
||||
{type = "int", name = "segments"},
|
||||
{type = "float", name = "thick"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawPoly",
|
||||
description = "Draw a polygon of n sides",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2", name = "center"},
|
||||
{type = "int", name = "sides"},
|
||||
{type = "float", name = "radius"},
|
||||
{type = "float", name = "rotation"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawPolyLines",
|
||||
description = "Draw a polygon outline of n sides",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2", name = "center"},
|
||||
{type = "int", name = "sides"},
|
||||
{type = "float", name = "radius"},
|
||||
{type = "float", name = "rotation"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawPolyLinesEx",
|
||||
description = "Draw a polygon outline of n sides with line thickness",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2", name = "center"},
|
||||
{type = "int", name = "sides"},
|
||||
{type = "float", name = "radius"},
|
||||
{type = "float", name = "rotation"},
|
||||
{type = "float", name = "thick"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawCircle",
|
||||
description = "Draw a color-filled circle",
|
||||
|
|
@ -4929,6 +5151,17 @@ return {
|
|||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawCircleLinesEx",
|
||||
description = "Draw circle outline with line thickness",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2", name = "center"},
|
||||
{type = "float", name = "radius"},
|
||||
{type = "float", name = "thick"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawEllipse",
|
||||
description = "Draw ellipse",
|
||||
|
|
@ -5003,234 +5236,6 @@ return {
|
|||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangle",
|
||||
description = "Draw a color-filled rectangle",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "int", name = "posX"},
|
||||
{type = "int", name = "posY"},
|
||||
{type = "int", name = "width"},
|
||||
{type = "int", name = "height"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleV",
|
||||
description = "Draw a color-filled rectangle (Vector version)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2", name = "position"},
|
||||
{type = "Vector2", name = "size"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleRec",
|
||||
description = "Draw a color-filled rectangle",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectanglePro",
|
||||
description = "Draw a color-filled rectangle with pro parameters",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "Vector2", name = "origin"},
|
||||
{type = "float", name = "rotation"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleGradientV",
|
||||
description = "Draw a vertical-gradient-filled rectangle",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "int", name = "posX"},
|
||||
{type = "int", name = "posY"},
|
||||
{type = "int", name = "width"},
|
||||
{type = "int", name = "height"},
|
||||
{type = "Color", name = "top"},
|
||||
{type = "Color", name = "bottom"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleGradientH",
|
||||
description = "Draw a horizontal-gradient-filled rectangle",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "int", name = "posX"},
|
||||
{type = "int", name = "posY"},
|
||||
{type = "int", name = "width"},
|
||||
{type = "int", name = "height"},
|
||||
{type = "Color", name = "left"},
|
||||
{type = "Color", name = "right"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleGradientEx",
|
||||
description = "Draw a gradient-filled rectangle with custom vertex colors",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "Color", name = "topLeft"},
|
||||
{type = "Color", name = "bottomLeft"},
|
||||
{type = "Color", name = "bottomRight"},
|
||||
{type = "Color", name = "topRight"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleLines",
|
||||
description = "Draw rectangle outline",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "int", name = "posX"},
|
||||
{type = "int", name = "posY"},
|
||||
{type = "int", name = "width"},
|
||||
{type = "int", name = "height"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleLinesEx",
|
||||
description = "Draw rectangle outline with extended parameters",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "float", name = "lineThick"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleRounded",
|
||||
description = "Draw rectangle with rounded edges",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "float", name = "roundness"},
|
||||
{type = "int", name = "segments"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleRoundedLines",
|
||||
description = "Draw rectangle lines with rounded edges",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "float", name = "roundness"},
|
||||
{type = "int", name = "segments"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleRoundedLinesEx",
|
||||
description = "Draw rectangle lines with rounded edges outline",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "float", name = "roundness"},
|
||||
{type = "int", name = "segments"},
|
||||
{type = "float", name = "lineThick"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawTriangle",
|
||||
description = "Draw a color-filled triangle (vertex in counter-clockwise order!)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2", name = "v1"},
|
||||
{type = "Vector2", name = "v2"},
|
||||
{type = "Vector2", name = "v3"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawTriangleGradient",
|
||||
description = "Draw triangle with interpolated colors (vertex in counter-clockwise order!)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2", name = "v1"},
|
||||
{type = "Vector2", name = "v2"},
|
||||
{type = "Vector2", name = "v3"},
|
||||
{type = "Color", name = "c1"},
|
||||
{type = "Color", name = "c2"},
|
||||
{type = "Color", name = "c3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawTriangleLines",
|
||||
description = "Draw triangle outline (vertex in counter-clockwise order!)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2", name = "v1"},
|
||||
{type = "Vector2", name = "v2"},
|
||||
{type = "Vector2", name = "v3"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawTriangleFan",
|
||||
description = "Draw a triangle fan defined by points (first vertex is the center)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "const Vector2 *", name = "points"},
|
||||
{type = "int", name = "pointCount"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawTriangleStrip",
|
||||
description = "Draw a triangle strip defined by points",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "const Vector2 *", name = "points"},
|
||||
{type = "int", name = "pointCount"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawPoly",
|
||||
description = "Draw a polygon of n sides",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2", name = "center"},
|
||||
{type = "int", name = "sides"},
|
||||
{type = "float", name = "radius"},
|
||||
{type = "float", name = "rotation"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawPolyLines",
|
||||
description = "Draw a polygon outline of n sides",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2", name = "center"},
|
||||
{type = "int", name = "sides"},
|
||||
{type = "float", name = "radius"},
|
||||
{type = "float", name = "rotation"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawPolyLinesEx",
|
||||
description = "Draw a polygon outline of n sides with extended parameters",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2", name = "center"},
|
||||
{type = "int", name = "sides"},
|
||||
{type = "float", name = "radius"},
|
||||
{type = "float", name = "rotation"},
|
||||
{type = "float", name = "lineThick"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawSplineLinear",
|
||||
description = "Draw spline: Linear, minimum 2 points",
|
||||
|
|
@ -6123,106 +6128,13 @@ return {
|
|||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawCircle",
|
||||
description = "Draw a filled circle within an image",
|
||||
name = "ImageDrawLineStrip",
|
||||
description = "Draw a lines sequence within an image",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "int", name = "centerX"},
|
||||
{type = "int", name = "centerY"},
|
||||
{type = "int", name = "radius"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawCircleV",
|
||||
description = "Draw a filled circle within an image (Vector version)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "Vector2", name = "center"},
|
||||
{type = "int", name = "radius"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawCircleLines",
|
||||
description = "Draw circle outline within an image",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "int", name = "centerX"},
|
||||
{type = "int", name = "centerY"},
|
||||
{type = "int", name = "radius"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawCircleLinesV",
|
||||
description = "Draw circle outline within an image (Vector version)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "Vector2", name = "center"},
|
||||
{type = "int", name = "radius"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawRectangle",
|
||||
description = "Draw rectangle within an image",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "int", name = "posX"},
|
||||
{type = "int", name = "posY"},
|
||||
{type = "int", name = "width"},
|
||||
{type = "int", name = "height"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawRectangleV",
|
||||
description = "Draw rectangle within an image (Vector version)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "Vector2", name = "position"},
|
||||
{type = "Vector2", name = "size"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawRectangleRec",
|
||||
description = "Draw rectangle within an image",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawRectangleLines",
|
||||
description = "Draw rectangle lines within an image",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "int", name = "posX"},
|
||||
{type = "int", name = "posY"},
|
||||
{type = "int", name = "width"},
|
||||
{type = "int", name = "height"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawRectangleLinesEx",
|
||||
description = "Draw rectangle lines within an image with extended parameters",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "int", name = "thick"},
|
||||
{type = "const Vector2 *", name = "points"},
|
||||
{type = "int", name = "pointCount"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
|
|
@ -6287,14 +6199,156 @@ return {
|
|||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDraw",
|
||||
description = "Draw a source image within a destination image (tint applied to source)",
|
||||
name = "ImageDrawRectangle",
|
||||
description = "Draw rectangle within an image",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "int", name = "posX"},
|
||||
{type = "int", name = "posY"},
|
||||
{type = "int", name = "width"},
|
||||
{type = "int", name = "height"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawRectangleV",
|
||||
description = "Draw rectangle within an image (Vector version)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "Vector2", name = "position"},
|
||||
{type = "Vector2", name = "size"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawRectangleRec",
|
||||
description = "Draw rectangle within an image",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawRectangleLines",
|
||||
description = "Draw rectangle lines within an image",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "int", name = "posX"},
|
||||
{type = "int", name = "posY"},
|
||||
{type = "int", name = "width"},
|
||||
{type = "int", name = "height"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawRectangleLinesEx",
|
||||
description = "Draw rectangle lines within an image with line thickness",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "int", name = "thick"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawCircle",
|
||||
description = "Draw a filled circle within an image",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "int", name = "centerX"},
|
||||
{type = "int", name = "centerY"},
|
||||
{type = "int", name = "radius"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawCircleV",
|
||||
description = "Draw a filled circle within an image (Vector version)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "Vector2", name = "center"},
|
||||
{type = "int", name = "radius"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawCircleLines",
|
||||
description = "Draw circle outline within an image",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "int", name = "centerX"},
|
||||
{type = "int", name = "centerY"},
|
||||
{type = "int", name = "radius"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawCircleLinesV",
|
||||
description = "Draw circle outline within an image (Vector version)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "Vector2", name = "center"},
|
||||
{type = "int", name = "radius"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawCircleGradient",
|
||||
description = "Draw a gradient-filled circle within an image",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "Vector2", name = "center"},
|
||||
{type = "float", name = "radius"},
|
||||
{type = "Color", name = "inner"},
|
||||
{type = "Color", name = "outer"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawImage",
|
||||
description = "Draw an image within an image",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "Image", name = "src"},
|
||||
{type = "int", name = "posX"},
|
||||
{type = "int", name = "posY"},
|
||||
{type = "Color", name = "tint"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawImageRec",
|
||||
description = "Draw a part of an image defined by a rectangle within an image",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "Image", name = "src"},
|
||||
{type = "Rectangle", name = "srcRec"},
|
||||
{type = "Vector2", name = "position"},
|
||||
{type = "Color", name = "tint"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawImagePro",
|
||||
description = "Draw a part of an image defined by a rectangle into destination rectangle, with scaling and rotation, within an image",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "Image", name = "src"},
|
||||
{type = "Rectangle", name = "srcRec"},
|
||||
{type = "Rectangle", name = "dstRec"},
|
||||
{type = "Vector2", name = "origin"},
|
||||
{type = "float", name = "rotation"},
|
||||
{type = "Color", name = "tint"}
|
||||
}
|
||||
},
|
||||
|
|
@ -6459,7 +6513,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "DrawTextureEx",
|
||||
description = "Draw a Texture2D with extended parameters",
|
||||
description = "Draw a Texture2D with rotation and scale",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Texture2D", name = "texture"},
|
||||
|
|
@ -6674,7 +6728,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "LoadFontEx",
|
||||
description = "Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height",
|
||||
description = "Load font from file with defined codepoints and generation size, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height",
|
||||
returnType = "Font",
|
||||
params = {
|
||||
{type = "const char *", name = "fileName"},
|
||||
|
|
@ -7258,7 +7312,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "DrawTriangle3D",
|
||||
description = "Draw a color-filled triangle (vertex in counter-clockwise order!)",
|
||||
description = "Draw a color-filled triangle, counter-clockwise vertex order",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector3", name = "v1"},
|
||||
|
|
@ -7333,7 +7387,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "DrawSphereEx",
|
||||
description = "Draw sphere with extended parameters",
|
||||
description = "Draw sphere with defined rings and slices",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector3", name = "centerPos"},
|
||||
|
|
@ -7514,7 +7568,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "DrawModelEx",
|
||||
description = "Draw a model with extended parameters",
|
||||
description = "Draw a model with custom transform",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Model", name = "model"},
|
||||
|
|
@ -7538,7 +7592,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "DrawModelWiresEx",
|
||||
description = "Draw a model wires (with texture if set) with extended parameters",
|
||||
description = "Draw a model wires with custom transform",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Model", name = "model"},
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="Windows-1252" ?>
|
||||
<raylibAPI>
|
||||
<Defines count="57">
|
||||
<Defines count="56">
|
||||
<Define name="RAYLIB_H" type="GUARD" value="" desc="" />
|
||||
<Define name="RAYLIB_VERSION_MAJOR" type="INT" value="6" desc="" />
|
||||
<Define name="RAYLIB_VERSION_MINOR" type="INT" value="1" desc="" />
|
||||
|
|
@ -57,7 +57,6 @@
|
|||
<Define name="MATERIAL_MAP_SPECULAR" type="UNKNOWN" value="MATERIAL_MAP_METALNESS" desc="" />
|
||||
<Define name="SHADER_LOC_MAP_DIFFUSE" type="UNKNOWN" value="SHADER_LOC_MAP_ALBEDO" desc="" />
|
||||
<Define name="SHADER_LOC_MAP_SPECULAR" type="UNKNOWN" value="SHADER_LOC_MAP_METALNESS" desc="" />
|
||||
<Define name="GetMouseRay" type="UNKNOWN" value="GetScreenToWorldRay" desc="Compatibility hack for previous raylib versions" />
|
||||
</Defines>
|
||||
<Structs count="35">
|
||||
<Struct name="Vector2" fieldCount="2" desc="Vector2, 2 components">
|
||||
|
|
@ -682,7 +681,7 @@
|
|||
<Param type="unsigned int" name="frames" desc="" />
|
||||
</Callback>
|
||||
</Callbacks>
|
||||
<Functions count="602">
|
||||
<Functions count="607">
|
||||
<Function name="InitWindow" retType="void" paramCount="3" desc="Initialize window and OpenGL context">
|
||||
<Param type="int" name="width" desc="" />
|
||||
<Param type="int" name="height" desc="" />
|
||||
|
|
@ -1403,6 +1402,134 @@
|
|||
<Param type="int" name="spaceSize" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawTriangle" retType="void" paramCount="4" desc="Draw a color-filled triangle, counter-clockwise vertex order">
|
||||
<Param type="Vector2" name="v1" desc="" />
|
||||
<Param type="Vector2" name="v2" desc="" />
|
||||
<Param type="Vector2" name="v3" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawTriangleGradient" retType="void" paramCount="6" desc="Draw triangle with interpolated colors, counter-clockwise vertex/color order">
|
||||
<Param type="Vector2" name="v1" desc="" />
|
||||
<Param type="Vector2" name="v2" desc="" />
|
||||
<Param type="Vector2" name="v3" desc="" />
|
||||
<Param type="Color" name="c1" desc="" />
|
||||
<Param type="Color" name="c2" desc="" />
|
||||
<Param type="Color" name="c3" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawTriangleLines" retType="void" paramCount="4" desc="Draw triangle outline, counter-clockwise vertex order">
|
||||
<Param type="Vector2" name="v1" desc="" />
|
||||
<Param type="Vector2" name="v2" desc="" />
|
||||
<Param type="Vector2" name="v3" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawTriangleFan" retType="void" paramCount="3" desc="Draw a triangle fan defined by points (first vertex is the center)">
|
||||
<Param type="const Vector2 *" name="points" desc="" />
|
||||
<Param type="int" name="pointCount" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawTriangleStrip" retType="void" paramCount="3" desc="Draw a triangle strip defined by points">
|
||||
<Param type="const Vector2 *" name="points" desc="" />
|
||||
<Param type="int" name="pointCount" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangle" retType="void" paramCount="5" desc="Draw a color-filled rectangle">
|
||||
<Param type="int" name="posX" desc="" />
|
||||
<Param type="int" name="posY" desc="" />
|
||||
<Param type="int" name="width" desc="" />
|
||||
<Param type="int" name="height" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleV" retType="void" paramCount="3" desc="Draw a color-filled rectangle (Vector version)">
|
||||
<Param type="Vector2" name="position" desc="" />
|
||||
<Param type="Vector2" name="size" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleRec" retType="void" paramCount="2" desc="Draw a color-filled rectangle">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectanglePro" retType="void" paramCount="4" desc="Draw a color-filled rectangle with pro parameters">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="Vector2" name="origin" desc="" />
|
||||
<Param type="float" name="rotation" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleGradientV" retType="void" paramCount="6" desc="Draw a vertical-gradient-filled rectangle">
|
||||
<Param type="int" name="posX" desc="" />
|
||||
<Param type="int" name="posY" desc="" />
|
||||
<Param type="int" name="width" desc="" />
|
||||
<Param type="int" name="height" desc="" />
|
||||
<Param type="Color" name="top" desc="" />
|
||||
<Param type="Color" name="bottom" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleGradientH" retType="void" paramCount="6" desc="Draw a horizontal-gradient-filled rectangle">
|
||||
<Param type="int" name="posX" desc="" />
|
||||
<Param type="int" name="posY" desc="" />
|
||||
<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 name="DrawRectangleGradientEx" retType="void" paramCount="5" desc="Draw a gradient-filled rectangle with custom vertex colors, counter-clockwise color order">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="Color" name="col1" desc="" />
|
||||
<Param type="Color" name="col2" desc="" />
|
||||
<Param type="Color" name="col3" desc="" />
|
||||
<Param type="Color" name="col4" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleLines" retType="void" paramCount="5" desc="Draw rectangle outline">
|
||||
<Param type="int" name="posX" desc="" />
|
||||
<Param type="int" name="posY" desc="" />
|
||||
<Param type="int" name="width" desc="" />
|
||||
<Param type="int" name="height" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleLinesEx" retType="void" paramCount="3" desc="Draw rectangle outline with line thickness">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="float" name="thick" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleRounded" retType="void" paramCount="4" desc="Draw rectangle with rounded edges">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="float" name="roundness" desc="" />
|
||||
<Param type="int" name="segments" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleRoundedLines" retType="void" paramCount="4" desc="Draw rectangle lines with rounded edges">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="float" name="roundness" desc="" />
|
||||
<Param type="int" name="segments" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleRoundedLinesEx" retType="void" paramCount="5" desc="Draw rectangle lines with rounded edges outline and line thickness">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="float" name="roundness" desc="" />
|
||||
<Param type="int" name="segments" desc="" />
|
||||
<Param type="float" name="thick" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawPoly" retType="void" paramCount="5" desc="Draw a polygon of n sides">
|
||||
<Param type="Vector2" name="center" desc="" />
|
||||
<Param type="int" name="sides" desc="" />
|
||||
<Param type="float" name="radius" desc="" />
|
||||
<Param type="float" name="rotation" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawPolyLines" retType="void" paramCount="5" desc="Draw a polygon outline of n sides">
|
||||
<Param type="Vector2" name="center" desc="" />
|
||||
<Param type="int" name="sides" desc="" />
|
||||
<Param type="float" name="radius" desc="" />
|
||||
<Param type="float" name="rotation" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawPolyLinesEx" retType="void" paramCount="6" desc="Draw a polygon outline of n sides with line thickness">
|
||||
<Param type="Vector2" name="center" desc="" />
|
||||
<Param type="int" name="sides" desc="" />
|
||||
<Param type="float" name="radius" desc="" />
|
||||
<Param type="float" name="rotation" desc="" />
|
||||
<Param type="float" name="thick" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawCircle" retType="void" paramCount="4" desc="Draw a color-filled circle">
|
||||
<Param type="int" name="centerX" desc="" />
|
||||
<Param type="int" name="centerY" desc="" />
|
||||
|
|
@ -1447,6 +1574,12 @@
|
|||
<Param type="float" name="radius" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawCircleLinesEx" retType="void" paramCount="4" desc="Draw circle outline with line thickness">
|
||||
<Param type="Vector2" name="center" desc="" />
|
||||
<Param type="float" name="radius" desc="" />
|
||||
<Param type="float" name="thick" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawEllipse" retType="void" paramCount="5" desc="Draw ellipse">
|
||||
<Param type="int" name="centerX" desc="" />
|
||||
<Param type="int" name="centerY" desc="" />
|
||||
|
|
@ -1491,134 +1624,6 @@
|
|||
<Param type="int" name="segments" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangle" retType="void" paramCount="5" desc="Draw a color-filled rectangle">
|
||||
<Param type="int" name="posX" desc="" />
|
||||
<Param type="int" name="posY" desc="" />
|
||||
<Param type="int" name="width" desc="" />
|
||||
<Param type="int" name="height" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleV" retType="void" paramCount="3" desc="Draw a color-filled rectangle (Vector version)">
|
||||
<Param type="Vector2" name="position" desc="" />
|
||||
<Param type="Vector2" name="size" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleRec" retType="void" paramCount="2" desc="Draw a color-filled rectangle">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectanglePro" retType="void" paramCount="4" desc="Draw a color-filled rectangle with pro parameters">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="Vector2" name="origin" desc="" />
|
||||
<Param type="float" name="rotation" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleGradientV" retType="void" paramCount="6" desc="Draw a vertical-gradient-filled rectangle">
|
||||
<Param type="int" name="posX" desc="" />
|
||||
<Param type="int" name="posY" desc="" />
|
||||
<Param type="int" name="width" desc="" />
|
||||
<Param type="int" name="height" desc="" />
|
||||
<Param type="Color" name="top" desc="" />
|
||||
<Param type="Color" name="bottom" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleGradientH" retType="void" paramCount="6" desc="Draw a horizontal-gradient-filled rectangle">
|
||||
<Param type="int" name="posX" desc="" />
|
||||
<Param type="int" name="posY" desc="" />
|
||||
<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 name="DrawRectangleGradientEx" retType="void" paramCount="5" desc="Draw a gradient-filled rectangle with custom vertex colors">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="Color" name="topLeft" desc="" />
|
||||
<Param type="Color" name="bottomLeft" desc="" />
|
||||
<Param type="Color" name="bottomRight" desc="" />
|
||||
<Param type="Color" name="topRight" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleLines" retType="void" paramCount="5" desc="Draw rectangle outline">
|
||||
<Param type="int" name="posX" desc="" />
|
||||
<Param type="int" name="posY" desc="" />
|
||||
<Param type="int" name="width" desc="" />
|
||||
<Param type="int" name="height" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleLinesEx" retType="void" paramCount="3" desc="Draw rectangle outline with extended parameters">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="float" name="lineThick" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleRounded" retType="void" paramCount="4" desc="Draw rectangle with rounded edges">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="float" name="roundness" desc="" />
|
||||
<Param type="int" name="segments" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleRoundedLines" retType="void" paramCount="4" desc="Draw rectangle lines with rounded edges">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="float" name="roundness" desc="" />
|
||||
<Param type="int" name="segments" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleRoundedLinesEx" retType="void" paramCount="5" desc="Draw rectangle lines with rounded edges outline">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="float" name="roundness" desc="" />
|
||||
<Param type="int" name="segments" desc="" />
|
||||
<Param type="float" name="lineThick" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawTriangle" retType="void" paramCount="4" desc="Draw a color-filled triangle (vertex in counter-clockwise order!)">
|
||||
<Param type="Vector2" name="v1" desc="" />
|
||||
<Param type="Vector2" name="v2" desc="" />
|
||||
<Param type="Vector2" name="v3" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawTriangleGradient" retType="void" paramCount="6" desc="Draw triangle with interpolated colors (vertex in counter-clockwise order!)">
|
||||
<Param type="Vector2" name="v1" desc="" />
|
||||
<Param type="Vector2" name="v2" desc="" />
|
||||
<Param type="Vector2" name="v3" desc="" />
|
||||
<Param type="Color" name="c1" desc="" />
|
||||
<Param type="Color" name="c2" desc="" />
|
||||
<Param type="Color" name="c3" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawTriangleLines" retType="void" paramCount="4" desc="Draw triangle outline (vertex in counter-clockwise order!)">
|
||||
<Param type="Vector2" name="v1" desc="" />
|
||||
<Param type="Vector2" name="v2" desc="" />
|
||||
<Param type="Vector2" name="v3" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawTriangleFan" retType="void" paramCount="3" desc="Draw a triangle fan defined by points (first vertex is the center)">
|
||||
<Param type="const Vector2 *" name="points" desc="" />
|
||||
<Param type="int" name="pointCount" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawTriangleStrip" retType="void" paramCount="3" desc="Draw a triangle strip defined by points">
|
||||
<Param type="const Vector2 *" name="points" desc="" />
|
||||
<Param type="int" name="pointCount" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawPoly" retType="void" paramCount="5" desc="Draw a polygon of n sides">
|
||||
<Param type="Vector2" name="center" desc="" />
|
||||
<Param type="int" name="sides" desc="" />
|
||||
<Param type="float" name="radius" desc="" />
|
||||
<Param type="float" name="rotation" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawPolyLines" retType="void" paramCount="5" desc="Draw a polygon outline of n sides">
|
||||
<Param type="Vector2" name="center" desc="" />
|
||||
<Param type="int" name="sides" desc="" />
|
||||
<Param type="float" name="radius" desc="" />
|
||||
<Param type="float" name="rotation" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawPolyLinesEx" retType="void" paramCount="6" desc="Draw a polygon outline of n sides with extended parameters">
|
||||
<Param type="Vector2" name="center" desc="" />
|
||||
<Param type="int" name="sides" desc="" />
|
||||
<Param type="float" name="radius" desc="" />
|
||||
<Param type="float" name="rotation" desc="" />
|
||||
<Param type="float" name="lineThick" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawSplineLinear" retType="void" paramCount="4" desc="Draw spline: Linear, minimum 2 points">
|
||||
<Param type="const Vector2 *" name="points" desc="" />
|
||||
<Param type="int" name="pointCount" desc="" />
|
||||
|
|
@ -2067,63 +2072,10 @@
|
|||
<Param type="int" name="thick" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawCircle" retType="void" paramCount="5" desc="Draw a filled circle within an image">
|
||||
<Function name="ImageDrawLineStrip" retType="void" paramCount="4" desc="Draw a lines sequence within an image">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="int" name="centerX" desc="" />
|
||||
<Param type="int" name="centerY" desc="" />
|
||||
<Param type="int" name="radius" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawCircleV" retType="void" paramCount="4" desc="Draw a filled circle within an image (Vector version)">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="Vector2" name="center" desc="" />
|
||||
<Param type="int" name="radius" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawCircleLines" retType="void" paramCount="5" desc="Draw circle outline within an image">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="int" name="centerX" desc="" />
|
||||
<Param type="int" name="centerY" desc="" />
|
||||
<Param type="int" name="radius" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawCircleLinesV" retType="void" paramCount="4" desc="Draw circle outline within an image (Vector version)">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="Vector2" name="center" desc="" />
|
||||
<Param type="int" name="radius" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawRectangle" retType="void" paramCount="6" desc="Draw rectangle within an image">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="int" name="posX" desc="" />
|
||||
<Param type="int" name="posY" desc="" />
|
||||
<Param type="int" name="width" desc="" />
|
||||
<Param type="int" name="height" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawRectangleV" retType="void" paramCount="4" desc="Draw rectangle within an image (Vector version)">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="Vector2" name="position" desc="" />
|
||||
<Param type="Vector2" name="size" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawRectangleRec" retType="void" paramCount="3" desc="Draw rectangle within an image">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawRectangleLines" retType="void" paramCount="6" desc="Draw rectangle lines within an image">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="int" name="posX" desc="" />
|
||||
<Param type="int" name="posY" desc="" />
|
||||
<Param type="int" name="width" desc="" />
|
||||
<Param type="int" name="height" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawRectangleLinesEx" retType="void" paramCount="4" desc="Draw rectangle lines within an image with extended parameters">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="int" name="thick" desc="" />
|
||||
<Param type="const Vector2 *" name="points" desc="" />
|
||||
<Param type="int" name="pointCount" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawTriangle" retType="void" paramCount="5" desc="Draw triangle within an image">
|
||||
|
|
@ -2161,11 +2113,93 @@
|
|||
<Param type="int" name="pointCount" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDraw" retType="void" paramCount="5" desc="Draw a source image within a destination image (tint applied to source)">
|
||||
<Function name="ImageDrawRectangle" retType="void" paramCount="6" desc="Draw rectangle within an image">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="int" name="posX" desc="" />
|
||||
<Param type="int" name="posY" desc="" />
|
||||
<Param type="int" name="width" desc="" />
|
||||
<Param type="int" name="height" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawRectangleV" retType="void" paramCount="4" desc="Draw rectangle within an image (Vector version)">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="Vector2" name="position" desc="" />
|
||||
<Param type="Vector2" name="size" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawRectangleRec" retType="void" paramCount="3" desc="Draw rectangle within an image">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawRectangleLines" retType="void" paramCount="6" desc="Draw rectangle lines within an image">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="int" name="posX" desc="" />
|
||||
<Param type="int" name="posY" desc="" />
|
||||
<Param type="int" name="width" desc="" />
|
||||
<Param type="int" name="height" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawRectangleLinesEx" retType="void" paramCount="4" desc="Draw rectangle lines within an image with line thickness">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="int" name="thick" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawCircle" retType="void" paramCount="5" desc="Draw a filled circle within an image">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="int" name="centerX" desc="" />
|
||||
<Param type="int" name="centerY" desc="" />
|
||||
<Param type="int" name="radius" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawCircleV" retType="void" paramCount="4" desc="Draw a filled circle within an image (Vector version)">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="Vector2" name="center" desc="" />
|
||||
<Param type="int" name="radius" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawCircleLines" retType="void" paramCount="5" desc="Draw circle outline within an image">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="int" name="centerX" desc="" />
|
||||
<Param type="int" name="centerY" desc="" />
|
||||
<Param type="int" name="radius" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawCircleLinesV" retType="void" paramCount="4" desc="Draw circle outline within an image (Vector version)">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="Vector2" name="center" desc="" />
|
||||
<Param type="int" name="radius" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawCircleGradient" retType="void" paramCount="5" desc="Draw a gradient-filled circle within an image">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="Vector2" name="center" desc="" />
|
||||
<Param type="float" name="radius" desc="" />
|
||||
<Param type="Color" name="inner" desc="" />
|
||||
<Param type="Color" name="outer" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawImage" retType="void" paramCount="5" desc="Draw an image within an image">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="Image" name="src" desc="" />
|
||||
<Param type="int" name="posX" desc="" />
|
||||
<Param type="int" name="posY" desc="" />
|
||||
<Param type="Color" name="tint" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawImageRec" retType="void" paramCount="5" desc="Draw a part of an image defined by a rectangle within an image">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="Image" name="src" desc="" />
|
||||
<Param type="Rectangle" name="srcRec" desc="" />
|
||||
<Param type="Vector2" name="position" desc="" />
|
||||
<Param type="Color" name="tint" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawImagePro" retType="void" paramCount="7" desc="Draw a part of an image defined by a rectangle into destination rectangle, with scaling and rotation, within an image">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="Image" name="src" desc="" />
|
||||
<Param type="Rectangle" name="srcRec" desc="" />
|
||||
<Param type="Rectangle" name="dstRec" desc="" />
|
||||
<Param type="Vector2" name="origin" desc="" />
|
||||
<Param type="float" name="rotation" desc="" />
|
||||
<Param type="Color" name="tint" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawText" retType="void" paramCount="6" desc="Draw text (using default font) within an image (destination)">
|
||||
|
|
@ -2242,7 +2276,7 @@
|
|||
<Param type="Vector2" name="position" desc="" />
|
||||
<Param type="Color" name="tint" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawTextureEx" retType="void" paramCount="5" desc="Draw a Texture2D with extended parameters">
|
||||
<Function name="DrawTextureEx" retType="void" paramCount="5" desc="Draw a Texture2D with rotation and scale">
|
||||
<Param type="Texture2D" name="texture" desc="" />
|
||||
<Param type="Vector2" name="position" desc="" />
|
||||
<Param type="float" name="rotation" desc="" />
|
||||
|
|
@ -2344,7 +2378,7 @@
|
|||
<Function name="LoadFont" retType="Font" paramCount="1" desc="Load font from file into GPU memory (VRAM)">
|
||||
<Param type="const char *" name="fileName" desc="" />
|
||||
</Function>
|
||||
<Function name="LoadFontEx" retType="Font" paramCount="4" desc="Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height">
|
||||
<Function name="LoadFontEx" retType="Font" paramCount="4" desc="Load font from file with defined codepoints and generation size, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height">
|
||||
<Param type="const char *" name="fileName" desc="" />
|
||||
<Param type="int" name="fontSize" desc="" />
|
||||
<Param type="const int *" name="codepoints" desc="" />
|
||||
|
|
@ -2628,7 +2662,7 @@
|
|||
<Param type="float" name="rotationAngle" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawTriangle3D" retType="void" paramCount="4" desc="Draw a color-filled triangle (vertex in counter-clockwise order!)">
|
||||
<Function name="DrawTriangle3D" retType="void" paramCount="4" desc="Draw a color-filled triangle, counter-clockwise vertex order">
|
||||
<Param type="Vector3" name="v1" desc="" />
|
||||
<Param type="Vector3" name="v2" desc="" />
|
||||
<Param type="Vector3" name="v3" desc="" />
|
||||
|
|
@ -2668,7 +2702,7 @@
|
|||
<Param type="float" name="radius" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawSphereEx" retType="void" paramCount="5" desc="Draw sphere with extended parameters">
|
||||
<Function name="DrawSphereEx" retType="void" paramCount="5" desc="Draw sphere with defined rings and slices">
|
||||
<Param type="Vector3" name="centerPos" desc="" />
|
||||
<Param type="float" name="radius" desc="" />
|
||||
<Param type="int" name="rings" desc="" />
|
||||
|
|
@ -2764,7 +2798,7 @@
|
|||
<Param type="float" name="scale" desc="" />
|
||||
<Param type="Color" name="tint" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawModelEx" retType="void" paramCount="6" desc="Draw a model with extended parameters">
|
||||
<Function name="DrawModelEx" retType="void" paramCount="6" desc="Draw a model with custom transform">
|
||||
<Param type="Model" name="model" desc="" />
|
||||
<Param type="Vector3" name="position" desc="" />
|
||||
<Param type="Vector3" name="rotationAxis" desc="" />
|
||||
|
|
@ -2778,7 +2812,7 @@
|
|||
<Param type="float" name="scale" desc="" />
|
||||
<Param type="Color" name="tint" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawModelWiresEx" retType="void" paramCount="6" desc="Draw a model wires (with texture if set) with extended parameters">
|
||||
<Function name="DrawModelWiresEx" retType="void" paramCount="6" desc="Draw a model wires with custom transform">
|
||||
<Param type="Model" name="model" desc="" />
|
||||
<Param type="Vector3" name="position" desc="" />
|
||||
<Param type="Vector3" name="rotationAxis" desc="" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user