* 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