Merge pull request #1382 from ts-korhonen/opengl
OpenGL renderer a.k.a. shader support
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
# include <86box/vnc.h>
|
||||
#endif
|
||||
#include <86box/win_sdl.h>
|
||||
#include <86box/win_opengl.h>
|
||||
#include <86box/win.h>
|
||||
#include <86box/version.h>
|
||||
#ifdef MTR_ENABLED
|
||||
@@ -99,11 +100,16 @@ static const struct {
|
||||
void (*enable)(int enable);
|
||||
void (*set_fs)(int fs);
|
||||
} 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_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*))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 }
|
||||
,{ "VNC", 0, vnc_init, vnc_close, vnc_resize, vnc_pause, NULL, NULL }
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -777,7 +783,7 @@ plat_get_extension(char *s)
|
||||
|
||||
|
||||
void
|
||||
plat_append_filename(char *dest, char *s1, char *s2)
|
||||
plat_append_filename(char *dest, const char *s1, const char *s2)
|
||||
{
|
||||
strcpy(dest, s1);
|
||||
plat_path_slash(dest);
|
||||
@@ -922,9 +928,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
|
||||
|
||||
Reference in New Issue
Block a user