mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 17:18:12 -05:00
1e604e8f38
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%) |
||
---|---|---|
.. | ||
cs_indirect.sc | ||
cs_init_instances.sc | ||
cs_update_instances.sc | ||
fs_particle.sc | ||
makefile | ||
nbody.cpp | ||
screenshot.png | ||
uniforms.sh | ||
varying.def.sc | ||
vs_particle.sc |