From 989731bbd08a2abcfdfefb8136510eac8daf5046 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Fri, 25 May 2012 16:00:17 +0200 Subject: [PATCH] Add HAVE_OPENGLES define to Makefile.ps3 - add HAVE_OPENGLES ifdef to gl.c --- Makefile.ps3 | 2 +- gfx/gl.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile.ps3 b/Makefile.ps3 index 49f501fcb4..0e45b3e6c3 100644 --- a/Makefile.ps3 +++ b/Makefile.ps3 @@ -68,7 +68,7 @@ endif PPU_LDLIBS = -ldbgfont $(GL_LIBS) -lretro -lcgc -lgcm_cmd -lgcm_sys_stub -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysutil_game_stub -lsysutil_screenshot_stub -lsysutil_np_stub -lpngdec_stub -ljpgdec_stub -lsysmodule_stub -laudio_stub -lnet_stub -lnetctl_stub -lpthread -DEFINES += -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_CG -DHAVE_FILEBROWSER -DHAVE_FBO -DHAVE_RARCH_MAIN_WRAP -DHAVE_RARCH_EXEC -DHAVE_RGL -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_GRIFFIN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) +DEFINES += -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_CG -DHAVE_FILEBROWSER -DHAVE_FBO -DHAVE_RARCH_MAIN_WRAP -DHAVE_RARCH_EXEC -DHAVE_RGL -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_GRIFFIN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) ifeq ($(DEBUG), 1) PPU_OPTIMIZE_LV := -O0 -g diff --git a/gfx/gl.c b/gfx/gl.c index bb62bc123b..21f525e1b3 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -102,6 +102,16 @@ static bool load_fbo_proc(void) return pglGenFramebuffers && pglBindFramebuffer && pglFramebufferTexture2D && pglCheckFramebufferStatus && pglDeleteFramebuffers; } +#elif defined(HAVE_OPENGLES) +#define pglGenFramebuffers glGenFramebuffersOES +#define pglBindFramebuffer glBindFramebufferOES +#define pglFramebufferTexture2D glFramebufferTexture2DOES +#define pglCheckFramebufferStatus glCheckFramebufferStatusOES +#define pglDeleteFramebuffers glDeleteFramebuffersOES +#define GL_FRAMEBUFFER (GL_FRAMEBUFFER_OES) +#define GL_COLOR_ATTACHMENT0 (GL_COLOR_ATTACHMENT0_EXT) +#define GL_FRAMEBUFFER_COMPLETE (GL_FRAMEBUFFER_COMPLETE_OES) +static bool load_fbo_proc(void) { return true; } #else #define pglGenFramebuffers glGenFramebuffers #define pglBindFramebuffer glBindFramebuffer