Merge pull request #1 from raysan5/master

update base
This commit is contained in:
kernelkinetic 2020-10-25 15:51:12 +01:00 committed by GitHub
commit 621eaef2e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 227 additions and 22 deletions

View File

@ -9,7 +9,8 @@ Here it is a list with the ones I'm aware of:
| raylib | **3.1-dev** | [C](https://en.wikipedia.org/wiki/C_(programming_language)) | https://github.com/raysan5/raylib | | raylib | **3.1-dev** | [C](https://en.wikipedia.org/wiki/C_(programming_language)) | https://github.com/raysan5/raylib |
| raylib-cpp | 3.1-dev | [C++](https://en.wikipedia.org/wiki/C%2B%2B) | https://github.com/robloach/raylib-cpp | | raylib-cpp | 3.1-dev | [C++](https://en.wikipedia.org/wiki/C%2B%2B) | https://github.com/robloach/raylib-cpp |
| Raylib-cs | 3.0 | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | https://github.com/ChrisDill/Raylib-cs | | Raylib-cs | 3.0 | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | https://github.com/ChrisDill/Raylib-cs |
| raylib-cppsharp | ? | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | https://github.com/phxvyper/raylib-cppsharp | | raylib-cppsharp | 2.5 | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | https://github.com/phxvyper/raylib-cppsharp |
| raylib-boo | 3.0 | [Boo](http://boo-language.github.io/) | https://github.com/Rabios/raylib-boo |
| RaylibFS | 2.5 | [F#](https://fsharp.org/) | https://github.com/dallinbeutler/RaylibFS | | RaylibFS | 2.5 | [F#](https://fsharp.org/) | https://github.com/dallinbeutler/RaylibFS |
| raylib_d | 2.5 | [D](https://dlang.org/) | https://github.com/Sepheus/raylib_d | | raylib_d | 2.5 | [D](https://dlang.org/) | https://github.com/Sepheus/raylib_d |
| raylib-d | 3.0 | [D](https://dlang.org/) | https://github.com/onroundit/raylib-d | | raylib-d | 3.0 | [D](https://dlang.org/) | https://github.com/onroundit/raylib-d |

150
CHANGELOG
View File

@ -3,6 +3,156 @@ changelog
Current Release: raylib 3.0.0 (01 April 2020) Current Release: raylib 3.0.0 (01 April 2020)
-------------------------------------------------------------------------
Release: raylib 3.5 - 7th Anniversary Edition (November 2020) -WIP-
-------------------------------------------------------------------------
KEY CHANGES:
- [core] NEW platform supported: PLATFORM_DRM (#1388) by @kernelkinetic
- [rlgl] ADDED RenderBatch type and related functions to allow custom batching
- [rlgl] REDESIGN framebuffers API to support multiple attachment types (#721)
- [textures] REDESIGNED Image*() functions, big performance improvements (software rendering)
- [*] REVIEWED multiple functions to replace file accesses by memory accesses
- [*] NEW GitHub Actions CI to support multiple raylib build configurations
Detailed changes:
[core] ADDED: IsWindowFocused()
[core] ADDED: GetWindowScaleDPI()
[core] ADDED: GetMonitorRefreshRate() (#1289) by @Shylie
[core] ADDED: IsCursorOnScreen() (#1262) by @ChrisDill
[core] ADDED: SetMouseCursor() and GetMouseCursor() for standard Desktop cursors (#1407) by @chances
[core] REMOVED: struct RenderTexture2D: depthTexture variable
[core] RENAMED: GetExtension() to GetFileExtension()
[core] REVIEWED: Several structs to reduce size and padding
[core] REVIEWED: struct Texture maps to Texture2D and TextureCubemap
[core] REVIEWED: ToggleFullscreen() (#1287)
[core] REVIEWED: InitWindow(), support empty title for window (#1323)
[core] REVIEWED: RPI: Mouse movements are bound to the screen resolution (#1392) (#1410) by @kernelkinetic
[core] REVIEWED: GetPrevDirectoryPath() fixes on Unix-like systems (#1246) by @ivan-cx
[core] REDESIGNED: GetMouseWheelMove() to return float movement for precise scrolling (#1397) by @Doy-lee
[core] UWP rework with improvements (#1231) by @Rover656
[core] Gamepad axis bug fixes and improvement (#1228) by @mmalecot
[core] Updated joystick mappings with latest version of gamecontrollerdb (#1381) by @coderoth
[rlgl] Corrected issue with OpenGL 1.1 support
[rlgl] ADDED: rlDrawMeshInstanced() (#1318) by @seanpringle
[rlgl] ADDED: rlCheckErrors (#1321) by @seanpringle
[rlgl] ADDED: BLEND_SET blending mode (#1251) by @RandomErrorMessage
[rlgl] RENAMED: rlUnproject() to Vector3Unproject() [raymath]
[rlgl] REVIEWED: Replace rlglDraw() calls by DrawRenderBatch() internal calls
[rlgl] REVIEWED: GenTextureCubemap(), use rlgl functionality only
[rlgl] REVIEWED: rlFramebufferAttach() to support texture layers
[rlgl] REVIEWED: GenDrawCube() and GenDrawQuad()
[rlgl] REVIEWED: Issues with vertex batch overflow (#1223)
[rlgl] REDESIGNED: GenTexture*() to use the new fbo API (#721)
[raymath] ADDED: Normalize() and Remap() functions (#1247) by @NoorWachid
[raymath] ADDED: Vector2Reflect() (#1400) by @daniel-junior-dube
[raymath] ADDED: Vector2LengthSqr() and Vector3LengthSqr() (#1248) by @ThePituLegend
[raymath] ADDED: Vector2MoveTowards() function (#1233) by @anatagawa
[raymath] REVIEWED: Some functions consistency (#1197) by @Not-Nik
[raymath] REVIEWED: QuaternionFromVector3ToVector3() (#1263) by @jvocaturo
[text] Avoid [textures] functions dependencies
[text] ADDED: Config flag: SUPPORT_TEXT_MANIPULATION
[text] ADDED: LoadFontFromMemory() (TTF only) (#1327)
[text] RENAMED: FormatText() -> TextFormat()
[text] REVIEWED: TextJoin()
[text] REVIEWED: TextReplace() (#1172)
[text] REVIEWED: LoadBMFont() to load data from memory (#1232)
[text] REVIEWED: GenImageFontAtlas(), fixed offset (#1171)
[text] REDESIGNED: LoadFontData()
[text] REDESIGNED: LoadFontDefault(), some code simplifications
[text] REDESIGNED: LoadFontFromImage(), avoid LoadImageEx()
[text] REDESIGNED: LoadFontData(), avoid GenImageColor(), ImageFormat()
[text] REDESIGNED: LoadBMFont(), avoid ImageCopy(), ImageFormat(), ImageAlphaMask()
[textures] Move Color functions from [core] to [textures] module
[textures] ADDED: ColorAlphaBlend()
[textures] ADDED: GetPixelColor()
[textures] ADDED: SetPixelColor()
[textures] ADDED: LoadImageFromMemory() (#1327)
[textures] ADDED: LoadImageAnim() to load animated sequence of images
[textures] ADDED: DrawTextureTiled() (#1291) - @Demizdor
[textures] ADDED: UpdateTextureRec()
[textures] REMOVED: Config flag: SUPPORT_IMAGE_DRAWING
[textures] REMOVED: LoadImageEx()
[textures] REMOVED: LoadImagePro()
[textures] RENAMED: ImageExtractPalette() to GetImagePalette()
[textures] RENAMED: Fade() to ColorAlpha(), added #define for compatibility
[textures] REVIEWED: GetPixelDataSize() to consider compressed data properly
[textures] REVIEWED: GetTextureData(), allow retrieving 32bit float data
[textures] REVIEWED: ImageDrawText*() params order
[textures] REVIEWED: ColorAlphaBlend(), support tint color
[textures] REVIEWED: ColorAlphaBlend(), integers-version, optimized (#1218)
[textures] REVIEWED: ImageDraw(), consider negative source offset properly (#1283)
[textures] REVIEWED: ImageDraw(), optimizations test (#1218)
[textures] REVIEWED: ImageResizeCanvas(), optimization (#1218)
[textures] REVIEWED: ExportImage(), optimized
[textures] REVIEWED: ImageAlphaPremultiply(), optimization
[textures] REVIEWED: ImageAlphaClear(), minor optimization
[textures] REVIEWED: ImageToPOT(), renamed parameter
[textures] REVIEWED: ImageCrop() (#1218)
[textures] REVIEWED: ImageToPOT() (#1218)
[textures] REVIEWED: ImageAlphaCrop() (#1218)
[textures] REVIEWED: ExportImage(), optimized (#1218)
[textures] REDESIGNED: ImageCrop(), optimized (#1218)
[textures] REDESIGNED: ImageRotateCCW(), optimized (#1218)
[textures] REDESIGNED: ImageRotateCW(), optimized (#1218)
[textures] REDESIGNED: ImageFlipHorizontal(), optimized (#1218)
[textures] REDESIGNED: ImageFlipVertical(), optimized (#1218)
[textures] REDESIGNED: ImageResizeCanvas(), optimized (#1218)
[textures] REDESIGNED: ImageDrawPixel(), optimized
[textures] REDESIGNED: ImageDrawLine(), optimized
[textures] REDESIGNED: ImageDraw(), optimized (#1218)
[textures] REDESIGNED: ImageResize(), optimized (#1218)
[textures] REDESIGNED: ImageFromImage(), optimized (#1218)
[textures] REDESIGNED: ImageDraw(), optimization (#1218)
[textures] REDESIGNED: ImageAlphaClear(), optimized (#1218)
[textures] REDESIGNED: ExportImageAsCode() to use memory buffer (#1232)
[textures] REDESIGNED: ColorFromHSV()
[models] ADDED: DrawTriangle3D() and DrawTriangleStrip3D()
[models] REVIEWED: LoadModel(), avoid loading texcoords and normals from model if not existent
[models] REVIEWED: GenMeshCubicmap(), added comments and simplification
[models] REVIEWED: GenMeshCubicmap(), fixed generated normals (#1244) by @GoldenThumbs
[models] REVIEWED: GenMeshPoly(), fixed buffer overflow (#1269) by @frithrah
[models] REVIEWED: LoadOBJ(): Allow for multiple materials in obj files (#1408) by @chriscamacho and @codifies
[models] REVIEWED: LoadIQM() materials loading (#1227) by @sikor666
[models] REVIEWED: LoadGLTF() to read from memory buffer
[models] REVIEWED: UpdateMesh(), fix extra memory allocated when updating color buffer (#1271) by @4yn
[models] REVIEWED: MeshNormalsSmooth() (#1317) by @seanpringle
[models] REDESIGNED: ExportMesh() to use memory buffer (#1232)
[models] REDESIGNED: LoadIQM() and LoadModelAnimations() to use memory buffers
[audio] ADDED: LoadWaveFromMemory() (#1327)
[audio] REMOVED: SetMusicLoopCount()
[audio] REVIEWED: SaveWAV() to use memory write insted of file
[audio] REVIEWED: LoadMusicStream(), support WAV music streaming (#1198)
[audio] REVIEWED: Support multiple WAV sampleSize for MusicStream (#1340)
[audio] REDESIGNED: Audio looping system
[audio] REDESIGNED: LoadSound(): Use memory loading (WAV, OGG, MP3, FLAC) (#1312)
[audio] REDESIGNED: ExportWaveAsCode() to use memory buffers
[utils] REVIEWED: android_fopen() to support SDCard access
[rmem] REVIEWED: MemPool and other allocators optimization (#1211) by @assyrianic
[examples] ADDED: others/embedded_files_loading
[examples] ADDED: shaders/shaders_hot_reloading (#1198)
[examples] ADDED: textures/textures_blend_modes (#1261) by @accidentalrebel
[examples] REVIEWED: models/models_skybox to work on OpenGL ES 2.0
[examples] REVIEWED: textures/textures_raw_data (#1286)
[examples] REVIEWED: others/raudio_standalone.c
[examples] REVIEWED: audio/resources, use open license resources
[examples] REVIEWED: textures/textures_sprite_explosion, replace resources
[examples] REVIEWED: textures/textures_particles_blending, replace resources
[build] REMOVED: ANGLE VS2017 template project
[build] Avoided all MSVC compile warnings
[build] Additional config.h configuration options exposing multiple #define values
[build] Updated Makefile for web (#1332) by @rfaile313
[build] Updated build pipelines to use latest emscripten and android ndk
[build] Updated emscriptem build script to generate .a on WebAssembly
[build] Updated Android build for Linux, supporting ANDROID_NDK at compile time by @branlix3000
[build] Updated VSCode project template tasks
[build] Updated VS2017.UWP project template by @Rover656
[build] Updated Android build pipeline
[*] Moved raysan5/raylib/games to independent repo: raysan5/raylib-games
[*] Replaced several examples resources with more open licensed alternatives
[*] Updated BINDINGS.md with NEW bindings and added raylib version binding!
[*] Updated all external libraries to latest versions
[*] Multiple code improvements and small fixes
----------------------------------------------- -----------------------------------------------
Release: raylib 3.0 (01 April 2020) Release: raylib 3.0 (01 April 2020)
----------------------------------------------- -----------------------------------------------

View File

@ -43,6 +43,9 @@ int main(void)
if (mouseOnText) if (mouseOnText)
{ {
// Set the window's cursor to the I-Beam
SetMouseCursor(MOUSE_CURSOR_IBEAM);
// Get pressed key (character) on the queue // Get pressed key (character) on the queue
int key = GetKeyPressed(); int key = GetKeyPressed();
@ -67,6 +70,7 @@ int main(void)
if (letterCount < 0) letterCount = 0; if (letterCount < 0) letterCount = 0;
} }
} }
else if (GetMouseCursor() != MOUSE_CURSOR_DEFAULT) SetMouseCursor(MOUSE_CURSOR_DEFAULT);
if (mouseOnText) framesCounter++; if (mouseOnText) framesCounter++;
else framesCounter = 0; else framesCounter = 0;

View File

@ -148,6 +148,8 @@ RLAPI void SetMousePosition(int x, int y); // Set mouse posit
RLAPI void SetMouseOffset(int offsetX, int offsetY); // Set mouse offset RLAPI void SetMouseOffset(int offsetX, int offsetY); // Set mouse offset
RLAPI void SetMouseScale(float scaleX, float scaleY); // Set mouse scaling RLAPI void SetMouseScale(float scaleX, float scaleY); // Set mouse scaling
RLAPI float GetMouseWheelMove(void); // Returns mouse wheel movement Y RLAPI float GetMouseWheelMove(void); // Returns mouse wheel movement Y
RLAPI MouseCursor GetMouseCursor(void); // Returns mouse cursor
RLAPI void SetMouseCursor(MouseCursor cursor); // Set mouse cursor
// Input-related functions: touch // Input-related functions: touch
RLAPI int GetTouchX(void); // Returns touch position X for touch point 0 (relative to screen size) RLAPI int GetTouchX(void); // Returns touch position X for touch point 0 (relative to screen size)

View File

@ -423,6 +423,7 @@ typedef struct CoreData {
Vector2 offset; // Mouse offset Vector2 offset; // Mouse offset
Vector2 scale; // Mouse scaling Vector2 scale; // Mouse scaling
int cursor; // Tracks current mouse cursor
bool cursorHidden; // Track if cursor is hidden bool cursorHidden; // Track if cursor is hidden
bool cursorOnScreen; // Tracks if cursor is inside client area bool cursorOnScreen; // Tracks if cursor is inside client area
@ -653,6 +654,7 @@ void InitWindow(int width, int height, const char *title)
// Initialize required global values different than 0 // Initialize required global values different than 0
CORE.Input.Keyboard.exitKey = KEY_ESCAPE; CORE.Input.Keyboard.exitKey = KEY_ESCAPE;
CORE.Input.Mouse.scale = (Vector2){ 1.0f, 1.0f }; CORE.Input.Mouse.scale = (Vector2){ 1.0f, 1.0f };
CORE.Input.Mouse.cursor = MOUSE_CURSOR_ARROW;
CORE.Input.Gamepad.lastButtonPressed = -1; CORE.Input.Gamepad.lastButtonPressed = -1;
#if defined(PLATFORM_UWP) #if defined(PLATFORM_UWP)
@ -2733,6 +2735,27 @@ float GetMouseWheelMove(void)
#endif #endif
} }
// Returns mouse cursor
int GetMouseCursor(void)
{
return CORE.Input.Mouse.cursor;
}
// Set mouse cursor
// NOTE: This is a no-op on platforms other than PLATFORM_DESKTOP
void SetMouseCursor(int cursor)
{
#if defined(PLATFORM_DESKTOP)
CORE.Input.Mouse.cursor = cursor;
if (cursor == MOUSE_CURSOR_DEFAULT) glfwSetCursor(CORE.Window.handle, NULL);
else
{
// NOTE: We are relating internal GLFW enum values to our MouseCursor enum values
glfwSetCursor(CORE.Window.handle, glfwCreateStandardCursor(0x00036000 + cursor));
}
#endif
}
// Returns touch position X for touch point 0 (relative to screen size) // Returns touch position X for touch point 0 (relative to screen size)
int GetTouchX(void) int GetTouchX(void)
{ {
@ -5338,11 +5361,14 @@ static void *EventThread(void *arg)
} }
// Screen confinement // Screen confinement
if (CORE.Input.Mouse.position.x < 0) CORE.Input.Mouse.position.x = 0; if (!CORE.Input.Mouse.cursorHidden)
if (CORE.Input.Mouse.position.x > CORE.Window.screen.width/CORE.Input.Mouse.scale.x) CORE.Input.Mouse.position.x = CORE.Window.screen.width/CORE.Input.Mouse.scale.x; {
if (CORE.Input.Mouse.position.x < 0) CORE.Input.Mouse.position.x = 0;
if (CORE.Input.Mouse.position.x > CORE.Window.screen.width/CORE.Input.Mouse.scale.x) CORE.Input.Mouse.position.x = CORE.Window.screen.width/CORE.Input.Mouse.scale.x;
if (CORE.Input.Mouse.position.y < 0) CORE.Input.Mouse.position.y = 0; if (CORE.Input.Mouse.position.y < 0) CORE.Input.Mouse.position.y = 0;
if (CORE.Input.Mouse.position.y > CORE.Window.screen.height/CORE.Input.Mouse.scale.y) CORE.Input.Mouse.position.y = CORE.Window.screen.height/CORE.Input.Mouse.scale.y; if (CORE.Input.Mouse.position.y > CORE.Window.screen.height/CORE.Input.Mouse.scale.y) CORE.Input.Mouse.position.y = CORE.Window.screen.height/CORE.Input.Mouse.scale.y;
}
// Gesture update // Gesture update
if (gestureUpdate) if (gestureUpdate)
@ -5743,7 +5769,7 @@ void UWPGestureTouch(int pointer, float x, float y, bool touch)
#endif // PLATFORM_UWP #endif // PLATFORM_UWP
#if defined(PLATFORM_DRM) #if defined(PLATFORM_DRM)
// Search matching DRM mode in connector's mode list
static int FindMatchingConnectorMode(const drmModeConnector *connector, const drmModeModeInfo *mode) static int FindMatchingConnectorMode(const drmModeConnector *connector, const drmModeModeInfo *mode)
{ {
if (NULL == connector) return -1; if (NULL == connector) return -1;
@ -5769,6 +5795,7 @@ static int FindMatchingConnectorMode(const drmModeConnector *connector, const dr
#undef BINCMP #undef BINCMP
} }
// Search exactly matching DRM connector mode in connector's list
static int FindExactConnectorMode(const drmModeConnector *connector, uint width, uint height, uint fps, bool allowInterlaced) { static int FindExactConnectorMode(const drmModeConnector *connector, uint width, uint height, uint fps, bool allowInterlaced) {
TRACELOG(LOG_TRACE, "searching exact connector mode for %ux%u@%u, selecting an interlaced mode is allowed: %s", width, height, fps, allowInterlaced ? "yes" : "no"); TRACELOG(LOG_TRACE, "searching exact connector mode for %ux%u@%u, selecting an interlaced mode is allowed: %s", width, height, fps, allowInterlaced ? "yes" : "no");
@ -5797,6 +5824,7 @@ static int FindExactConnectorMode(const drmModeConnector *connector, uint width,
return -1; return -1;
} }
// Search the nearest matching DRM connector mode in connector's list
static int FindNearestConnectorMode(const drmModeConnector *connector, uint width, uint height, uint fps, bool allowInterlaced) { static int FindNearestConnectorMode(const drmModeConnector *connector, uint width, uint height, uint fps, bool allowInterlaced) {
TRACELOG(LOG_TRACE, "searching nearest connector mode for %ux%u@%u, selecting an interlaced mode is allowed: %s", width, height, fps, allowInterlaced ? "yes" : "no"); TRACELOG(LOG_TRACE, "searching nearest connector mode for %ux%u@%u, selecting an interlaced mode is allowed: %s", width, height, fps, allowInterlaced ? "yes" : "no");
@ -5854,5 +5882,4 @@ static int FindNearestConnectorMode(const drmModeConnector *connector, uint widt
TRACELOG(LOG_TRACE, "returning nearest mode: %d", nearestIndex); TRACELOG(LOG_TRACE, "returning nearest mode: %d", nearestIndex);
return nearestIndex; return nearestIndex;
} }
#endif #endif

View File

@ -617,6 +617,21 @@ typedef enum {
MOUSE_MIDDLE_BUTTON = 2 MOUSE_MIDDLE_BUTTON = 2
} MouseButton; } MouseButton;
// Mouse cursor types
typedef enum {
MOUSE_CURSOR_DEFAULT = 0,
MOUSE_CURSOR_ARROW = 1,
MOUSE_CURSOR_IBEAM = 2,
MOUSE_CURSOR_CROSSHAIR = 3,
MOUSE_CURSOR_POINTING_HAND = 4,
MOUSE_CURSOR_RESIZE_EW = 5, // The horizontal resize/move arrow shape
MOUSE_CURSOR_RESIZE_NS = 6, // The vertical resize/move arrow shape
MOUSE_CURSOR_RESIZE_NWSE = 7, // The top-left to bottom-right diagonal resize/move arrow shape
MOUSE_CURSOR_RESIZE_NESW = 8, // The top-right to bottom-left diagonal resize/move arrow shape
MOUSE_CURSOR_RESIZE_ALL = 9, // The omni-directional resize/move cursor shape
MOUSE_CURSOR_NOT_ALLOWED = 10 // The operation-not-allowed shape
} MouseCursor;
// Gamepad number // Gamepad number
typedef enum { typedef enum {
GAMEPAD_PLAYER1 = 0, GAMEPAD_PLAYER1 = 0,
@ -625,7 +640,7 @@ typedef enum {
GAMEPAD_PLAYER4 = 3 GAMEPAD_PLAYER4 = 3
} GamepadNumber; } GamepadNumber;
// Gamepad Buttons // Gamepad buttons
typedef enum { typedef enum {
// This is here just for error checking // This is here just for error checking
GAMEPAD_BUTTON_UNKNOWN = 0, GAMEPAD_BUTTON_UNKNOWN = 0,
@ -661,6 +676,7 @@ typedef enum {
GAMEPAD_BUTTON_RIGHT_THUMB GAMEPAD_BUTTON_RIGHT_THUMB
} GamepadButton; } GamepadButton;
// Gamepad axis
typedef enum { typedef enum {
// Left stick // Left stick
GAMEPAD_AXIS_LEFT_X = 0, GAMEPAD_AXIS_LEFT_X = 0,
@ -675,7 +691,7 @@ typedef enum {
GAMEPAD_AXIS_RIGHT_TRIGGER = 5 // [1..-1] (pressure-level) GAMEPAD_AXIS_RIGHT_TRIGGER = 5 // [1..-1] (pressure-level)
} GamepadAxis; } GamepadAxis;
// Shader location point type // Shader location points
typedef enum { typedef enum {
LOC_VERTEX_POSITION = 0, LOC_VERTEX_POSITION = 0,
LOC_VERTEX_TEXCOORD01, LOC_VERTEX_TEXCOORD01,
@ -720,7 +736,7 @@ typedef enum {
UNIFORM_SAMPLER2D UNIFORM_SAMPLER2D
} ShaderUniformDataType; } ShaderUniformDataType;
// Material map type // Material maps
typedef enum { typedef enum {
MAP_ALBEDO = 0, // MAP_DIFFUSE MAP_ALBEDO = 0, // MAP_DIFFUSE
MAP_METALNESS = 1, // MAP_SPECULAR MAP_METALNESS = 1, // MAP_SPECULAR
@ -776,7 +792,15 @@ typedef enum {
FILTER_ANISOTROPIC_16X, // Anisotropic filtering 16x FILTER_ANISOTROPIC_16X, // Anisotropic filtering 16x
} TextureFilterMode; } TextureFilterMode;
// Cubemap layout type // Texture parameters: wrap mode
typedef enum {
WRAP_REPEAT = 0, // Repeats texture in tiled mode
WRAP_CLAMP, // Clamps texture to edge pixel in tiled mode
WRAP_MIRROR_REPEAT, // Mirrors and repeats the texture in tiled mode
WRAP_MIRROR_CLAMP // Mirrors and clamps to border the texture in tiled mode
} TextureWrapMode;
// Cubemap layouts
typedef enum { typedef enum {
CUBEMAP_AUTO_DETECT = 0, // Automatically detect layout type CUBEMAP_AUTO_DETECT = 0, // Automatically detect layout type
CUBEMAP_LINE_VERTICAL, // Layout is defined by a vertical line with faces CUBEMAP_LINE_VERTICAL, // Layout is defined by a vertical line with faces
@ -786,14 +810,6 @@ typedef enum {
CUBEMAP_PANORAMA // Layout is defined by a panorama image (equirectangular map) CUBEMAP_PANORAMA // Layout is defined by a panorama image (equirectangular map)
} CubemapLayoutType; } CubemapLayoutType;
// Texture parameters: wrap mode
typedef enum {
WRAP_REPEAT = 0, // Repeats texture in tiled mode
WRAP_CLAMP, // Clamps texture to edge pixel in tiled mode
WRAP_MIRROR_REPEAT, // Mirrors and repeats the texture in tiled mode
WRAP_MIRROR_CLAMP // Mirrors and clamps to border the texture in tiled mode
} TextureWrapMode;
// Font type, defines generation method // Font type, defines generation method
typedef enum { typedef enum {
FONT_DEFAULT = 0, // Default font generation, anti-aliased FONT_DEFAULT = 0, // Default font generation, anti-aliased
@ -842,7 +858,7 @@ typedef enum {
CAMERA_ORTHOGRAPHIC CAMERA_ORTHOGRAPHIC
} CameraType; } CameraType;
// Type of n-patch // N-patch types
typedef enum { typedef enum {
NPT_9PATCH = 0, // Npatch defined by 3x3 tiles NPT_9PATCH = 0, // Npatch defined by 3x3 tiles
NPT_3PATCH_VERTICAL, // Npatch defined by 1x3 tiles NPT_3PATCH_VERTICAL, // Npatch defined by 1x3 tiles
@ -883,6 +899,7 @@ RLAPI void DecorateWindow(void); // Decorate th
RLAPI void UndecorateWindow(void); // Undecorate the window (only PLATFORM_DESKTOP) RLAPI void UndecorateWindow(void); // Undecorate the window (only PLATFORM_DESKTOP)
RLAPI void MaximizeWindow(void); // Maximize the window, if resizable (only PLATFORM_DESKTOP) RLAPI void MaximizeWindow(void); // Maximize the window, if resizable (only PLATFORM_DESKTOP)
RLAPI void RestoreWindow(void); // Restore the window, if resizable (only PLATFORM_DESKTOP) RLAPI void RestoreWindow(void); // Restore the window, if resizable (only PLATFORM_DESKTOP)
RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP) RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP)
RLAPI void SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP) RLAPI void SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP)
RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP) RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
@ -901,8 +918,8 @@ RLAPI int GetMonitorRefreshRate(int monitor); // Get primary
RLAPI Vector2 GetWindowPosition(void); // Get window position XY on monitor RLAPI Vector2 GetWindowPosition(void); // Get window position XY on monitor
RLAPI Vector2 GetWindowScaleDPI(void); // Get window scale DPI factor RLAPI Vector2 GetWindowScaleDPI(void); // Get window scale DPI factor
RLAPI const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the primary monitor RLAPI const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the primary monitor
RLAPI const char *GetClipboardText(void); // Get clipboard text content
RLAPI void SetClipboardText(const char *text); // Set clipboard text content RLAPI void SetClipboardText(const char *text); // Set clipboard text content
RLAPI const char *GetClipboardText(void); // Get clipboard text content
// Cursor-related functions // Cursor-related functions
RLAPI void ShowCursor(void); // Shows cursor RLAPI void ShowCursor(void); // Shows cursor
@ -942,10 +959,12 @@ RLAPI double GetTime(void); // Returns ela
// Misc. functions // Misc. functions
RLAPI void SetConfigFlags(unsigned int flags); // Setup window configuration flags (view FLAGS) RLAPI void SetConfigFlags(unsigned int flags); // Setup window configuration flags (view FLAGS)
RLAPI void SetTraceLogLevel(int logType); // Set the current threshold (minimum) log level RLAPI void SetTraceLogLevel(int logType); // Set the current threshold (minimum) log level
RLAPI void SetTraceLogExit(int logType); // Set the exit threshold (minimum) log level RLAPI void SetTraceLogExit(int logType); // Set the exit threshold (minimum) log level
RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set a trace log callback to enable custom logging RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set a trace log callback to enable custom logging
RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR) RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR)
RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png) RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png)
RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included) RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included)
@ -1016,6 +1035,8 @@ RLAPI void SetMousePosition(int x, int y); // Set mouse posit
RLAPI void SetMouseOffset(int offsetX, int offsetY); // Set mouse offset RLAPI void SetMouseOffset(int offsetX, int offsetY); // Set mouse offset
RLAPI void SetMouseScale(float scaleX, float scaleY); // Set mouse scaling RLAPI void SetMouseScale(float scaleX, float scaleY); // Set mouse scaling
RLAPI float GetMouseWheelMove(void); // Returns mouse wheel movement Y RLAPI float GetMouseWheelMove(void); // Returns mouse wheel movement Y
RLAPI int GetMouseCursor(void); // Returns mouse cursor if (MouseCursor enum)
RLAPI void SetMouseCursor(int cursor); // Set mouse cursor
// Input-related functions: touch // Input-related functions: touch
RLAPI int GetTouchX(void); // Returns touch position X for touch point 0 (relative to screen size) RLAPI int GetTouchX(void); // Returns touch position X for touch point 0 (relative to screen size)