mirror of
https://github.com/raysan5/raylib.git
synced 2026-10-10 19:51:55 -04:00
Compare commits
2 Commits
8571d445e9
...
607a659363
| Author | SHA1 | Date | |
|---|---|---|---|
| 607a659363 | |||
| 040a4bafa9 |
@ -17,7 +17,7 @@ Detailed changes (until 12-Sept-2026):
|
||||
[rcore] ADDED: `IsPathAbsolute()`, check absolute paths by @raysan5
|
||||
[rcore] ADDED: `IsFileHidden()`, check file hidden (OS-dependant) by @raysan5
|
||||
[rcore] REVIEWED: `File*()` functions for consistent return result value by @raysan5 -WARNING-
|
||||
[rcore] REVIEWED: Not updating mouse.previousPosition when `SeMousePosition()` #5962 by @raysan5 -WARNING-
|
||||
[rcore] REVIEWED: Not updating mouse.previousPosition when `SetMousePosition()` #5962 by @raysan5 -WARNING-
|
||||
[rcore] REVIEWED: Use `rlgl` provided interface instead of `rlsw` direct access by @raysan5
|
||||
[rcore] REVIEWED: Set mouse position to (0,0) when mouse leaves window area #5945 by @raysan5
|
||||
[rcore] REVIEWED: Multiple string boundary handling (#5812) by @zhaob1n
|
||||
@ -26,7 +26,7 @@ Detailed changes (until 12-Sept-2026):
|
||||
[rcore] REVIEWED: Fix initial macOS window size (#5967) by @loukamb
|
||||
[rcore] REVIEWED: Fix clipboard image memory leak (#5968) by @LuisR385
|
||||
[rcore] REVIEWED: `TakeScreenshot()`, support absolute paths by @raysan5
|
||||
[rcore] REVIEWED: `OpenURL()`, added some safety checks to mitigate malicious url inputs - ROS: `CLN-002 by @raysan5 -WARNING-
|
||||
[rcore] REVIEWED: `OpenURL()`, added some safety checks to mitigate malicious url inputs - ROS: `CLN-002` by @raysan5 -WARNING-
|
||||
[rcore] REVIEWED: `LoadAutomationEventList()` - ROS: `CLN-005`, `CLN-006` by @raysan5
|
||||
[rcore] REVIEWED: `GetWindowHandle()`, to be consistent between backends, fix #5885 by @raysan5
|
||||
[rcore] REVIEWED: `GetWindowPosition()` #5932 by @raysan5
|
||||
|
||||
@ -1448,9 +1448,11 @@ HGLRC InitOpenGL(HWND hwnd, HDC hdc)
|
||||
wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB");
|
||||
|
||||
// Setup modern pixel format if extension is available
|
||||
bool selectedModernPixelFormat = false;
|
||||
BOOL setPixelFormatSucceeded = FALSE;
|
||||
if (wglChoosePixelFormatARB)
|
||||
{
|
||||
bool useMSAA = FLAG_IS_SET(CORE.Window.flags, FLAG_MSAA_4X_HINT);
|
||||
|
||||
int pixelFormatAttribs[] = {
|
||||
WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB,
|
||||
WGL_DRAW_TO_WINDOW_ARB, GL_TRUE,
|
||||
@ -1464,6 +1466,8 @@ HGLRC InitOpenGL(HWND hwnd, HDC hdc)
|
||||
WGL_ALPHA_BITS_ARB, 8,
|
||||
WGL_DEPTH_BITS_ARB, 24,
|
||||
WGL_STENCIL_BITS_ARB, 8,
|
||||
WGL_SAMPLES_ARB, (useMSAA)? 4 : 0,
|
||||
WGL_SAMPLE_BUFFERS_ARB, (int)useMSAA,
|
||||
0 // Terminator
|
||||
};
|
||||
|
||||
@ -1473,16 +1477,24 @@ HGLRC InitOpenGL(HWND hwnd, HDC hdc)
|
||||
{
|
||||
PIXELFORMATDESCRIPTOR newPixelFormatDescriptor = { 0 };
|
||||
DescribePixelFormat(hdc, format, sizeof(newPixelFormatDescriptor), &newPixelFormatDescriptor);
|
||||
BOOL success = SetPixelFormat(hdc, format, &newPixelFormatDescriptor);
|
||||
selectedModernPixelFormat = (success == TRUE);
|
||||
setPixelFormatSucceeded = SetPixelFormat(hdc, format, &newPixelFormatDescriptor);
|
||||
}
|
||||
}
|
||||
|
||||
if (!selectedModernPixelFormat)
|
||||
if (!setPixelFormatSucceeded)
|
||||
{
|
||||
// If modern pixel format selection failed, fall back to old SetPixelFormat
|
||||
int pixelFormat = ChoosePixelFormat(hdc, &pixelFormatDesc);
|
||||
SetPixelFormat(hdc, pixelFormat, &pixelFormatDesc);
|
||||
setPixelFormatSucceeded = SetPixelFormat(hdc, pixelFormat, &pixelFormatDesc);
|
||||
|
||||
if (setPixelFormatSucceeded)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "WGL: Using legacy pixel format, MSAA not available");
|
||||
}
|
||||
else
|
||||
{
|
||||
TRACELOG(LOG_ERROR, "WGL: Unable to find a suitable pixel format with this graphics driver");
|
||||
}
|
||||
}
|
||||
|
||||
// Create real modern OpenGL context (3.3 core)
|
||||
|
||||
Reference in New Issue
Block a user