diff --git a/configuration.c b/configuration.c index dfe65bbea3..e517568ee4 100644 --- a/configuration.c +++ b/configuration.c @@ -142,6 +142,8 @@ struct config_path_setting enum video_driver_enum { VIDEO_GL = 0, + VIDEO_GL1, + VIDEO_GL_CORE, VIDEO_VULKAN, VIDEO_METAL, VIDEO_DRM, @@ -321,8 +323,12 @@ enum midi_driver_enum #if defined(HAVE_METAL) static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_METAL; -#elif defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGLES) || defined(__CELLOS_LV2__) +#elif defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) || defined(__CELLOS_LV2__) static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_GL; +#elif defined(HAVE_OPENGL_CORE) +static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_GL_CORE; +#elif defined(HAVE_OPENGL1) +static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_GL1; #elif defined(GEKKO) static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_WII; #elif defined(WIIU) @@ -779,6 +785,10 @@ const char *config_get_default_video(void) { case VIDEO_GL: return "gl"; + case VIDEO_GL1: + return "gl1"; + case VIDEO_GL_CORE: + return "glcore"; case VIDEO_VULKAN: return "vulkan"; case VIDEO_METAL: diff --git a/dynamic.c b/dynamic.c index e10b1ea261..4a4d3004ed 100644 --- a/dynamic.c +++ b/dynamic.c @@ -40,8 +40,10 @@ #include "cheevos-new/cheevos.h" /* RCHEEVOS TODO: remove line */ #endif -#ifdef HAVE_OPENGL +#if defined(HAVE_OPENGL) #include "gfx/common/gl_common.h" +#elif defined(HAVE_OPENGL_CORE) +#include "gfx/common/gl_core_common.h" #endif #ifdef HAVE_NETWORKING @@ -1087,7 +1089,7 @@ static bool dynamic_request_hw_context(enum retro_hw_context_type type, "is compiled against OpenGLES. Cannot use HW context.\n"); return false; -#elif defined(HAVE_OPENGL) +#elif defined(HAVE_OPENGL) || defined(HAVE_OPENGL_CORE) case RETRO_HW_CONTEXT_OPENGLES2: case RETRO_HW_CONTEXT_OPENGLES3: RARCH_ERR("Requesting OpenGLES%u context, but RetroArch " @@ -1530,7 +1532,7 @@ bool rarch_environment_cb(unsigned cmd, void *data) if (!dynamic_verify_hw_context(cb->context_type, cb->version_minor, cb->version_major)) return false; -#if defined(HAVE_OPENGL) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL_CORE) if (!gl_set_core_context(cb->context_type)) { } #endif diff --git a/frontend/drivers/platform_uwp.c b/frontend/drivers/platform_uwp.c index fecced3b6d..6875109afc 100644 --- a/frontend/drivers/platform_uwp.c +++ b/frontend/drivers/platform_uwp.c @@ -378,7 +378,7 @@ static void frontend_uwp_environment_get(int *argc, char *argv[], "~\\logs", sizeof(g_defaults.dirs[DEFAULT_DIR_LOGS])); #ifdef HAVE_MENU -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) || defined(HAVE_OPENGL_CORE) snprintf(g_defaults.settings.menu, sizeof(g_defaults.settings.menu), "xmb"); #endif diff --git a/frontend/drivers/platform_win32.c b/frontend/drivers/platform_win32.c index 9c73f37c53..3882c19261 100644 --- a/frontend/drivers/platform_win32.c +++ b/frontend/drivers/platform_win32.c @@ -468,7 +468,7 @@ static void frontend_win32_environment_get(int *argc, char *argv[], fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_LOGS], ":\\logs", sizeof(g_defaults.dirs[DEFAULT_DIR_LOGS])); #ifdef HAVE_MENU -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGLES) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGLES) || defined(HAVE_OPENGL_CORE) snprintf(g_defaults.settings.menu, sizeof(g_defaults.settings.menu), "xmb"); #endif diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index dbd1bdc219..de38989f89 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -825,7 +825,7 @@ LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message, } #endif -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_VULKAN) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) || defined(HAVE_VULKAN) LRESULT CALLBACK WndProcGL(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { diff --git a/gfx/common/win32_common.h b/gfx/common/win32_common.h index 932ce5b434..f2a758079e 100644 --- a/gfx/common/win32_common.h +++ b/gfx/common/win32_common.h @@ -127,7 +127,7 @@ LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); #endif -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_VULKAN) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) || defined(HAVE_VULKAN) LRESULT CALLBACK WndProcGL(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); #endif diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index 779b162ea6..816ef50987 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -241,7 +241,7 @@ void cocoagl_gfx_ctx_update(void) switch (cocoagl_api) { case GFX_CTX_OPENGL_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) || defined(HAVE_OPENGL_CORE) #if defined(HAVE_COCOA) || defined(HAVE_COCOA_METAL) #if MAC_OS_X_VERSION_10_7 CGLUpdateContext(g_hw_ctx.CGLContextObj); @@ -269,7 +269,7 @@ static void cocoagl_gfx_ctx_destroy(void *data) { case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) || defined(HAVE_OPENGL_CORE) [GLContextClass clearCurrentContext]; #if defined(HAVE_COCOA) || defined(HAVE_COCOA_METAL) diff --git a/gfx/drivers_context/wgl_ctx.c b/gfx/drivers_context/wgl_ctx.c index b932ee9c2c..1eeb38e804 100644 --- a/gfx/drivers_context/wgl_ctx.c +++ b/gfx/drivers_context/wgl_ctx.c @@ -49,6 +49,8 @@ #if defined(HAVE_OPENGL) #include "../common/gl_common.h" +#elif defined(HAVE_OPENGL_CORE) +#include "../common/gl_core_common.h" #elif defined(HAVE_OPENGL1) #include "../common/gl1_common.h" #endif @@ -57,7 +59,7 @@ #include "../common/vulkan_common.h" #endif -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_VULKAN) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) || defined(HAVE_VULKAN) #ifndef WGL_CONTEXT_MAJOR_VERSION_ARB #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 #endif @@ -83,7 +85,7 @@ #endif #endif -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) typedef HGLRC (APIENTRY *wglCreateContextAttribsProc)(HDC, HGLRC, const int*); static wglCreateContextAttribsProc pcreate_context; #endif @@ -109,7 +111,7 @@ static enum gfx_ctx_api win32_api = GFX_CTX_NONE; static dylib_t dll_handle = NULL; /* Handle to OpenGL32.dll */ #endif -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) static bool wgl_has_extension(const char *extension, const char *extensions) { const char *start = NULL; @@ -151,7 +153,7 @@ static gfx_ctx_proc_t gfx_ctx_wgl_get_proc_address(const char *symbol) switch (win32_api) { case GFX_CTX_OPENGL_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) { gfx_ctx_proc_t func = (gfx_ctx_proc_t)wglGetProcAddress(symbol); if (func) @@ -170,7 +172,7 @@ static gfx_ctx_proc_t gfx_ctx_wgl_get_proc_address(const char *symbol) #endif } -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) static void setup_pixel_format(HDC hdc) { PIXELFORMATDESCRIPTOR pfd = {0}; @@ -325,7 +327,7 @@ void create_graphics_context(HWND hwnd, bool *quit) switch (win32_api) { case GFX_CTX_OPENGL_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) create_gl_context(hwnd, quit); #endif break; @@ -369,7 +371,7 @@ static void gfx_ctx_wgl_swap_interval(void *data, int interval) switch (win32_api) { case GFX_CTX_OPENGL_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) win32_interval = interval; if (!win32_hrc) return; @@ -587,7 +589,7 @@ static void gfx_ctx_wgl_destroy(void *data) switch (win32_api) { case GFX_CTX_OPENGL_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) if (win32_hrc) { glFinish(); @@ -749,7 +751,7 @@ static bool gfx_ctx_wgl_bind_api(void *data, win32_minor = minor; win32_api = api; -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) if (api == GFX_CTX_OPENGL_API) return true; #endif @@ -772,7 +774,7 @@ static void gfx_ctx_wgl_bind_hw_render(void *data, bool enable) switch (win32_api) { case GFX_CTX_OPENGL_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) win32_use_hw_ctx = enable; if (win32_hdc) @@ -845,7 +847,7 @@ static void gfx_ctx_wgl_set_flags(void *data, uint32_t flags) switch (win32_api) { case GFX_CTX_OPENGL_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) if (BIT32_GET(flags, GFX_CTX_FLAGS_ADAPTIVE_VSYNC)) wgl_adaptive_vsync = true; diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c index 93a8a28d40..b19a41a5c5 100644 --- a/gfx/drivers_context/x_ctx.c +++ b/gfx/drivers_context/x_ctx.c @@ -23,7 +23,7 @@ #include "../../config.h" #endif -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) #include #ifndef GLX_SAMPLE_BUFFERS @@ -53,7 +53,7 @@ #include "../common/vulkan_common.h" #endif -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) static int (*g_pglSwapInterval)(int); static int (*g_pglSwapIntervalSGI)(int); static void (*g_pglSwapIntervalEXT)(Display*, GLXDrawable, int); @@ -94,7 +94,7 @@ typedef struct gfx_ctx_x_data bool g_is_double; bool core_hw_context_enable; -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) GLXWindow g_glx_win; GLXContext g_ctx, g_hw_ctx; GLXFBConfig g_fbc; @@ -147,7 +147,7 @@ static const unsigned long retroarch_icon_data[] = { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 }; -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) static PFNGLXCREATECONTEXTATTRIBSARBPROC glx_create_context_attribs; static int GLXExtensionSupported(Display *dpy, const char *extension) @@ -192,7 +192,7 @@ static void gfx_ctx_x_destroy_resources(gfx_ctx_x_data_t *x) { case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) if (x->g_ctx) { if (x->swap_mode) @@ -262,7 +262,7 @@ static void gfx_ctx_x_destroy_resources(gfx_ctx_x_data_t *x) } } -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) g_pglSwapInterval = NULL; g_pglSwapIntervalSGI = NULL; g_pglSwapIntervalEXT = NULL; @@ -304,7 +304,7 @@ static void gfx_ctx_x_swap_interval(void *data, int interval) { case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) x->g_interval = interval; if (g_pglSwapIntervalEXT) @@ -352,7 +352,7 @@ static void gfx_ctx_x_swap_buffers(void *data, void *data2) { case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) if (x->swap_mode) { if (x->g_interval) @@ -456,7 +456,7 @@ static void *gfx_ctx_x_init(video_frame_info_t *video_info, void *data) int nelements = 0; int major = 0; int minor = 0; -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) static const int visual_attribs[] = { GLX_X_RENDERABLE , True, GLX_DRAWABLE_TYPE , GLX_WINDOW_BIT, @@ -495,7 +495,7 @@ static void *gfx_ctx_x_init(video_frame_info_t *video_info, void *data) { case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGLES) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGLES) || defined(HAVE_OPENGL_CORE) glXQueryVersion(g_x11_dpy, &major, &minor); /* GLX 1.3+ minimum required. */ @@ -555,7 +555,7 @@ static void *gfx_ctx_x_init(video_frame_info_t *video_info, void *data) switch (x_api) { case GFX_CTX_OPENGL_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) if (GLXExtensionSupported(g_x11_dpy, "GLX_EXT_swap_control_tear")) { RARCH_LOG("[GLX]: GLX_EXT_swap_control_tear supported.\n"); @@ -633,7 +633,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, { case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) vi = glXGetVisualFromFBConfig(g_x11_dpy, x->g_fbc); if (!vi) goto error; @@ -756,7 +756,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, { case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) x->g_glx_win = glXCreateWindow(g_x11_dpy, x->g_fbc, g_x11_win, 0); #endif break; @@ -810,7 +810,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, { case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) if (!x->g_ctx) { if (x->g_core_es || x->g_debug) @@ -924,7 +924,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, { case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) glXGetConfig(g_x11_dpy, vi, GLX_DOUBLEBUFFER, &val); x->g_is_double = val; @@ -1039,7 +1039,7 @@ static gfx_ctx_proc_t gfx_ctx_x_get_proc_address(const char *symbol) { case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) return glXGetProcAddress((const GLubyte*)symbol); #else break; @@ -1069,7 +1069,7 @@ static bool gfx_ctx_x_bind_api(void *data, enum gfx_ctx_api api, switch (api) { case GFX_CTX_OPENGL_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) return true; #else break; @@ -1122,7 +1122,7 @@ static void gfx_ctx_x_bind_hw_render(void *data, bool enable) { case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) x->g_use_hw_ctx = enable; if (!g_x11_dpy || !x->g_glx_win) return; @@ -1230,7 +1230,7 @@ static void gfx_ctx_x_make_current(bool release) { case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) if (release) glXMakeContextCurrent(g_x11_dpy, None, None, NULL); else diff --git a/gfx/font_driver.c b/gfx/font_driver.c index 997474956c..ccb39c511a 100644 --- a/gfx/font_driver.c +++ b/gfx/font_driver.c @@ -214,7 +214,7 @@ static bool gl_font_init_first( return false; } - +#endif #ifdef HAVE_OPENGL_CORE static const font_renderer_t *gl_core_font_backends[] = { @@ -246,7 +246,6 @@ static bool gl_core_font_init_first( return false; } #endif -#endif #ifdef HAVE_CACA static const font_renderer_t *caca_font_backends[] = { @@ -698,12 +697,12 @@ static bool font_init_first( case FONT_DRIVER_RENDER_OPENGL_API: return gl_font_init_first(font_driver, font_handle, video_data, font_path, font_size, is_threaded); +#endif #ifdef HAVE_OPENGL_CORE case FONT_DRIVER_RENDER_OPENGL_CORE_API: return gl_core_font_init_first(font_driver, font_handle, video_data, font_path, font_size, is_threaded); #endif -#endif #ifdef HAVE_VULKAN case FONT_DRIVER_RENDER_VULKAN_API: return vulkan_font_init_first(font_driver, font_handle, diff --git a/gfx/video_driver.c b/gfx/video_driver.c index f9df3a37ad..fd2069696f 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -381,14 +381,14 @@ static const gfx_ctx_driver_t *gfx_ctx_drivers[] = { #if defined(HAVE_OPENDINGUX_FBDEV) &gfx_ctx_opendingux_fbdev, #endif -#if defined(_WIN32) && (defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_VULKAN)) +#if defined(_WIN32) && (defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) || defined(HAVE_VULKAN)) &gfx_ctx_wgl, #endif #if defined(HAVE_WAYLAND) &gfx_ctx_wayland, #endif #if defined(HAVE_X11) && !defined(HAVE_OPENGLES) -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_VULKAN) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) || defined(HAVE_VULKAN) &gfx_ctx_x, #endif #endif @@ -410,7 +410,7 @@ static const gfx_ctx_driver_t *gfx_ctx_drivers[] = { #if defined(__APPLE__) && !defined(TARGET_IPHONE_SIMULATOR) && !defined(TARGET_OS_IPHONE) &gfx_ctx_cgl, #endif -#if (defined(HAVE_SDL) || defined(HAVE_SDL2)) && (defined(HAVE_OPENGL) || defined(HAVE_OPENGL1)) +#if (defined(HAVE_SDL) || defined(HAVE_SDL2)) && (defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE)) &gfx_ctx_sdl_gl, #endif #ifdef HAVE_OSMESA @@ -512,7 +512,7 @@ static bool hw_render_context_is_vulkan(enum retro_hw_context_type type) } #endif -#if defined(HAVE_OPENGL) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL_CORE) static bool hw_render_context_is_gl(enum retro_hw_context_type type) { switch (type) @@ -1921,7 +1921,7 @@ bool video_driver_find_driver(void) } #endif -#if defined(HAVE_OPENGL) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL_CORE) if (hwr && hw_render_context_is_gl(hwr->context_type)) { RARCH_LOG("[Video]: Using HW render, OpenGL driver forced.\n"); diff --git a/griffin/griffin.c b/griffin/griffin.c index 0c8aef37d1..c08b514184 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -420,11 +420,12 @@ VIDEO DRIVER #include "../gfx/drivers/gl1.c" #endif -#ifdef HAVE_OPENGL -#include "../gfx/drivers/gl.c" #ifdef HAVE_OPENGL_CORE #include "../gfx/drivers/gl_core.c" #endif + +#ifdef HAVE_OPENGL +#include "../gfx/drivers/gl.c" #include "../libretro-common/gfx/gl_capabilities.c" #ifndef HAVE_PSGL @@ -506,10 +507,11 @@ FONTS #if defined(HAVE_OPENGL) #include "../gfx/drivers_font/gl_raster_font.c" +#endif + #ifdef HAVE_OPENGL_CORE #include "../gfx/drivers_font/gl_core_raster_font.c" #endif -#endif #if defined(_XBOX1) #include "../gfx/drivers_font/xdk1_xfonts.c" @@ -1275,10 +1277,11 @@ MENU #ifdef HAVE_OPENGL #include "../menu/drivers_display/menu_display_gl.c" +#endif + #ifdef HAVE_OPENGL_CORE #include "../menu/drivers_display/menu_display_gl_core.c" #endif -#endif #ifdef HAVE_VULKAN #include "../menu/drivers_display/menu_display_vulkan.c" diff --git a/griffin/griffin_cpp.cpp b/griffin/griffin_cpp.cpp index 06fb0f002d..74fb96808a 100644 --- a/griffin/griffin_cpp.cpp +++ b/griffin/griffin_cpp.cpp @@ -99,7 +99,7 @@ VIDEO DRIVER #include "../gfx/drivers_shader/shader_vulkan.cpp" #endif -#if defined(HAVE_OPENGL) && defined(HAVE_OPENGL_CORE) +#if defined(HAVE_OPENGL_CORE) #include "../gfx/drivers_shader/shader_gl_core.cpp" #endif diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index f12cf7faad..9dd8b2fb48 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -321,7 +321,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info) static unsigned menu_displaylist_parse_system_info(menu_displaylist_info_t *info) { int controller; -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGLES) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGLES) || defined(HAVE_OPENGL_CORE) gfx_ctx_ident_t ident_info; #endif char tmp[8192]; @@ -653,7 +653,7 @@ static unsigned menu_displaylist_parse_system_info(menu_displaylist_info_t *info } } -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGLES) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGLES) || defined(HAVE_OPENGL_CORE) video_context_driver_get_ident(&ident_info); tmp_string = ident_info.ident;