bgfx/examples/14-shadowvolumes
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
..
figure-rgba.tga Added examples 13-stencil and 14-shadowvolumes 2013-10-18 07:18:31 +01:00
flare.tga Added examples 13-stencil and 14-shadowvolumes 2013-10-18 07:18:31 +01:00
fs_shadowvolume_color_lightning.sc Refactored uniform types. 2015-05-28 15:27:00 -07:00
fs_shadowvolume_color_texture.sc Removed flipV from 14-shadowvolumes example. 2014-08-18 20:18:48 +01:00
fs_shadowvolume_svbackblank.sc Copyright dates updated. 2014-01-13 23:45:18 +01:00
fs_shadowvolume_svbackcolor.sc Copyright dates updated. 2014-01-13 23:45:18 +01:00
fs_shadowvolume_svbacktex1.sc Copyright dates updated. 2014-01-13 23:45:18 +01:00
fs_shadowvolume_svbacktex2.sc Copyright dates updated. 2014-01-13 23:45:18 +01:00
fs_shadowvolume_svfrontblank.sc Copyright dates updated. 2014-01-13 23:45:18 +01:00
fs_shadowvolume_svfrontcolor.sc Copyright dates updated. 2014-01-13 23:45:18 +01:00
fs_shadowvolume_svfronttex1.sc Copyright dates updated. 2014-01-13 23:45:18 +01:00
fs_shadowvolume_svfronttex2.sc Copyright dates updated. 2014-01-13 23:45:18 +01:00
fs_shadowvolume_svside.sc Refactored uniform types. 2015-05-28 15:27:00 -07:00
fs_shadowvolume_svsideblank.sc Copyright dates updated. 2014-01-13 23:45:18 +01:00
fs_shadowvolume_svsidecolor.sc Copyright dates updated. 2014-01-13 23:45:18 +01:00
fs_shadowvolume_svsidetex.sc Copyright dates updated. 2014-01-13 23:45:18 +01:00
fs_shadowvolume_texture.sc Copyright dates updated. 2014-01-13 23:45:18 +01:00
fs_shadowvolume_texture_lightning.sc Refactored uniform types. 2015-05-28 15:27:00 -07:00
makefile Fixing paths. 2014-09-10 21:48:08 -07:00
screenshot.png Updated screenshots. 2013-10-23 22:48:16 -07:00
shadowvolumes.cpp VR: Add device resolution to HMD. Init at startup. 2015-06-03 15:39:09 -07:00
varying.def.sc Reversed instance data bindings. Issue #309. 2015-04-15 10:37:00 -07:00
vs_shadowvolume_color_lightning.sc Cleanup. 2015-01-20 21:41:51 -08:00
vs_shadowvolume_color_texture.sc Copyright dates updated. 2014-01-13 23:45:18 +01:00
vs_shadowvolume_svback.sc Copyright dates updated. 2014-01-13 23:45:18 +01:00
vs_shadowvolume_svfront.sc Copyright dates updated. 2014-01-13 23:45:18 +01:00
vs_shadowvolume_svside.sc Copyright dates updated. 2014-01-13 23:45:18 +01:00
vs_shadowvolume_texture.sc Copyright dates updated. 2014-01-13 23:45:18 +01:00
vs_shadowvolume_texture_lightning.sc Cleanup. 2015-01-20 21:41:51 -08:00