From 795503f10877657b93e7cc11ae467c7516f43ef8 Mon Sep 17 00:00:00 2001 From: Themaister Date: Wed, 30 Apr 2014 10:00:52 +0200 Subject: [PATCH] Just define EGL_OPENGL_ES3_BIT_KHR instead. --- gfx/context/drm_egl_ctx.c | 8 ++++++-- gfx/context/xegl_ctx.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gfx/context/drm_egl_ctx.c b/gfx/context/drm_egl_ctx.c index 58a755fc5b..835543f985 100644 --- a/gfx/context/drm_egl_ctx.c +++ b/gfx/context/drm_egl_ctx.c @@ -47,6 +47,10 @@ #include #include +#ifndef EGL_OPENGL_ES3_BIT_KHR +#define EGL_OPENGL_ES3_BIT_KHR 0x0040 +#endif + static bool g_use_hw_ctx; static EGLContext g_egl_hw_ctx; static EGLContext g_egl_ctx; @@ -537,7 +541,7 @@ static bool gfx_ctx_set_video_mode(void *data, EGL_NONE, }; -#if defined(EGL_KHR_create_context) && defined(EGL_OPENGL_ES3_BIT_KHR) +#ifdef EGL_KHR_create_context static const EGLint egl_attribs_gles3[] = { EGL_ATTRIBS_BASE, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES3_BIT_KHR, @@ -558,7 +562,7 @@ static bool gfx_ctx_set_video_mode(void *data, attrib_ptr = egl_attribs_gl; break; case GFX_CTX_OPENGL_ES_API: -#if defined(EGL_KHR_create_context) && defined(EGL_OPENGL_ES3_BIT_KHR) +#ifdef EGL_KHR_create_context if (g_major >= 3) attrib_ptr = egl_attribs_gles3; else diff --git a/gfx/context/xegl_ctx.c b/gfx/context/xegl_ctx.c index feb2ce23b3..3509aa0c92 100644 --- a/gfx/context/xegl_ctx.c +++ b/gfx/context/xegl_ctx.c @@ -30,6 +30,10 @@ #include #include +#ifndef EGL_OPENGL_ES3_BIT_KHR +#define EGL_OPENGL_ES3_BIT_KHR 0x0040 +#endif + static Display *g_dpy; static Window g_win; static Colormap g_cmap; @@ -257,7 +261,7 @@ static bool gfx_ctx_init(void *data) EGL_NONE, }; -#if defined(EGL_KHR_create_context) && defined(EGL_OPENGL_ES3_BIT_KHR) +#ifdef EGL_KHR_create_context static const EGLint egl_attribs_gles3[] = { EGL_ATTRIBS_BASE, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES3_BIT_KHR, @@ -278,7 +282,7 @@ static bool gfx_ctx_init(void *data) attrib_ptr = egl_attribs_gl; break; case GFX_CTX_OPENGL_ES_API: -#if defined(EGL_KHR_create_context) && defined(EGL_OPENGL_ES3_BIT_KHR) +#ifdef EGL_KHR_create_context if (g_major >= 3) attrib_ptr = egl_attribs_gles3; else