* win32 backend
* [rcore][win32] use SwapBuffers instead of wglSwapLayerBuffers
I don't understand OpenGL well enough to know the difference between
SwapBuffers and wglSwapLayerBuffers but the former seems to double
my FPS (from 2000 to about 4000 in core_vr_simulator).
* [rcore][win32] stop lying to the OS about when our window is updated
Instead of calling BeginPaint/EndPaint in WM_PAINT which signals to the
OS that our window content is updated, now when we encounter the WM_PAINT
message instead we return back to the raylib application which will
trigger it to render a new frame. We've replaced the call to BeginPaint
and EndPaint with a call to ValidateRect in SwapBuffers, which, means
we're now correctly telling the OS when our window content is actually
up-to-date.
Note that this doesn't fix the window content not being updated during
a window resize/move beacuse thos have their own message loop which
doesn't return early when it's time to paint.
* [rcore][win32] fallback to finding functions from opengl32.dll
* [rcore][win32] fixes from review/for gcc
* [rcore][win32] incorporate style conventions
* [rcore][win32] workaround unused function error SetupFramebuffer
* [rcore][win32] re-enable sanitize flags check for MSAA_4X
* [rcore][win32] more style changes and remove old DPI cases
Added some more missing spaces after conditional statements. Also
made unsupported MSAA_4X an assert instead of an abort and also
removed dpi-aware cases for older OS's. More changes would be needed
to support those OS versions, namely, removing the dependency
on shcore.
* [rcore][win32] fixes for compling with w64devkit without -DUNICODE
* Update build.zig
* Update build.zig
---------
Co-authored-by: Ray <raysan5@gmail.com>
Fixes a regression since 5.5, where `ScanDirectoryFilesRecursively` no
longer does the "recursively" part due to `path` being `static`.
The issue was once already fixed in
5530a3ceb8
but recently made it back it in.
InitWindow() prints CWD during initialization,
but ChangeDirectory() does not, which is quite confusing when you start
messing with CWD. Now said function should log similar message.
* [rcore] fix crash in InitWindow, due to unchecked result of InitPlatform
Check the result of InitPlatform(), if it isn't 0, report the Error
and return. This prevent crashes and allows for gracefully aborting
or recovering by checking IsWindowReady().
Partially-fixes: https://github.com/raysan5/raylib/issues/4801
* [rcore] style: store the result of InitPlatform() before checking it
Small style change that doesn't impact how the code behaves here.
Variable 'result' is not used anywhere else in this block,
it's just for compliance with Raylib's coding conventions.
Requested in PR: https://github.com/raysan5/raylib/pull/4803#discussion_r1976502788
* [rcore] use LOG_WARNING when InitPlatform() fails
...as this is preferred over LOG_ERROR.
Requested-by: https://github.com/raysan5/raylib/pull/4803#discussion_r1976651724