1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-05 09:48:42 +00:00

Add further HAVE_OPENGL1 support

This commit is contained in:
twinaphex 2019-02-17 10:41:48 +01:00
parent 542f2f4262
commit 158a442036
6 changed files with 31 additions and 16 deletions

View File

@ -9,17 +9,25 @@ endif
ifeq ($(HAVE_GL_CONTEXT),) ifeq ($(HAVE_GL_CONTEXT),)
HAVE_GL_CONTEXT=0 HAVE_GL_CONTEXT=0
HAVE_GL_MODERN=0
ifeq ($(HAVE_OPENGL), 1) ifeq ($(HAVE_OPENGL), 1)
HAVE_GL_CONTEXT=1
HAVE_GL_MODERN=1
endif
ifeq ($(HAVE_OPENGL1), 1)
HAVE_GL_CONTEXT=1 HAVE_GL_CONTEXT=1
endif endif
ifeq ($(HAVE_OPENGLES), 1) ifeq ($(HAVE_OPENGLES), 1)
HAVE_GL_CONTEXT=1 HAVE_GL_CONTEXT=1
HAVE_GL_MODERN=1
endif endif
ifeq ($(HAVE_OPENGLES3), 1) ifeq ($(HAVE_OPENGLES3), 1)
HAVE_GL_CONTEXT=1 HAVE_GL_CONTEXT=1
HAVE_GL_MODERN=1
endif endif
endif endif
@ -1057,19 +1065,25 @@ ifeq ($(HAVE_PLAIN_DRM), 1)
endif endif
ifeq ($(HAVE_GL_CONTEXT), 1) ifeq ($(HAVE_GL_CONTEXT), 1)
DEFINES += -DHAVE_OPENGL -DHAVE_GLSL ifeq ($(HAVE_GL_MODERN), 1)
OBJ += gfx/drivers/gl.o \ DEFINES += -DHAVE_OPENGL
$(LIBRETRO_COMM_DIR)/gfx/gl_capabilities.o \ OBJ += gfx/drivers/gl.o \
gfx/drivers_font/gl_raster_font.o \ $(LIBRETRO_COMM_DIR)/gfx/gl_capabilities.o \
$(LIBRETRO_COMM_DIR)/glsym/rglgen.o gfx/drivers_font/gl_raster_font.o
endif
OBJ += $(LIBRETRO_COMM_DIR)/glsym/rglgen.o
ifeq ($(HAVE_OPENGL1), 1) ifeq ($(HAVE_OPENGL1), 1)
DEFINES += -DHAVE_OPENGL1
OBJ += gfx/drivers/gl1.o \ OBJ += gfx/drivers/gl1.o \
gfx/drivers_font/gl1_raster_font.o gfx/drivers_font/gl1_raster_font.o
endif endif
ifeq ($(HAVE_MENU_COMMON), 1) ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/drivers_display/menu_display_gl.o ifeq ($(HAVE_GL_MODERN), 1)
OBJ += menu/drivers_display/menu_display_gl.o
endif
ifeq ($(HAVE_OPENGL1), 1) ifeq ($(HAVE_OPENGL1), 1)
OBJ += menu/drivers_display/menu_display_gl1.o OBJ += menu/drivers_display/menu_display_gl1.o
@ -1107,7 +1121,7 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
endif endif
ifeq ($(HAVE_OSMESA), 1) ifeq ($(HAVE_OSMESA), 1)
OBJ += gfx/drivers_context/osmesa_ctx.o OBJ += gfx/drivers_context/osmesa_ctx.o
LIBS += -lOSMesa LIBS += -lOSMesa
endif endif
@ -1164,7 +1178,10 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
LIBS += $(GL_LIBS) LIBS += $(GL_LIBS)
endif endif
OBJ += gfx/drivers_shader/shader_glsl.o ifeq ($(HAVE_GL_MODERN), 1)
DEFINES += -DHAVE_GLSL
OBJ += gfx/drivers_shader/shader_glsl.o
endif
endif endif
ifeq ($(HAVE_EGL), 1) ifeq ($(HAVE_EGL), 1)

View File

@ -49,7 +49,6 @@
#ifdef HAVE_OPENGL #ifdef HAVE_OPENGL
#include "../common/gl_common.h" #include "../common/gl_common.h"
#include <gfx/gl_capabilities.h>
#endif #endif
#ifdef HAVE_VULKAN #ifdef HAVE_VULKAN

View File

@ -25,7 +25,6 @@
#ifdef HAVE_OPENGL #ifdef HAVE_OPENGL
#include <GL/glx.h> #include <GL/glx.h>
#include <gfx/gl_capabilities.h>
#ifndef GLX_SAMPLE_BUFFERS #ifndef GLX_SAMPLE_BUFFERS
#define GLX_SAMPLE_BUFFERS 100000 #define GLX_SAMPLE_BUFFERS 100000

View File

@ -261,10 +261,10 @@ struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END] = {
static const video_driver_t *video_drivers[] = { static const video_driver_t *video_drivers[] = {
#ifdef HAVE_OPENGL #ifdef HAVE_OPENGL
&video_gl2, &video_gl2,
#endif
#ifdef HAVE_OPENGL1 #ifdef HAVE_OPENGL1
&video_gl1, &video_gl1,
#endif #endif
#endif
#ifdef HAVE_VULKAN #ifdef HAVE_VULKAN
&video_vulkan, &video_vulkan,
#endif #endif

View File

@ -51,18 +51,18 @@ enum gl_capability_enum
GL_CAPS_TEX_STORAGE_EXT GL_CAPS_TEX_STORAGE_EXT
}; };
bool gl_check_error(char **error_string);
bool gl_query_core_context_in_use(void); bool gl_query_core_context_in_use(void);
void gl_query_core_context_set(bool set); void gl_query_core_context_set(bool set);
void gl_query_core_context_unset(void); void gl_query_core_context_unset(void);
bool gl_check_capability(enum gl_capability_enum enum_idx);
bool gl_query_extension(const char *ext); bool gl_query_extension(const char *ext);
bool gl_check_error(char **error_string);
bool gl_check_capability(enum gl_capability_enum enum_idx);
RETRO_END_DECLS RETRO_END_DECLS
#endif #endif

View File

@ -126,10 +126,10 @@ static menu_display_ctx_driver_t *menu_display_ctx_drivers[] = {
#endif #endif
#ifdef HAVE_OPENGL #ifdef HAVE_OPENGL
&menu_display_ctx_gl, &menu_display_ctx_gl,
#endif
#ifdef HAVE_OPENGL1 #ifdef HAVE_OPENGL1
&menu_display_ctx_gl1, &menu_display_ctx_gl1,
#endif #endif
#endif
#ifdef HAVE_VULKAN #ifdef HAVE_VULKAN
&menu_display_ctx_vulkan, &menu_display_ctx_vulkan,
#endif #endif