diff --git a/src/include/86box/resource.h b/src/include/86box/resource.h index 3a029a25f..d2901b40f 100644 --- a/src/include/86box/resource.h +++ b/src/include/86box/resource.h @@ -306,8 +306,9 @@ #define IDM_VID_SDL_SW 40050 #define IDM_VID_SDL_HW 40051 #define IDM_VID_SDL_OPENGL 40052 +#define IDM_VID_OPENGL_CORE 40053 #ifdef USE_VNC -#define IDM_VID_VNC 40053 +#define IDM_VID_VNC 40054 #endif #define IDM_VID_SCALE_1X 40055 #define IDM_VID_SCALE_2X 40056 diff --git a/src/include/86box/win.h b/src/include/86box/win.h index 0f0162c11..449eb2c6a 100644 --- a/src/include/86box/win.h +++ b/src/include/86box/win.h @@ -85,9 +85,9 @@ DECLARE_HANDLE(DPI_AWARENESS_CONTEXT); #define WM_HAS_SHUTDOWN 0x8897 #ifdef USE_VNC -#define RENDERERS_NUM 4 +#define RENDERERS_NUM 5 #else -#define RENDERERS_NUM 3 +#define RENDERERS_NUM 4 #endif diff --git a/src/win/86Box.rc b/src/win/86Box.rc index c9dd1e072..382c7e48a 100644 --- a/src/win/86Box.rc +++ b/src/win/86Box.rc @@ -66,6 +66,9 @@ BEGIN MENUITEM "&SDL (Software)", IDM_VID_SDL_SW MENUITEM "SDL (&Hardware)", IDM_VID_SDL_HW MENUITEM "SDL (&OpenGL)", IDM_VID_SDL_OPENGL +#ifdef DEV_BRANCH + MENUITEM "Open&GL (3.3 Core)", IDM_VID_OPENGL_CORE +#endif #ifdef USE_VNC MENUITEM "&VNC", IDM_VID_VNC #endif diff --git a/src/win/win.c b/src/win/win.c index 886f923dd..4b2b55809 100644 --- a/src/win/win.c +++ b/src/win/win.c @@ -102,7 +102,12 @@ static const struct { } vid_apis[RENDERERS_NUM] = { { "SDL_Software", 1, (int(*)(void*))sdl_inits, sdl_close, NULL, sdl_pause, sdl_enable, sdl_set_fs }, { "SDL_Hardware", 1, (int(*)(void*))sdl_inith, sdl_close, NULL, sdl_pause, sdl_enable, sdl_set_fs }, - { "SDL_OpenGL", 1, (int(*)(void*))opengl_init, opengl_close, opengl_resize, opengl_pause, NULL, opengl_set_fs } + { "SDL_OpenGL", 1, (int(*)(void*))sdl_initho, sdl_close, NULL, sdl_pause, sdl_enable, sdl_set_fs } +#ifdef DEV_BRANCH + ,{ "OpenGL_Core", 1, (int(*)(void*))opengl_init, opengl_close, opengl_resize, opengl_pause, NULL, opengl_set_fs} +#else + ,{ "OpenGL_Core", 1, (int(*)(void*))sdl_initho, sdl_close, NULL, sdl_pause, sdl_enable, sdl_set_fs } /* fall back to SDL_OpenGL */ +#endif #ifdef USE_VNC ,{ "VNC", 0, vnc_init, vnc_close, vnc_resize, vnc_pause, NULL, NULL } #endif @@ -920,9 +925,17 @@ plat_vidapi_name(int api) case 2: name = "sdl_opengl"; break; - -#ifdef USE_VNC +#ifdef DEV_BRANCH case 3: + name = "opengl_core"; + break; +#else + case 3: + name = "sdl_opengl"; /* fall back to SDL_OpenGL */ + break; +#endif +#ifdef USE_VNC + case 4: name = "vnc"; break; #endif diff --git a/src/win/win_ui.c b/src/win/win_ui.c index de76d142b..57618c9a1 100644 --- a/src/win/win_ui.c +++ b/src/win/win_ui.c @@ -223,6 +223,9 @@ ResetAllMenus(void) CheckMenuItem(menuMain, IDM_VID_SDL_SW, MF_UNCHECKED); CheckMenuItem(menuMain, IDM_VID_SDL_HW, MF_UNCHECKED); CheckMenuItem(menuMain, IDM_VID_SDL_OPENGL, MF_UNCHECKED); +#ifdef DEV_BRANCH + CheckMenuItem(menuMain, IDM_VID_OPENGL_CORE, MF_UNCHECKED); +#endif #ifdef USE_VNC CheckMenuItem(menuMain, IDM_VID_VNC, MF_UNCHECKED); #endif @@ -669,6 +672,9 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case IDM_VID_SDL_SW: case IDM_VID_SDL_HW: case IDM_VID_SDL_OPENGL: +#ifdef DEV_BRANCH + case IDM_VID_OPENGL_CORE: +#endif #ifdef USE_VNC case IDM_VID_VNC: #endif