mirror of
https://github.com/raysan5/raylib.git
synced 2026-11-25 09:01:47 -05:00
Compare commits
6 Commits
2009f5bb6b
...
e1ffd29026
| Author | SHA1 | Date | |
|---|---|---|---|
| e1ffd29026 | |||
| 68da77adc9 | |||
| 62d9b3eec3 | |||
| cc4430cd1a | |||
| 9fc85a8bb2 | |||
| d9f24c8251 |
10
CHANGELOG
10
CHANGELOG
@ -1,18 +1,16 @@
|
||||
changelog
|
||||
---------
|
||||
|
||||
Current Release: raylib 6.0 (23 April 2026)
|
||||
Current Release: raylib 6.2 (15 October 2026)
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
Release: raylib 6.2 (15 Oct 2026)
|
||||
Release: raylib 6.2 (15 October 2026)
|
||||
-------------------------------------------------------------------------
|
||||
KEY CHANGES:
|
||||
- Code gardening: Many consistency and formating changes all around
|
||||
- REDESIGNED: Image API for more alignment with Texture API
|
||||
- REDESIGNED: File API for more standard return result values
|
||||
- REVIEWED: Shapes lines drawing functions, added new ones and unify behaviour
|
||||
- REDESIGNED: Image drawing API more aligned with screen drawing API
|
||||
- REDESIGNED: File API using more standard return result values
|
||||
- REVIEWED: Multiple security concerns reported by ROS (Radically Open Security)
|
||||
- REVIEWED: New Win32 backend, many improvements and additions
|
||||
|
||||
Detailed changes:
|
||||
|
||||
|
||||
90
HISTORY.md
90
HISTORY.md
@ -602,3 +602,93 @@ Finally, I want to thank [puffer.ai](https://puffer.ai/) and [comma.ai](https://
|
||||
**After +12 years of development, `raylib 6.0` is today one of the bests libraries to enjoy games/tools/graphics programming!**
|
||||
|
||||
**Enjoy graphics programming with raylib!** :)
|
||||
|
||||
|
||||
notes on raylib 6.2
|
||||
-------------------
|
||||
|
||||
After almost 6 months since latest raylib release, here it is a new installment of the library. It was supposed to b just a patch version to address an issue with CMake build system but it took way longer than expected and included +300 changes and improvements.
|
||||
|
||||
Some numbers for this release:
|
||||
|
||||
- **~100** closed issues (for a TOTAL of **+2240**!)
|
||||
- **+500** commits since previous RELEASE (for a TOTAL of **+10280**!)
|
||||
- **+20** new functions ADDED to raylib API (for a TOTAL of **619**!)
|
||||
- **+10** new examples to learn from (for a TOTAL of **+225**!)
|
||||
- **+100** new contributors (for a TOTAL of **+950**!)
|
||||
|
||||
Highlights for `raylib 6.2`:
|
||||
|
||||
- **Code gardening**: A lot of work has been done to improve small library details, for consistency and coherence. Many comments have been reviewed, some function parameters have been renamed with more clear naming, some pointers reviewed for const-correctness, functions reordered in the API for more clarity and also several functions have been completely redesigned.
|
||||
|
||||
- **REDESIGNED: Image drawing API more alignment with Screen drawing API**: Image API has been reviewed to be aligned with Texture API, now most Texture-based functions (GPU accelerated) have a counter-part to work over Image structures (CPU), also following same parameters order. All the following functions are equivalent:
|
||||
|
||||
| Module | Screen draw (GPU accelerated) | Image draw (CPU software rendering) |
|
||||
| -------- | ----------------------------- | -------------------------------- |
|
||||
| `rshapes` | `DrawPixel()` | `ImageDrawPixel()` |
|
||||
| `rshapes` | `DrawPixelV()` | `ImageDrawPixelV()` |
|
||||
| `rshapes` | `DrawLine()` | `ImageDrawLine()` |
|
||||
| `rshapes` | `DrawLineV()` | `ImageDrawLineV()` |
|
||||
| `rshapes` | `DrawLineEx()` | `ImageDrawLineEx()` |
|
||||
| `rshapes` | `DrawLineStrip()` | `ImageDrawLineStrip()` |
|
||||
| `rshapes` | `DrawLineBezier()` | - |
|
||||
| `rshapes` | `DrawTriangle()` | `ImageDrawTriangle()` |
|
||||
| `rshapes` | `DrawTriangleGradient()` | `ImageDrawTriangleGradient()` |
|
||||
| `rshapes` | `DrawTriangleLines()` | `ImageDrawTriangleLines()` |
|
||||
| `rshapes` | `DrawTriangleLinesEx()` | - |
|
||||
| `rshapes` | `DrawTriangleFan()` | `ImageDrawTriangleFan()` |
|
||||
| `rshapes` | `DrawTriangleStrip()` | `ImageDrawTriangleStrip()` |
|
||||
| `rshapes` | `DrawRectangle()` | `ImageDrawRectangle()` |
|
||||
| `rshapes` | `DrawRectangleV()` | `ImageDrawRectangleV()` |
|
||||
| `rshapes` | `DrawRectangleRec()` | `ImageDrawRectangleRec()` |
|
||||
| `rshapes` | `DrawRectanglePro()` | `ImageDrawRectanglePro()` |
|
||||
| `rshapes` | `DrawRectangleLines()` | `ImageDrawRectangleLines()` |
|
||||
| `rshapes` | `DrawRectangleLinesEx()` | `ImageDrawRectangleLinesEx()` |
|
||||
| `rshapes` | `DrawRectangleGradientV()` | - |
|
||||
| `rshapes` | `DrawRectangleGradientH()` | - |
|
||||
| `rshapes` | `DrawRectangleGradientEx()` | `ImageDrawRectangleGradientEx()` |
|
||||
| `rshapes` | `DrawRectangleRounded()` | - |
|
||||
| `rshapes` | `DrawRectangleRoundedLines()` | - |
|
||||
| `rshapes` | `DrawRectangleRoundedLinesEx()` | - |
|
||||
| `rshapes` | `DrawCircle()` | `ImageDrawCircle()` |
|
||||
| `rshapes` | `DrawCircleV()` | `ImageDrawCircleV()` |
|
||||
| `rshapes` | `DrawCircleSector()` | - |
|
||||
| `rshapes` | `DrawCircleLines()` | `ImageDrawCircleLines()` |
|
||||
| `rshapes` | `DrawCircleLinesV()` | `ImageDrawCircleLinesV()` |
|
||||
| `rshapes` | `DrawCircleLinesEx()` | - |
|
||||
| `rshapes` | `DrawCircleGradient()` | `ImageDrawCircleGradient()` |
|
||||
| `rshapes` | `DrawEllipse()` | - |
|
||||
| `rshapes` | `DrawEllipseLines()` | - |
|
||||
| `rshapes` | `DrawRing()` | - |
|
||||
| `rshapes` | `DrawRingLines()` | - |
|
||||
| `rshapes` | `DrawPoly()` | - |
|
||||
| `rshapes` | `DrawPolyLines()` | - |
|
||||
| `rshapes` | `DrawPolyLinesEx()` | - |
|
||||
| `rtextures` | `DrawTexture()` | `ImageDrawImage()` |
|
||||
| `rtextures` | `DrawTextureV()` | - |
|
||||
| `rtextures` | `DrawTextureEx()` | `ImageDrawImageEx()` |
|
||||
| `rtextures` | `DrawTextureRec()` | `ImageDrawImageRec()` |
|
||||
| `rtextures` | `DrawTexturePro()` | `ImageDrawImagePro()` |
|
||||
| `rtextures` | `DrawTextureNPatch()` | - |
|
||||
| `rtextures` | `DrawTextureTiled()` | - |
|
||||
| `rtext` | `DrawText()` | `ImageDrawText()` |
|
||||
| `rtext` | `DrawTextEx()` | `ImageDrawTextEx()` |
|
||||
| `rtext` | `DrawTextPro()` | `ImageDrawTextPro()` |
|
||||
| `rtext` | `DrawTextCodepoint()` | - |
|
||||
| `rtext` | `DrawTextCodepoints()` | - |
|
||||
|
||||
_NOTE: All `ImageDraw*()` functions require an `Image` pointer to draw to as first parameter: `ImageDrawImage(Image *target, ...)`_
|
||||
|
||||
This API alignment could allow in the future faster 2D software rendering over an `Image` buffer, as an alternative to the already included `rlsw` Software Renderer that implements a pseudo-OpenGL 1.1 pipeline.
|
||||
|
||||
- **REDESIGNED: File API using more standard return result values**: File API return values have been unified to follow C conventions, returning 0 if everything worked as expected and other values for potential issues on the file processes.
|
||||
|
||||
- **REVIEWED: Multiple security concerns reported by ROS (Radically Open Security)**: Recently raylib went through a professional security audit by Radically Open Security, most of the reported security concerns have been addressed.
|
||||
|
||||
Make sure to check raylib [CHANGELOG](https://github.com/raysan5/raylib/blob/master/CHANGELOG) for a detailed list of changes!
|
||||
|
||||
Again, I want to **thank all the contributors (+950!**) that helped improving raylib, this time there have been **more than 100 new contributors** sending fixes and improvements!
|
||||
|
||||
After 13 years of development, `raylib 6.2` is today probably one of the bests libraries to enjoy **games/tools/graphics/AI programming!**
|
||||
|
||||
**Hope you keep enjoying programming with raylib!** :)
|
||||
|
||||
@ -1668,17 +1668,17 @@ int InitPlatform(void)
|
||||
if (CORE.Window.screen.width == 0) CORE.Window.screen.width = 1;
|
||||
if (CORE.Window.screen.height == 0) CORE.Window.screen.height = 1;
|
||||
|
||||
unsigned int workX = 0;
|
||||
unsigned int workY = 0;
|
||||
unsigned int workWidth = 0;
|
||||
unsigned int workHeight = 0;
|
||||
int workX = 0;
|
||||
int workY = 0;
|
||||
int workWidth = 0;
|
||||
int workHeight = 0;
|
||||
glfwGetMonitorWorkarea(monitor, &workX, &workY, &workWidth, &workHeight);
|
||||
|
||||
// If the area requested by the user exceeds the maximum workable area, clamp it to that
|
||||
// GLFW has a problem where if the window is greater than the workable area (this means
|
||||
// the taskbar / dockable areas) it won't show up if the window isn't fullscreen
|
||||
if (CORE.Window.screen.width > workWidth) CORE.Window.screen.width = workWidth;
|
||||
if (CORE.Window.screen.height > workHeight) CORE.Window.screen.height = workHeight;
|
||||
if (CORE.Window.screen.width > (unsigned int)workWidth) CORE.Window.screen.width = workWidth;
|
||||
if (CORE.Window.screen.height > (unsigned int)workHeight) CORE.Window.screen.height = workHeight;
|
||||
|
||||
platform.handle = glfwCreateWindow(CORE.Window.screen.width, CORE.Window.screen.height, (CORE.Window.title != 0)? CORE.Window.title : " ", NULL, NULL);
|
||||
if (!platform.handle)
|
||||
|
||||
@ -5225,6 +5225,8 @@ static int rlGetPixelDataSize(int width, int height, int format)
|
||||
{
|
||||
int dataSize = 0; // Size in bytes
|
||||
int bpp = 0; // Bits per pixel
|
||||
|
||||
if ((width <= 0) || (height <= 0)) return dataSize;
|
||||
|
||||
switch (format)
|
||||
{
|
||||
@ -5282,10 +5284,9 @@ static int rlGetPixelDataSize(int width, int height, int format)
|
||||
{
|
||||
unsigned long long dataSizeBytes = ((unsigned long long)width*height*bpp) >> 3; // Get size in bytes (dividing by 8)
|
||||
if (dataSizeBytes < INT_MAX) dataSize = (int)dataSizeBytes;
|
||||
else TRACELOG(LOG_WARNING, "Requested image size is larger than 2GB, it can not be allocated");
|
||||
}
|
||||
|
||||
if (dataSize == 0) TRACELOG(LOG_WARNING, "Requested image size is larger than 2GB, it can not be allocated");
|
||||
|
||||
return dataSize;
|
||||
}
|
||||
|
||||
|
||||
@ -5710,6 +5710,12 @@ int GetPixelDataSize(int width, int height, int format)
|
||||
{
|
||||
int dataSize = 0; // Size in bytes
|
||||
int bpp = 0; // Bits per pixel
|
||||
|
||||
if ((width <= 0) || (height <= 0)) return dataSize;
|
||||
|
||||
// TODO: Use rlGetPixelDataSize() directly instead of custom implementation?
|
||||
// WARNING: raylib pixel format enum must be aligned with rlgl pixel format
|
||||
//dataSize = rlGetPixelDataSize(width, height, format);
|
||||
|
||||
switch (format)
|
||||
{
|
||||
@ -5754,9 +5760,11 @@ int GetPixelDataSize(int width, int height, int format)
|
||||
else if ((format >= PIXELFORMAT_COMPRESSED_DXT3_RGBA) && (format < PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA)) dataSize = 16;
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: In case required image data larger than 2GB, no memory allocated at all (NULL)
|
||||
if (dataSize == 0) TRACELOG(LOG_WARNING, "Requested image size is larger than 2GB, it can not be allocated");
|
||||
else
|
||||
{
|
||||
// NOTE: In case required image data larger than 2GB, no memory allocated at all (NULL)
|
||||
TRACELOG(LOG_WARNING, "Requested image size is larger than 2GB, it can not be allocated");
|
||||
}
|
||||
|
||||
return dataSize;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user