mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-29 02:55:36 -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%) |
||
---|---|---|
.. | ||
00-helloworld | ||
01-cubes | ||
02-metaballs | ||
03-raymarch | ||
04-mesh | ||
05-instancing | ||
06-bump | ||
07-callback | ||
08-update | ||
09-hdr | ||
10-font | ||
11-fontsdf | ||
12-lod | ||
13-stencil | ||
14-shadowvolumes | ||
15-shadowmaps-simple | ||
16-shadowmaps | ||
17-drawstress | ||
18-ibl | ||
19-oit | ||
20-nanovg | ||
21-deferred | ||
22-windows | ||
23-vectordisplay | ||
24-nbody | ||
25-c99 | ||
assets/meshes | ||
common | ||
runtime | ||
makefile |