When using the multview / docking feature of dear imgui (availible on the main repo in the docking branch) dear imgui will use desktop relative coordinates instead of window relative. This causing the rendering to get "offseted" if not handled correctly.
Before this change the rendering matrix wasn't used at all and this has now been changed in the vertex shader.
Notice this change is fully backwards compatible with the relative windows as well as the upper left corner will always be set to 0,0 in that case thus this change will work with both versions.
I also added some changes to skip rendering if not needed (based on the the other backend implementations for dear imgui such as the OpenGL one)
* fix mip level computation for asmjs and add support for srgb textures in es2/webgl
* fix BX_TRACE in glcontext_html5.cpp
* fix wrong logic in texture validation
Co-authored-by: Sebastian Marketsmueller <sebastianm@hq.unity3d.com>
Co-authored-by: Vladimir Vukicevic <vladimir@pobox.com>
* Cleanup
* Request host-cached memory for readback
* Request device-visible memory for the uniform buffer
* Use more fine-grained image memory barrier stages
* Don't rebind vertex and index buffers if not necessary
* Timer queries
* Don't transition images during a renderpass
* Cache descriptor sets
* Trigger RenderDoc capture if requested
* Fix invalid command buffer after surface recreation
* Perform clear and blit before compute
* Use init.debug to enable validation layers
...instead of always enabling them in debug config
* Only resolve framebuffer once
* Report number of primitives without index buffer
* Minimize state changes
* Occlusion queries
* Transition swapchain image from undefined layout
* Make sure we have a combined graphics and compute queue family
Existing code already makes that assumption, otherwise we'd need different command queues and explicit resource queue transitions. The spec also guarantees that a device with such a queue family should exist.
* Release cached image views on texture destruction
* Fix stencil-only clear
* Fix non-zero integer format clear
* Annotate all optional functions with their extensions
* Support for BGFX_SAMPLER_SAMPLE_STENCIL
* Remove unused extension functions
* Support for BGFX_SAMPLER_BORDER_COLOR
* Undo descriptor set cache
Try this again in another PR... the hashing doesn't quite work with some bind combinations, and the cache needs a better eviction strategy
* Don't start renderpass for empty draw calls
* Advertize graphics debugger, if present
ie. RenderDoc
* Cleanup
* Only enable required features and extensions
* Don't spam warning about swapchain format fallback
* Cleanup
* Cleanup
* Request host-cached memory for readback
* Request device-visible memory for the uniform buffer
* Use more fine-grained image memory barrier stages
* Don't rebind vertex and index buffers if not necessary
* Timer queries
* Don't transition images during a renderpass
* Cache descriptor sets
* Trigger RenderDoc capture if requested
* Fix invalid command buffer after surface recreation
* Perform clear and blit before compute
* Use init.debug to enable validation layers
...instead of always enabling them in debug config
* Only resolve framebuffer once
* Report number of primitives without index buffer
* Minimize state changes
* Occlusion queries
* Transition swapchain image from undefined layout
* Make sure we have a combined graphics and compute queue family
Existing code already makes that assumption, otherwise we'd need different command queues and explicit resource queue transitions. The spec also guarantees that a device with such a queue family should exist.
* Release cached image views on texture destruction
* Fix stencil-only clear
* Fix non-zero integer format clear
* Annotate all optional functions with their extensions
* Support for BGFX_SAMPLER_SAMPLE_STENCIL
* Remove unused extension functions
* Support for BGFX_SAMPLER_BORDER_COLOR
* Undo descriptor set cache
Try this again in another PR... the hashing doesn't quite work with some bind combinations, and the cache needs a better eviction strategy
* Don't start renderpass for empty draw calls
* Advertize graphics debugger, if present
ie. RenderDoc
* Cleanup
* Only enable required features and extensions
* Don't spam warning about swapchain format fallback
* Cleanup