aboutsummaryrefslogtreecommitdiff
path: root/plugins/gpu-gles
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gpu-gles')
-rw-r--r--plugins/gpu-gles/Makefile2
-rw-r--r--plugins/gpu-gles/gpuDraw.c46
-rw-r--r--plugins/gpu-gles/gpuExternals.h11
-rw-r--r--plugins/gpu-gles/gpuPlugin.c4
-rw-r--r--plugins/gpu-gles/gpuPlugin.h29
-rw-r--r--plugins/gpu-gles/gpuStdafx.h18
6 files changed, 18 insertions, 92 deletions
diff --git a/plugins/gpu-gles/Makefile b/plugins/gpu-gles/Makefile
index 4b61b6f..8a3f244 100644
--- a/plugins/gpu-gles/Makefile
+++ b/plugins/gpu-gles/Makefile
@@ -15,7 +15,7 @@ endif
CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8
# note: the below causes strange bugs/crashes
#CFLAGS += -mfloat-abi=softfp
-CFLAGS += -DMAEMO_CHANGES # -DUSE_X11
+#CFLAGS += -DUSE_X11
CFLAGS += -I$(PREFIX)include
TARGET = gpuGLES.so
diff --git a/plugins/gpu-gles/gpuDraw.c b/plugins/gpu-gles/gpuDraw.c
index 4f639c1..2eaa825 100644
--- a/plugins/gpu-gles/gpuDraw.c
+++ b/plugins/gpu-gles/gpuDraw.c
@@ -308,11 +308,9 @@ void CreateScanLines(void)
HGLRC GLCONTEXT=NULL;
#endif
-#ifdef MAEMO_CHANGES
#define MODE_RAW 0
#define MODE_X11 1
#define MODE_SDL 2
-int pandora_driver_mode = MODE_RAW;
int use_fsaa = 0;
EGLDisplay display;
@@ -345,9 +343,7 @@ EGLint attrib_list_fsaa[] =
EGLint attrib_list[] =
{
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
- EGL_BUFFER_SIZE, 0,
- EGL_DEPTH_SIZE, 16,
+// EGL_DEPTH_SIZE, 16,
EGL_NONE
};
@@ -368,7 +364,8 @@ bool TestEGLError(const char* pszLocation)
return TRUE;
}
-void maemoGLinit(){
+static void initEGL(void)
+{
printf ("GL init\n");
EGLint numConfigs;
@@ -400,15 +397,6 @@ void maemoGLinit(){
}
#if defined(USE_X11)
- pandora_driver_mode = MODE_X11; // TODO make configurable
-#else
- pandora_driver_mode = MODE_RAW; // TODO make configurable
-#endif
-
- switch(pandora_driver_mode)
- {
-#if defined(USE_X11)
- case MODE_X11:
// Initializes the display and screen
x11Display = XOpenDisplay( ":0" );
if (!x11Display)
@@ -463,13 +451,9 @@ void maemoGLinit(){
XSendEvent(x11Display, DefaultRootWindow(x11Display), False, SubstructureRedirectMask | SubstructureNotifyMask, &xev);
display = eglGetDisplay( (EGLNativeDisplayType)x11Display );
- break;
-#endif
- case MODE_RAW:
- default:
+#else
display = eglGetDisplay( (EGLNativeDisplayType)0 );
- break;
- }
+#endif
if( display == EGL_NO_DISPLAY )
{
@@ -492,18 +476,11 @@ void maemoGLinit(){
printf( "GLES EGL Error: eglCreateContext failed\n" );
}
- switch(pandora_driver_mode)
- {
#if defined(USE_X11)
- case MODE_X11:
surface = eglCreateWindowSurface( display, config, (EGLNativeDisplayType)x11Window, NULL );
- break;
-#endif
- case MODE_RAW:
- default:
+#else
surface = eglCreateWindowSurface( display, config, (EGLNativeDisplayType)0, NULL );
- break;
- }
+#endif
eglMakeCurrent( display, surface, surface, context );
if (!TestEGLError("eglMakeCurrent"))
@@ -511,7 +488,6 @@ void maemoGLinit(){
else
printf("GLES Window Opened\n");
}
-#endif
int GLinitialize()
{
@@ -526,9 +502,8 @@ int GLinitialize()
// CheckWGLExtensions(dcGlobal);
if(bWindowMode) ReleaseDC(hWWindow,dcGlobal); // win mode: release dc again
#endif
-#ifdef MAEMO_CHANGES
- maemoGLinit();
-#endif
+ initEGL();
+
//----------------------------------------------------//
glViewport(rRatioRect.left, // init viewport by ratio rect
@@ -629,12 +604,9 @@ void GLcleanup()
eglTerminate( display );
#if defined(USE_X11)
- if (pandora_driver_mode == MODE_X11)
- {
if (x11Window) XDestroyWindow(x11Display, x11Window);
if (x11Colormap) XFreeColormap( x11Display, x11Colormap );
if (x11Display) XCloseDisplay(x11Display);
- }
#endif
}
diff --git a/plugins/gpu-gles/gpuExternals.h b/plugins/gpu-gles/gpuExternals.h
index 8d30814..f88b37b 100644
--- a/plugins/gpu-gles/gpuExternals.h
+++ b/plugins/gpu-gles/gpuExternals.h
@@ -33,19 +33,12 @@
extern "C" {
#endif
-#ifndef _WINDOWS
#ifdef __NANOGL__
#include <gl/gl.h>
#include <gl/egl.h>
#else
-#ifdef SOFT_LINKAGE
-#pragma softfp_linkage
-#endif
-#include <GLES/gl.h> // for opengl es types
-#ifdef SOFT_LINKAGE
-#pragma no_softfp_linkage
-#endif
-#endif
+#include <GLES/gl.h>
+#include <GLES/glext.h>
#endif
#ifdef __NANOGL__
diff --git a/plugins/gpu-gles/gpuPlugin.c b/plugins/gpu-gles/gpuPlugin.c
index 81b7f05..368c5ce 100644
--- a/plugins/gpu-gles/gpuPlugin.c
+++ b/plugins/gpu-gles/gpuPlugin.c
@@ -560,9 +560,7 @@ long CALLBACK GPUopen(int hwndGPU)
#ifdef _WINDOWS
iResX=240;iResY=320;
#endif
-#ifdef MAEMO_CHANGES
- iResX=800;iResY=480;
-#endif
+ iResX=800;iResY=480;
iColDepth=8;
bChangeRes=FALSE;
#ifdef _WINDOWS
diff --git a/plugins/gpu-gles/gpuPlugin.h b/plugins/gpu-gles/gpuPlugin.h
index e9a66af..768ebe1 100644
--- a/plugins/gpu-gles/gpuPlugin.h
+++ b/plugins/gpu-gles/gpuPlugin.h
@@ -46,34 +46,9 @@ extern "C" {
#define GREEN(x) ((x>>8) & 0xff)
#define COLOR(x) (x & 0xffffff)
-#ifdef _WINDOWS
-#include "Externals.h"
-#include "plugin.h"
-#include <gl/gl.h>
-#else
-//#ifndef MAEMO_CHANGES
-// #include "psxCommon.h"
-//#else
-// #include "../psxCommon.h"
-//#endif
+
#include "gpuExternals.h"
-#ifdef __NANOGL__
-#include <gl/gl.h>
-#else
-#ifdef SOFT_LINKAGE
-#pragma softfp_linkage
-#endif
-#ifndef MAEMO_CHANGES
- #include <gles/gl.h> // for opengl es types
- #include <gles/egltypes.h>
-#else
-#include "gpuStdafx.h"
-#endif
-#ifdef SOFT_LINKAGE
-#pragma no_softfp_linkage
-#endif
-#endif
-#endif
+
/////////////////////////////////////////////////////////////////////////////
#define CALLBACK
diff --git a/plugins/gpu-gles/gpuStdafx.h b/plugins/gpu-gles/gpuStdafx.h
index bc34898..3a6a1c5 100644
--- a/plugins/gpu-gles/gpuStdafx.h
+++ b/plugins/gpu-gles/gpuStdafx.h
@@ -66,21 +66,9 @@ extern "C" {
#ifdef SOFT_LINKAGE
#pragma softfp_linkage
#endif
-#ifdef MAEMO_CHANGES
-
- //#include <GLES/glplatform.h>
- #include <GLES/gl.h>
- //#include <GLES/glext.h>
- #include <GLES/EGL/egl.h>
- //#include "../maemo/minimal.h"
- //#include <gdk/gdkx.h>
- //#include <gdk/gdk.h>
-
-
-#else
- #include <gles/gl.h> // for opengl es types
- #include <gles/egltypes.h>
-#endif
+#include <GLES/gl.h> // for opengl es types
+//#include <GLES/egltypes.h>
+#include <EGL/egl.h>
#ifdef SOFT_LINKAGE
#pragma no_softfp_linkage
#endif