Found via `codespell -q 3 -S "./3rdparty,*.ttf,*.bin,./examples/common/imgui,./examples/common/font" -L attribut,ba,clude,conly,constan,espace,hashin,indext,inout,lod,nclude,retur,ser,sroll,struc,te,truct,unknwn,usin,utput,varyin`
* Support both X11 and Wayland in the same build.
- Works for both Vulkan and OpenGL.
- Remove --with-wayland from genie options.
- Vulkan loads all three extensions for surface creation instead of only one.
- Add width and height parameter to GlContext::createSwapChain(), which is needed for EGL to create
a SwapChain with the given window size.
- Dirty-fix the example-22-windows to recreate the FrameBuffer by first destroying and then
recreating to make sure the window is released of its swapchain.
- Fix dbgText glitch in example-22-windows.
- Remove old X11-related dependencies for GLFW3.
* Formatting.
SDL2's concept of GameController is a like a PS or Xbox controller, two sticks, four face buttons, etc. These are the same as the bgfx example's Gamepad.
SDL also has a concept of Joystick, which could be anything, like a flight stick. Game Controllers are implemented by these lower level joystick's.
Entry SDL gets duplicate events, for both controller and the joystick implementing it. Game controller buttons are remapped to bgfx gamepad, but joystick buttons are not. This causes incorrect button presses.
Additionally, the joystick z axis behaves differently than game controller or bgfx gamepad. With at-rest value being negative, not zero.
Due to all of this, it seems like the best approach would be to ignore joystick events and only handle game controller events.
Also, minor additional fix to get handle's index when using it as array index. Fixes compilation in Visual Studio.
Fixes possible concurrency issue - makes code usable in a multithreaded environment. imageReleasCb releases imageContainer after bgfx::createTexture...() is called. If bgfx::frame() is called from another thread, the release can happen before imageContainer is used in bgfx::calcTextureSize(), leading to a crash. Although loadTexture() is not used in multithreaded environment in the examples, calling bgfx::calcTextureSize() before bgfx::createTexture...() is a better reference for users.
Kerning is now also scaled with the scaled child font when using SDF fonts. In examples/common/font_manager.cpp kerning was visibly off when scaling SDF font down.
* Allow simultaneous X11 and Wayland support
* Add NativeWindowHandleType
* Set default value for g_platformData.type
* Use g_platformData.type to check for a native Wayland window
* Stub getNativeWindowHandleType on platform where Wayland is not an option
* Implement getNativeWindowHandleType for GLFW
* Add getNativeWindowHandleType to the remaining C++ examples
* Add getNativeWindowHandleType to the C example
* Fix compiler warnings for nanovg wrapper
Code for the nanovg wrapper was generating compiler warnings for
implicit casts from int32_t to uint16_t. These casts are unavoidable
due to how bgfx and nanovg APIs use different types for texture
width/height.
* Fix compiler warning from nanovg fontstash.h
This fixes some warnings for signed/unsigned comparsion
coming from the nanovg fontstash.h header.
The nvgCreateBgfxTexture() helper function is already implemented in
the nanovg wrapper library, so its useful to expose this function
to the user.
Also expose the NVG_IMAGE_NODELETE flag so this can be passed to the
nvgCreateBgfxTexture() function, to indicate that the caller retains
ownership of the bgfx texture.