Commit graph

1039 commits

Author SHA1 Message Date
Branimir Karadžić
8adc099b02 Cleanup. 2015-07-30 11:36:26 -07:00
Branimir Karadžić
a6983339c8 Fixed release build. 2015-07-29 21:02:41 -07:00
Branimir Karadžić
c2398f34c0 Cleanup. 2015-07-29 19:50:25 -07:00
Branimir Karadžić
b702dcdf3c D3D12: Initial commit. 2015-07-29 19:38:17 -07:00
Branimir Karadžić
874ff3c155 DX11: DXGI debug layers. 2015-07-29 14:49:24 -07:00
Branimir Karadžić
cb60707681 Added DX_NAME macro. 2015-07-28 23:18:25 -07:00
Branimir Karadžić
1a7f1a19cc Fixed Linux build. 2015-07-28 22:35:01 -07:00
Branimir Karadžić
eecb4be9e9 Added memory size sanity check. 2015-07-28 21:39:26 -07:00
Branimir Karadžić
623624b456 Fixed issue #464. 2015-07-28 20:56:41 -07:00
Branimir Karadžić
cb6cee9dd1 Updated trace callback. 2015-07-24 18:02:17 -07:00
Branimir Karadžić
1fa85ccf27 Replaced bgfx::setProgram function with bgfx::submit argument. Added bgfx::touch and bgfx::getStats. 2015-07-22 18:05:11 -07:00
Branimir Karadžić
6bdf5c4bad Cleanup. 2015-07-21 18:15:12 -07:00
Ka Ming Chan
20a27012a0 improved the handling of iOS UIView resize / rotate by recreating the frame-buffer and render-buffer objects 2015-07-21 20:37:59 +08:00
Branimir Karadžić
f15008311a Fixed issue #452. 2015-07-17 11:12:41 -07:00
Branimir Karadžić
921a315c4d Cleanup. 2015-07-16 20:28:43 -07:00
Branimir Karadžić
b98d3b6978 Added trace method to callback interface. 2015-07-16 17:39:02 -07:00
Branimir Karadžić
6c48b12a3f Fixed issue #447. 2015-07-02 17:05:51 -07:00
Branimir Karadžić
ff16073599 Fixed issue #445. 2015-06-30 19:40:49 -07:00
Branimir Karadžić
f44f5b32b1 Added missing C99 API function. 2015-06-27 16:47:07 -07:00
Branimir Karadžić
4cf393bed6 Fixed MinGW warning. 2015-06-25 16:33:56 -07:00
Nick Porcino
f9907aaa58 Fix for Context not bound on OSX 10.10.3 #439 2015-06-24 22:54:47 -07:00
Branimir Karadžić
e84ecf6ee8 Fixed MSVC warning. 2015-06-24 10:20:01 -07:00
Branimir Karadžić
f36bfe2e4f Added offset for updating dynamic buffers. 2015-06-23 16:40:38 -07:00
Branimir Karadžić
3eb0659898 Cleanup. 2015-06-22 20:45:50 -07:00
Branimir Karadžić
5e0948c7a8 Cleanup. 2015-06-21 20:00:00 -07:00
Branimir Karadžić
8109de5461 Cleanup. 2015-06-20 14:27:59 -07:00
Branimir Karadžić
f2e8d6c239 Fixed variable shadowing warning. 2015-06-19 21:08:32 -07:00
Branimir Karadžić
4408e44515 Merge branch 'master' of cane:bkaradzic/bgfx into dev 2015-06-19 20:01:42 -07:00
Branimir Karadžić
a39ba04e26 Fixed Linux build. 2015-06-19 19:55:23 -07:00
Branimir Karadžić
d7a9b56dc6 Added ObjC amalgamated file. 2015-06-19 17:34:01 -07:00
Branimir Karadžić
5ebe50c705 Cleanup. 2015-06-18 22:33:06 -07:00
Branimir Karadžić
c80cc04445 Removed mapped constant buffers (it doesn't improve performance). 2015-06-18 20:39:16 -07:00
Branimir Karadžić
faf3164ecb Fixed issue #436. 2015-06-17 10:04:12 -07:00
Branimir Karadžić
527ab0bcc1 shaderc: Metal fixes. 2015-06-12 15:22:01 -07:00
Branimir Karadžić
3dd3a86a4d Fixed amalgamated build. 2015-06-11 14:26:01 -07:00
Branimir Karadžić
85de7fa148 Fixed VS2008 build. 2015-06-11 20:16:38 -07:00
Branimir Karadžić
52cfaf0aaa Added Metal renderer backend stub. 2015-06-11 09:38:17 -07:00
Kocsis Attila
e97be61a75 added iOS GL extension function import 2015-06-10 15:52:12 +02:00
Branimir Karadžić
ef143a1bb6 Fixed issue #429. 2015-06-09 19:57:10 -07:00
Branimir Karadžić
466c76071a Cleanup. 2015-06-05 10:43:43 -07:00
Branimir Karadžić
f81dadd9b8 Fixed shadowing variable warning. 2015-06-05 09:54:14 -07:00
Branimir Karadžić
d2204e5cf2 Merge pull request #423 from mendsley/vr_viewportfix
VR: Fix skewed viewports with buffered eye textures
2015-06-05 09:14:19 -07:00
Matthew Endsley
05d70ea99d VR: Fix skewed viewports with buffered eye textures
Bug fix for #419

Viewport calculations need to take VR eye buffer size into
account. Noticable at the older 100px boundary. Skewing still
exists at newer 8px buffer, but is harder to notice.
Eventually causes pretty bad eye strain, though.

Easily reproduced by setting the buffer to something obscenely
large, such as 2048.
2015-06-05 02:12:24 -07:00
Matthew Endsley
9a1b1f892c VR: Properly support MSAA in OVR builds
Fixes #338

Create the swap chain without MSAA, and the eye textures
with MSAA. The core issue was using the surface description
for the backbuffer for the DSV on the eye textures which did
not match.

This meethod follows both the oculus and openvr guidance on MSAA -
MSAA is configured on the eye render targets, but not on the swap
chain.
2015-06-05 00:30:05 -07:00
Branimir Karadžić
ad4b2f134f Merge branch 'master' of github.com:bkaradzic/bgfx 2015-06-04 22:26:09 -07:00
Branimir Karadžić
132b0c9a1b Cleanup. 2015-06-04 22:24:45 -07:00
Branimir Karadžić
66ad074f90 Merge pull request #420 from mendsley/vr_eye_bleeding
VR: Add buffer between left/right eye textures
2015-06-04 19:23:59 -07:00
Matthew Endsley
9020994470 VR: Add buffer between left/right eye textures
This prevents bleeding across the individual viewports
when the oculus SDK applies distortion mapping. The current
reccommended values are 100px for SDK <= 0.5 and 8px for > 0.5

See: http://static.oculus.com/sdk-downloads/documents/0.6.0/Oculus_Developer_Guide.pdf
  in the "Bugs Fixed Since the Last Release" section.

For an example of this artifact, see the correct scene render:
![Imgur](http://i.imgur.com/fZZExg8.jpg)

followed by a scene that bleeds the left eye into the right eye:
![Imgur](http://i.imgur.com/dZalmPS.jpg)
2015-06-04 18:44:31 -07:00
Matthew Endsley
acdaefb161 VR: Fix OVR_VERSION macro.
Was previously supplying (major,minor,build) when it is
actuall (product,major,minor).

For example, the 0.5.0 SDK has the following:
```
 #define OVR_PRODUCT_VERSION 0
 #define OVR_MAJOR_VERSION   5
 #define OVR_MINOR_VERSION   0
 #define OVR_PATCH_VERSION   1
 #define OVR_BUILD_NUMBER    0
```
2015-06-04 18:41:35 -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