bgfx/examples/common/imgui
Matthew Endsley 1e604e8f38 VR: Add device resolution to HMD. Init at startup.
BREAKING: bgfx::getHMD() now returns a valid pointer
if the VR runtime was initialized. This is different
from existing behavior where getHMD returned NULL until
a bgfx::reset(... BGFX_RESET_HMD) was issued. Applications
must now check HMD::flags for the current state of the VR
runtime. The following code has the code change required:

`const bgfx::HMD* hmd = bgfx::getHMD()
if (NULL != hmd)`
becomes:
`const bgfx::HMD* hmd = bgfx::getHMD()
if (NULL != hmd && 0 != (hmd->flags & BGFX_HMD_RENDRERING))
{
	// rendering logic
}`

See the updated examples for details.

This allows applications to create the appropriately
sized back buffer for the HMD device by using the new device
resolution fields HMD::deviceHeight and HMD::deviceWidth.
These values report the pixel resolution of the attached
HMD hardware.

This also allows applications to query the reported HMD
resolution immediately after bgfx::init. This prevents
the device from being cycled which generates rendring
artifacts on startup - namely flashing back to a black
screen and reseting the Health+Warning disaply.

This involves initialization the ovrHmd device on
initialization, but deferring rendering until
postReset has been called. This adds an addiional
memory overhead of 32k to builds defining BGFX_CONFIG_USE_OVR.
The overhead for current builds is ~1.9MB for calls to
ovr_Initialize, so the additional overhead is pretty
trivial (+1.8%)
2015-06-03 15:39:09 -07:00
..
droidsans.ttf.h Added embedded font to imgui. 2015-01-23 23:02:56 -08:00
fs_imgui_color.bin.h Refactored uniform types. 2015-05-28 15:27:00 -07:00
fs_imgui_color.sc Updated copyright year. 2015-01-02 14:43:11 -08:00
fs_imgui_cubemap.bin.h Refactored uniform types. 2015-05-28 15:27:00 -07:00
fs_imgui_cubemap.sc Updated copyright year. 2015-01-02 14:43:11 -08:00
fs_imgui_image.bin.h Refactored uniform types. 2015-05-28 15:27:00 -07:00
fs_imgui_image.sc Making imguiImageChannel properly handle newly introduced _enabled parameter. 2014-11-22 20:26:34 +01:00
fs_imgui_image_swizz.bin.h Refactored uniform types. 2015-05-28 15:27:00 -07:00
fs_imgui_image_swizz.sc Making imguiImageChannel properly handle newly introduced _enabled parameter. 2014-11-22 20:26:34 +01:00
fs_imgui_latlong.bin.h Refactored uniform types. 2015-05-28 15:27:00 -07:00
fs_imgui_latlong.sc Rotated latlong preview by 90 deg. 2015-02-23 20:52:54 +01:00
fs_imgui_texture.bin.h Refactored uniform types. 2015-05-28 15:27:00 -07:00
fs_imgui_texture.sc Updated copyright year. 2015-01-02 14:43:11 -08:00
fs_ocornut_imgui.bin.h Refactored uniform types. 2015-05-28 15:27:00 -07:00
fs_ocornut_imgui.sc Added embedded font to imgui. 2015-01-23 23:02:56 -08:00
imgui.cpp VR: Add device resolution to HMD. Init at startup. 2015-06-03 15:39:09 -07:00
imgui.h Added texture handle passing to ocornut-imgui. 2015-04-23 17:14:29 -07:00
makefile Updated shaders. 2015-04-02 10:49:41 -07:00
ocornut_imgui.cpp Fixed imgui font pixel center. 2015-06-03 14:38:00 -07:00
ocornut_imgui.h Added custom allocator to imgui. 2015-04-15 20:00:15 -07:00
varying.def.sc Added imguiCube(). 2014-10-03 05:32:22 +02:00
vs_imgui_color.bin.h Refactored uniform types. 2015-05-28 15:27:00 -07:00
vs_imgui_color.sc Updated copyright year. 2015-01-02 14:43:11 -08:00
vs_imgui_cubemap.bin.h Refactored uniform types. 2015-05-28 15:27:00 -07:00
vs_imgui_cubemap.sc Updated copyright year. 2015-01-02 14:43:11 -08:00
vs_imgui_image.bin.h Refactored uniform types. 2015-05-28 15:27:00 -07:00
vs_imgui_image.sc Added imguiImage(). 2014-07-05 01:10:49 +01:00
vs_imgui_latlong.bin.h Refactored uniform types. 2015-05-28 15:27:00 -07:00
vs_imgui_latlong.sc Added latlong display type for imguiCube(). 2015-02-12 02:50:18 +01:00
vs_imgui_texture.bin.h Refactored uniform types. 2015-05-28 15:27:00 -07:00
vs_imgui_texture.sc Updated copyright year. 2015-01-02 14:43:11 -08:00
vs_ocornut_imgui.bin.h Refactored uniform types. 2015-05-28 15:27:00 -07:00
vs_ocornut_imgui.sc Added embedded font to imgui. 2015-01-23 23:02:56 -08:00