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.
* Pass Meta key modifier to ImGui
* Use index offset provided by ImGui
* Use vertex offset provided by ImGui
We need to tell ImGui we can support per-draw vertex offsets. Useful for
complex widgets like implot.