Update libretro-test-gl core

This commit is contained in:
twinaphex 2016-09-05 03:38:02 +02:00
parent 0ab04d812d
commit e6aaecc2ba
4 changed files with 14 additions and 14 deletions

View File

@ -27,7 +27,7 @@ static struct retro_hw_render_callback hw_render;
#define BASE_WIDTH 320
#define BASE_HEIGHT 240
#ifdef GLES
#ifdef HAVE_OPENGLES
#define MAX_WIDTH 1024
#define MAX_HEIGHT 1024
#else
@ -94,7 +94,7 @@ void retro_set_environment(retro_environment_t cb)
struct retro_variable variables[] = {
{
"testgl_resolution",
#ifdef GLES
#ifdef HAVE_OPENGLES
"Internal resolution; 320x240|360x480|480x272|512x384|512x512|640x240|640x448|640x480|720x576|800x600|960x720|1024x768",
#else
"Internal resolution; 320x240|360x480|480x272|512x384|512x512|640x240|640x448|640x480|720x576|800x600|960x720|1024x768|1024x1024|1280x720|1280x960|1600x1200|1920x1080|1920x1440|1920x1600|2048x2048",
@ -244,7 +244,7 @@ static void context_destroy(void)
fprintf(stderr, "Context destroy!\n");
}
#ifdef GLES
#ifdef HAVE_OPENGLES
static bool retro_init_hw_context(void)
{
#if defined(GLES31)

View File

@ -67,7 +67,7 @@ endif
GL_LIB := -framework OpenGLES
DEFINES := -DIOS
CFLAGS += -DGLES $(DEFINES)
CFLAGS += -DHAVE_OPENGLES $(DEFINES)
CC = cc -arch armv7 -isysroot $(IOSSDK)
ifeq ($(platform),ios9)
CC += -miphoneos-version-min=8.0
@ -84,7 +84,6 @@ else ifneq (,$(findstring qnx,$(platform)))
CC = qcc -Vgcc_ntoarmv7le
AR = qcc -Vgcc_ntoarmv7le
CFLAGS += -DGLES
GL_LIB := -lGLESv2
GLES := 1
else ifneq (,$(findstring armv,$(platform)))
@ -140,11 +139,11 @@ OBJECTS := libretro_gl_test.o ../../libretro-common/glsym/rglgen.o
CFLAGS += -Wall -pedantic $(fpic)
ifeq ($(GLES), 1)
CFLAGS += -DGLES -DHAVE_OPENGLES2
CFLAGS += -DHAVE_OPENGLES -DHAVE_OPENGLES2
ifeq ($(GLES31), 1)
CFLAGS += -DHAVE_OPENGLES3 -DGLES31 -DGLES3
CFLAGS += -DHAVE_OPENGLES3 -DHAVE_OPENGLES_3_1
else ifeq ($(GLES3), 1)
CFLAGS += -DHAVE_OPENGLES3 -DGLES3
CFLAGS += -DHAVE_OPENGLES3
endif
LIBS += -lGLESv2 # Still link against GLESv2 when using GLES3 API, at least on desktop Linux.
OBJECTS += ../../libretro-common/glsym/glsym_es2.o

View File

@ -21,11 +21,12 @@ ifeq ($(GLES), 3)
LOCAL_CFLAGS += -DHAVE_OPENGLES3 -DGLES3
GLES_LIB := -lGLESv3
else
LOCAL_CFLAGS += -DHAVE_OPENGLES2 -DGLES3
GLES_LIB := -lGLESv2
endif
LOCAL_SRC_FILES += $(addprefix ../,$(wildcard *.c) ../../../libretro-common/glsym/rglgen.c ../../../libretro-common/glsym/glsym_es2.c)
LOCAL_CFLAGS += -O2 -Wall -std=gnu99 -ffast-math -DGLES -DHAVE_OPENGLES2 -I../../../libretro-common/include
LOCAL_CFLAGS += -O2 -Wall -std=gnu99 -ffast-math -DHAVE_OPENGLES -I../../../libretro-common/include
LOCAL_LDLIBS += $(GLES_LIB)
include $(BUILD_SHARED_LIBRARY)

View File

@ -27,7 +27,7 @@ static struct retro_hw_render_callback hw_render;
#define BASE_WIDTH 320
#define BASE_HEIGHT 240
#ifdef GLES
#ifdef HAVE_OPENGLES
#define MAX_WIDTH 1024
#define MAX_HEIGHT 1024
#else
@ -251,7 +251,7 @@ void retro_set_environment(retro_environment_t cb)
struct retro_variable variables[] = {
{
"testgl_resolution",
#ifdef GLES
#ifdef HAVE_OPENGLES
"Internal resolution; 320x240|360x480|480x272|512x384|512x512|640x240|640x448|640x480|720x576|800x600|960x720|1024x768",
#else
"Internal resolution; 320x240|360x480|480x272|512x384|512x512|640x240|640x448|640x480|720x576|800x600|960x720|1024x768|1024x1024|1280x720|1280x960|1600x1200|1920x1080|1920x1440|1920x1600|2048x2048",
@ -458,14 +458,14 @@ static void context_destroy(void)
prog = 0;
}
#ifdef GLES
#ifdef HAVE_OPENGLES
static bool retro_init_hw_context(void)
{
#if defined(GLES31)
#if defined(HAVE_OPENGLES_3_1)
hw_render.context_type = RETRO_HW_CONTEXT_OPENGLES_VERSION;
hw_render.version_major = 3;
hw_render.version_minor = 1;
#elif defined(GLES3)
#elif defined(HAVE_OPENGLES3)
hw_render.context_type = RETRO_HW_CONTEXT_OPENGLES3;
#else
hw_render.context_type = RETRO_HW_CONTEXT_OPENGLES2;