Commit graph

32 commits

Author SHA1 Message Date
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
Branimir Karadžić
c4231c9731 Added framebuffer support test. 2015-05-18 12:39:42 -07:00
Branimir Karadžić
2a49e5a143 Added flush after render reset flag. 2015-05-15 13:14:35 -07:00
Branimir Karadžić
f5d0a39dd0 Added buffer compute format flags. 2015-05-14 11:37:32 -07:00
Branimir Karadžić
bd17691a41 Added sRGB texture caps. 2015-05-04 17:23:11 -07:00
MikePopoloski
8919b15468 Adding sRGB support for D3D11 and DDS. 2015-05-02 22:57:42 -04:00
Branimir Karadžić
d763196407 D3D11: Added draw indirect support. 2015-04-29 17:18:51 -07:00
Branimir Karadžić
e5ed5db1f1 Exposed software rasterizer. 2015-04-24 14:57:00 -07:00
Branimir Karadžić
f246fd29fa Added texture caps flag for compute image formats. 2015-04-21 15:44:16 -07:00
Branimir Karadžić
4210fb0d64 Renamed reset flag. 2015-04-15 11:49:20 -07:00
Branimir Karadžić
7bfe51d0d8 Added flip after submit reset flag. 2015-04-14 20:03:05 -07:00
Branimir Karadžić
23114a821c 32-bit indices support WIP. 2015-04-08 19:59:48 -07:00
Branimir Karadžić
eeb491883d Added ability to select GPU. 2015-03-26 15:01:47 -07:00
Branimir Karadžić
5166886a10 Fixed issue #303. 2015-03-21 12:43:07 -07:00
Branimir Karadžić
478449e23a Adding vertex textures WIP. 2015-03-01 22:01:30 -08:00
Branimir Karadžić
3de816bf34 Added dynamic buffer resizing. 2015-01-28 17:56:29 -08:00
Branimir Karadžić
0516b5603b Added max anisotropy reset flag. 2015-01-21 20:39:42 -08:00
Branimir Karadžić
bb96d76c0a Added discard framebuffer resources after use. 2015-01-11 18:00:08 -08:00
Branimir Karadžić
ff7f967c1b Removed _BIT suffix from BGFX_CLEAR_* flags. 2015-01-10 21:39:45 -08:00
Branimir Karadžić
c25dd466be Updated copyright year. 2015-01-01 15:04:46 -08:00
Branimir Karadžić
1be040f2ab Added compute dispatch flags. 2014-12-28 11:36:36 -08:00
Branimir Karadžić
83f151f71b Added 24-nbody compute shader example. 2014-12-19 21:09:58 -08:00
Branimir Karadžić
ad47659669 Added compute buffer support. 2014-12-09 23:16:27 -08:00
Branimir Karadžić
8cca656df6 Cleanup. 2014-11-16 00:06:25 -08:00
Branimir Karadžić
a2153729be Added HMD recenter support. Updated examples to support HMD. 2014-11-02 00:06:18 -07:00
Branimir Karadžić
f6cf4df3d3 Added OculusVR support. 2014-10-28 22:08:55 -07:00
Branimir Karadžić
8a354b0785 Added line strip primitive type. 2014-10-22 19:19:33 -07:00
Branimir Karadžić
f4c7f69ed7 Added swap chain caps. 2014-09-23 20:35:39 -07:00
Branimir Karadžić
1d0a9841d7 Added intel fragment shader ordering. 2014-07-29 21:29:38 -07:00
Branimir Karadžić
6c8eeec36e Added caps info for all texture formats. 2014-07-27 20:44:02 -07:00
Branimir Karadžić
62b620a1a0 Initial compute support. 2014-07-20 20:27:13 -07:00
Branimir Karadžić
1c917de7f9 Added C99 compatible header. 2014-05-31 00:18:45 -07:00