57 Commits

Author SHA1 Message Date
gblues
6904101c44 Clean up trailing whitespace
== DETAILS

Really simple code cleanup, because my editor flags trailing whitespaces
and it's pretty annoying.
2017-12-12 00:24:18 -08:00
twinaphex
f12ea0e1e3 Fix C89_BUILD 2017-04-22 09:37:36 +02:00
Kyle Brenneman
7baa75bee0 Add #ifdefs for trying to use eglGetPlatformDisplay.
Add #ifdefs for EGL_VERSION_1_5 and EGL_EXT_platform_base around the calls to
eglGetPlatformDisplay and eglGetPlatformDisplayEXT, respectively.

This avoids compiler errors when the EGL header files don't have the necessary
declarations for EGL 1.5 or EGL_EXT_platform_base.

Follow-up fix for https://github.com/libretro/RetroArch/issues/4790
2017-04-16 17:11:27 -06:00
twinaphex
d433d592e1 Do this workaround for now - for Android/Emscripten 2017-04-17 00:26:20 +02:00
twinaphex
96d984b04d (egl_common.c) Cleanups/style nits 2017-04-17 00:04:08 +02:00
Kyle Brenneman
fcccc9dc0b Use eglGetPlatformDisplay when it's available.
Added a platform parameter to egl_init_context. If the caller provides a
platform other than EGL_NONE, then it will try to use eglGetPlatformDisplay or
eglGetPlatformDisplayEXT instead of eglGetDisplay.

If neither eglGetPlatformDisplay or eglGetPlatformDisplayEXT is supported, then
it will still fall back to calling eglGetDisplay.

Updated the Wayland, X11, and DRM callers to use the correct platform enum.
Those are the callers that don't just pass EGL_DEFAULT_DISPLAY as the native
display handle.

Calling eglGetDisplay with any value other than EGL_DEFAULT_DISPLAY is
inherently unreliable, because it requires the EGL implementation to guess a
platform type based on a (void *) pointer. Some implementations might not
identify a particular platform, or worse, might guess wrong.

Fixes https://github.com/libretro/RetroArch/issues/4790
2017-04-16 14:19:40 -06:00
twinaphex
f9b75e7d76 CXX_BUILD buildfix 2017-04-14 03:40:58 +02:00
twinaphex
3da08c9d9e Cleanup egl_create_context 2017-03-30 02:39:08 +02:00
twinaphex
38f9b93885 Refine egl_init_context - DRM EGL contexts still fails
at eglGetDisplay
2017-03-30 02:31:51 +02:00
twinaphex
96c8ca5a09 Header update #1 2017-01-22 13:40:32 +01:00
Josh Palmer
e1d3493a9d Handle more cases for EGL error reporting 2017-01-09 20:26:09 +00:00
twinaphex
4b2a906148 (gfx/common) Cleanups 2016-12-04 03:45:46 +01:00
twinaphex
b43f786f89 Cleanups 2016-09-08 08:15:40 +02:00
Brad Parker
0eb1777a1f remove extra semicolons 2016-09-03 10:30:21 -04:00
twinaphex
76cc6fd8ec Start implementing signal handler code once in frontend driver code 2016-07-08 02:38:33 +02:00
twinaphex
b434f0863a CXX_BUILD buildfix 2016-06-23 07:44:56 +02:00
Twinaphex
e133ce31e8 (QNX) Buildfixes 2016-05-19 20:10:10 +02:00
twinaphex
d9ddb92a90 (egl_common.c) Silence warning 2016-04-22 07:56:32 +02:00
twinaphex
e938be3747 Have to rewrite EGL context code 2016-03-01 06:49:05 +01:00
Alcaro
7a6463a300 Add escape hatch if rarch (or the core) is in an infinite loop. 2016-02-23 16:11:39 +01:00
twinaphex
7da0739b61 Get rid of global g_egl_api now too 2016-02-22 11:54:55 +01:00
twinaphex
22a677b3a8 Don't use egl_common's 'api' variable anymore 2016-02-22 11:54:19 +01:00
twinaphex
54f46f4ee3 Update headers 2016-01-10 04:41:52 +01:00
Alcaro
9e3994408e What is that typecast dance good for? 2015-12-10 14:10:42 +01:00
Higor Eurípedes
1f51a0d948 (videocore) Fix build 2015-12-08 19:34:26 -03:00
Higor Eurípedes
1cf574cfbe Move most of egl_common globals into egl_ctx_data_t 2015-12-08 13:54:03 -03:00
twinaphex
a95762e5cb Create egl_has_config 2015-12-08 14:42:02 +01:00
twinaphex
0f94353b28 Create egl_get_native_visual_id 2015-12-08 14:38:06 +01:00
twinaphex
96ddc1f722 egl_destroy - don't do glFlush/glFinish on mobile platforms 2015-12-04 01:44:41 +01:00
twinaphex
bab243a7a2 (egl_common.c) Cleanups 2015-12-03 23:33:50 +01:00
twinaphex
60313f7f48 (Android) Don't call eglSwapBuffers if g_egl_dpy and g_egl_surf are not
yet ready
2015-12-03 22:23:20 +01:00
twinaphex
66721e8902 Set g_egl_hw_ctx to NULL in egl_create_context 2015-12-03 22:13:03 +01:00
twinaphex
074f14b132 Add verbosity.c/verbosity.h 2015-11-23 12:03:38 +01:00
twinaphex
b69caea6c1 Set g_egl_inited to false after egl_destroy 2015-11-21 09:39:25 +01:00
twinaphex
efa673c7b0 Make g_egl_use_hw_ctx a static variable 2015-11-21 09:37:26 +01:00
twinaphex
2f151896eb use egl_create_surface everywhere 2015-11-20 13:43:05 +01:00
twinaphex
fc0f5f8889 Create egl_create_surface 2015-11-20 13:36:16 +01:00
twinaphex
1101bb34d3 Create g_egl_api/g_egl_inited 2015-11-20 13:27:31 +01:00
twinaphex
f84c58e777 (Android) Start using egl_create_context 2015-11-19 18:25:19 +01:00
twinaphex
033e0ac3ad (drm_egl_ctx.c) Start using egl_create_context 2015-11-19 18:18:44 +01:00
twinaphex
6048025544 (Android) Use egl_init_context too 2015-11-19 17:55:49 +01:00
twinaphex
ad260fcb7b Create egl_init_context 2015-11-19 17:52:25 +01:00
twinaphex
80369a8823 Create egl_install_sighandlers 2015-11-19 15:55:57 +01:00
twinaphex
ad311d3bb0 Set g_egl_quit to 0 at end of egl_destroy 2015-11-19 15:49:49 +01:00
twinaphex
2fe6686ced Create g_egl_quit 2015-11-19 15:47:30 +01:00
twinaphex
774542fc62 Simplify egl_destroy 2015-11-19 15:34:40 +01:00
twinaphex
46fb98e21c Create egl_get_video_size 2015-11-19 15:21:04 +01:00
twinaphex
5aedc1c4ca Create egl_set_swap_interval 2015-11-19 15:16:37 +01:00
Twinaphex
61b4236079 Merge pull request #2432 from heuripedes/master
Fix warnings
2015-11-19 14:49:00 +01:00
twinaphex
7b39fd50a3 Create egl_swap_buffers 2015-11-19 14:38:55 +01:00