Commit graph

263 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ć
ff01992cb7 Refactored uniform types. 2015-05-28 15:27:00 -07:00
Branimir Karadžić
c4231c9731 Added framebuffer support test. 2015-05-18 12:39:42 -07:00
Mike Popoloski
ad9e9fe111 Adding missing C99 API methods. 2015-05-16 19:07:10 -04:00
Branimir Karadžić
2a49e5a143 Added flush after render reset flag. 2015-05-15 13:14:35 -07:00
Branimir Karadžić
4422e7227a Cleanup. 2015-05-14 21:16:33 -07:00
Branimir Karadžić
8964e68c87 Updated docs. 2015-05-14 20:33:33 -07:00
Branimir Karadžić
f5d0a39dd0 Added buffer compute format flags. 2015-05-14 11:37:32 -07:00
Branimir Karadžić
0305ba0bda Cleanup. 2015-05-13 14:11:56 -07:00
Branimir Karadžić
bd17691a41 Added sRGB texture caps. 2015-05-04 17:23:11 -07:00
Branimir Karadžić
76fa899c22 Merge pull request #373 from MikePopoloski/srgb
sRGB Support
2015-05-04 16:31:24 -07:00
Branimir Karadžić
d5c737924e Added back buffer depth stencil pointer to platform data. 2015-05-04 14:05:04 -07:00
Branimir Karadžić
088bd06b04 Updated C99 API. 2015-05-03 00:01:33 -07:00
MikePopoloski
8919b15468 Adding sRGB support for D3D11 and DDS. 2015-05-02 22:57:42 -04:00
Branimir Karadžić
3b66dfa5e8 Added indirect compute dispatch. 2015-05-01 14:54:23 -07:00
Branimir Karadžić
b04af680ad GL: Added draw indirect support. 2015-04-30 18:06:41 -07:00
Branimir Karadžić
537ccb0699 Updated docs. 2015-04-29 20:20:19 -07:00
Branimir Karadžić
d763196407 D3D11: Added draw indirect support. 2015-04-29 17:18:51 -07:00
Branimir Karadžić
d804ca9023 Cleanup. 2015-04-26 11:34:33 -07:00
Mike Popoloski
9677f4a37c Updating C99 API to support scaled textures. 2015-04-26 10:18:44 -04:00
Mike Popoloski
36ca5cbd18 Exposing flags param for C99 buffer creation methods. 2015-04-26 10:18:43 -04:00
Branimir Karadžić
e5ed5db1f1 Exposed software rasterizer. 2015-04-24 14:57:00 -07:00
Branimir Karadžić
cc6649db0d Cleanup. 2015-04-22 09:30:28 -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ć
143628442c Removed use of memset from header file. 2015-04-21 11:48:58 -07:00
Branimir Karadžić
31357c8786 Fixed Linux build. 2015-04-20 19:05:41 -07:00
Branimir Karadžić
a528554e67 Cleanup passing platform window/context data. 2015-04-20 16:22:40 -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ć
c01a93e29d Added support for automatic texture scaling by backbuffer ratio on backbuffer resize. 2015-04-13 18:39:38 -07:00
Branimir Karadžić
4d30bd201e Updated 17-drawstress. 2015-04-09 16:58:44 -07:00
Branimir Karadžić
b9d2a05a28 Updated docs. 2015-04-08 21:15:37 -07:00
Branimir Karadžić
23114a821c 32-bit indices support WIP. 2015-04-08 19:59:48 -07:00
Branimir Karadžić
1824a3f5bd Cleanup. 2015-04-08 14:16:02 -07:00
Branimir Karadžić
5a9b02ca31 Added view name flag for compute. 2015-04-02 11:57:53 -07:00
Branimir Karadžić
7ebc6e3cbb Updated C99 API. 2015-04-01 23:58:36 -07:00
Branimir Karadžić
dd98c12901 Added release callback for makeRef. 2015-04-01 16:44:44 -07:00
Branimir Karadžić
4b18babb62 Updated C99 API. 2015-03-27 22:09:10 -07:00
Branimir Karadžić
8a7b20a239 Updated docs. 2015-03-26 15:09:31 -07:00
Branimir Karadžić
eeb491883d Added ability to select GPU. 2015-03-26 15:01:47 -07:00
Branimir Karadžić
4b60ddf44d Fixed GLFW3 integration on Linux. 2015-03-24 23:21:32 -07:00
Branimir Karadžić
0da6c77806 Added glfw entry. 2015-03-24 22:19:21 -07:00
Branimir Karadžić
b2c8c45b02 Cleanup. 2015-03-24 21:24:13 -07:00
Branimir Karadžić
5166886a10 Fixed issue #303. 2015-03-21 12:43:07 -07:00
Branimir Karadžić
2ce33465d5 Added Vulkan stub. 2015-03-05 20:34:39 -08:00
Branimir Karadžić
d858dde912 Added RGBA8 texture format. 2015-03-05 17:44:56 -08:00
Branimir Karadžić
478449e23a Adding vertex textures WIP. 2015-03-01 22:01:30 -08:00
Branimir Karadžić
579f43fad7 Added number of views to caps. 2015-02-25 21:12:52 -08:00
Branimir Karadžić
fb6aa4f51d Removed need to set texture format for compute's setImage. 2015-02-23 17:25:06 -08:00
Branimir Karadžić
2883be5c1a Increased number of views to 256. Added view remap support. 2015-02-21 15:40:51 -08:00