Commit graph

453 commits

Author SHA1 Message Date
Branimir Karadžić
818c231d49 Detect available MSAA texture formats. 2015-09-01 13:23:20 -07:00
Branimir Karadžić
641a105f5d Added mOar texture formats. 2015-08-31 10:16:36 -07:00
Branimir Karadžić
bb89e6291c Cleanup. 2015-08-28 20:34:14 -07:00
Branimir Karadžić
444384469d Moar texture formats... 2015-08-28 17:41:24 -07:00
Branimir Karadžić
ece46d71bc Cleaned texture format names. 2015-08-28 14:48:51 -07:00
Branimir Karadžić
0cb21b8b83 GLES: Added workaround for broken emulator. 2015-08-28 11:17:26 -07:00
Branimir Karadžić
b7ebbb07b6 Added snorm texture formats. 2015-08-27 16:35:27 -07:00
Branimir Karadžić
89e55a0c7e Added uniform size stats. 2015-08-27 11:06:45 -07:00
Branimir Karadžić
b50e609f85 GLES: Fixed MRT. 2015-08-26 18:02:05 -07:00
Branimir Karadžić
3c6ee5fbcb GL: Fixed MRT clear depth value. 2015-08-21 10:58:22 -07:00
Branimir Karadžić
63f3bd1ea2 Cleanup. 2015-08-20 12:30:59 -07:00
Branimir Karadžić
682a0519ef GL: Don't test unsupported formats. 2015-08-18 16:28:08 -07:00
Branimir Karadžić
d4c7268fbc Revert "Fix crash on some OpenGLES devices" 2015-08-18 10:49:50 -07:00
Jonny Hopper
8efcae4243 Fix crash on some OpenGLES devices
On some older OpenGLES devices, attempting to bind textures to
unsupported compressed formats can crash. So explicitly disable the
unsupported formats so this never happens.
2015-08-18 11:57:15 +01:00
Branimir Karadžić
05f94f44be Report HiDPI display support thru caps. 2015-08-17 18:07:00 -07:00
Branimir Karadžić
fa5ebd5a02 Cleanup. 2015-08-16 21:31:04 -07:00
Branimir Karadžić
6d2e88567e Cleanup. 2015-08-16 15:44:53 -07:00
Branimir Karadžić
bc2077acb0 GL: Fixed GPU timer query. 2015-08-16 15:37:46 -07:00
Branimir Karadžić
d5d21b2a87 Cleanup. 2015-08-16 10:30:29 -07:00
Branimir Karadžić
16037218eb GL: Fixed issue #474. 2015-08-11 19:30:33 -07:00
Branimir Karadžić
06a076fa2a GL: Use MAX_DRAW_BUFFERS instead of MAX_COLOR_ATTACHMENTS. 2015-08-09 07:53:48 -07:00
Branimir Karadžić
f82f99b2a6 Fixed vertex attribute. 2015-08-07 11:37:52 -07:00
Branimir Karadžić
8da579ff99 Added vertex attrib Uint10. 2015-08-04 19:03:56 -07:00
Branimir Karadžić
d0b4657e15 GL: Fixed depth/stencil attachemnt logic. 2015-08-04 08:40:14 -07:00
Branimir Karadžić
623624b456 Fixed issue #464. 2015-07-28 20:56:41 -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ć
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ć
6c48b12a3f Fixed issue #447. 2015-07-02 17:05:51 -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
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ć
886dd485c0 Cleanup. 2015-05-30 15:58:45 -07:00
Branimir Karadžić
5d22798482 Patching GL shaders to avoid compiler warnings. 2015-05-30 10:07:07 -07:00
Branimir Karadžić
ff01992cb7 Refactored uniform types. 2015-05-28 15:27:00 -07:00
Branimir Karadžić
a361918374 Fixed issue #392. 2015-05-21 17:49:02 -07:00
Branimir Karadžić
2048aef329 Cleanup. 2015-05-18 20:34:21 -07:00
Branimir Karadžić
11868f704a GLES31: Fixed image format test. 2015-05-18 20:24:37 -07:00
Branimir Karadžić
6b8964acf7 GL: Added image format test. 2015-05-18 14:35:05 -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ć
cacb332b42 GL: Enabled texture check for all platforms. 2015-05-12 23:03:17 -07:00
Branimir Karadžić
8da183a2f1 Cleanup. 2015-05-12 17:25:09 -07:00
Branimir Karadžić
5e33eaf65b Merge pull request #384 from bullno1/color-texture-format-detection
Fix color texture format detection for webgl and gles < 3.0
2015-05-12 17:05:15 -07:00
Branimir Karadžić
e05eddce21 Merge branch 'master' of github.com:bkaradzic/bgfx 2015-05-12 17:03:32 -07:00
Branimir Karadžić
7d50012dbe Added GPU timer. 2015-05-12 17:03:25 -07:00