Commit graph

561 commits

Author SHA1 Message Date
Branimir Karadžić
58fae36870 input: Added ability to retrieve modifiers state. 2015-06-04 18:26:09 -07:00
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ć
ce3eded6a3 Fixed imgui font pixel center. 2015-06-03 14:38:00 -07:00
Branimir Karadžić
32750a6824 Removed imgui dependency on input. 2015-06-02 19:25:37 -07:00
Branimir Karadžić
aa99fe1313 Added ocornut-imgui key mapping. 2015-06-02 14:28:22 -07:00
Branimir Karadžić
51d41041b7 Cleanup. 2015-06-01 17:45:40 -07:00
Branimir Karadžić
801207ffa7 Cleanup. 2015-05-31 16:02:59 -07:00
Branimir Karadžić
cc5606a731 Added toggle fullscreen key. 2015-05-31 15:57:52 -07:00
Branimir Karadžić
44bf196b07 Cleanup. 2015-05-30 22:11:42 -07:00
Branimir Karadžić
38a7bc6d28 X11: Fixed page down key mapping. 2015-05-30 18:00:24 -07:00
Branimir Karadžić
4f2345683d X11: Added key mapping. 2015-05-30 13:11:18 -07:00
Branimir Karadžić
e91673d53a OSX: Added key mapping. 2015-05-30 11:23:46 -07:00
Branimir Karadžić
b854588861 Added missing keys. 2015-05-30 10:06:26 -07:00
Branimir Karadžić
ff01992cb7 Refactored uniform types. 2015-05-28 15:27:00 -07:00
Branimir Karadžić
00548b325a Fixed crash when loading invalid texture. 2015-05-27 21:18:43 -07:00
Branimir Karadžić
f42cee24a6 Rebuilt shaders. 2015-05-25 18:59:39 -07:00
Branimir Karadžić
7461299271 Updated texture loading. 2015-05-24 10:25:47 -07:00
Branimir Karadžić
2e56304280 Fixed leak in single-threaded mode. 2015-05-19 15:52:47 -07:00
Branimir Karadžić
2a49e5a143 Added flush after render reset flag. 2015-05-15 13:14:35 -07:00
Branimir Karadžić
1f241e3cc1 Cleanup. 2015-05-14 19:05:59 -07:00
Branimir Karadžić
65ac7c33f5 Added png/jpg/tga/etc. to load texture utility function. 2015-05-13 22:54:52 -07:00
Dario Manesku
d21c75c40c Fixup for previous commit. 2015-05-03 16:20:41 +02:00
Dario Manesku
6efb223b49 Fixing SDL char input. 2015-05-03 15:52:40 +02:00
Branimir Karadžić
68a2462d89 X11: Fixed window resize. 2015-04-26 12:42:51 -07:00
Mike Popoloski
3fc8ef8c7b Small cleanup of entry_winrt 2015-04-25 10:39:11 -04:00
Branimir Karadžić
e706260793 Added texture handle passing to ocornut-imgui. 2015-04-23 17:14:29 -07:00
Branimir Karadžić
cc6649db0d Cleanup. 2015-04-22 09:30:28 -07:00
Branimir Karadžić
4098dbb8fb Fixed GCC warnings. 2015-04-15 20:05:18 -07:00
Branimir Karadžić
5e5a0a8a9e Added custom allocator to imgui. 2015-04-15 20:00:15 -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ć
cea3815dff Fixed HLSL shader stripping. 2015-04-13 12:54:45 -07:00
Branimir Karadžić
dedf75a89b Rebuilt shaders. 2015-04-12 22:26:40 -07:00
Branimir Karadžić
57cfeffb8d Rebuilt shaders. 2015-04-11 18:18:43 -07:00
Branimir Karadžić
a042d6f7b9 Fixed decoding of unsupported RGBA8/BGRA8 formats on D3D9/GL. 2015-04-11 00:17:49 -07:00
Branimir Karadžić
c7eb016ae0 Rebuilt shaders. 2015-04-10 21:09:46 -07:00
Mike Popoloski
5f4bd7700e Recompiling shaders. Shouldn't have any effect on runtime behavior. 2015-04-10 22:49:39 -04:00
Branimir Karadžić
1824a3f5bd Cleanup. 2015-04-08 14:16:02 -07:00
Branimir Karadžić
c85c12b5cd Fixed variable narrowing warnings. 2015-04-07 17:58:14 -07:00
Branimir Karadžić
1e8051fd00 Fixed variable shadowing. 2015-04-04 19:10:35 -07:00
Branimir Karadžić
2e6ac0ca49 Silence -Wshadow warning in stb_image. 2015-04-04 16:23:50 -07:00
Dario Manesku
8f31098c40 Fixup for previous commit. This is a better way to do it. 2015-04-05 09:04:16 +02:00
Branimir Karadžić
584baba7d7 Rebuilt embedded shaders. 2015-04-02 23:36:53 -07:00
Branimir Karadžić
85bf5493c3 Updated shaders. 2015-04-02 10:49:41 -07:00
Branimir Karadžić
81d6876067 Cleanup. 2015-03-31 09:44:51 -07:00
Branimir Karadžić
d62025d530 Fixing VS2015 warnings. 2015-03-29 22:40:35 -07:00
Branimir Karadžić
a34e6e7965 Fixed VS2015 warnings. 2015-03-29 11:47:32 -07:00
Branimir Karadžić
092f8f19e7 Fixed leak on exit. 2015-03-28 10:33:27 -07:00
Branimir Karadžić
a797b00a7f Updated GLFW entry to test for exit. 2015-03-25 19:43:12 -07:00
Branimir Karadžić
0da6c77806 Added glfw entry. 2015-03-24 22:19:21 -07:00