--- /dev/null
+##############################################################################\r
+# MAKEFILE FOR PETE'S MESAGL GPU... just run "make"\r
+##############################################################################\r
+\r
+##############################################################################\r
+# 1. SETS (CCFLAGS3 is used)\r
+##############################################################################\r
+\r
+PREFIX = /mythtv/media/devel/toolchains/pandora/arm-2007q3\r
+TARGET = arm-none-linux-gnueabi-\r
+\r
+CC = $(PREFIX)/bin/$(TARGET)gcc\r
+\r
+CCFLAGS = -fPIC -c -Wall -O3 -ffast-math -fomit-frame-pointer -DMAEMO_CHANGES -DUSE_X11\r
+\r
+\r
+INCLUDE = -I$(PREFIX)/include\r
+LINK = $(PREFIX)/bin/$(TARGET)gcc\r
+LINKFLAGS = -shared -Wl,-soname,libgpuGLES.so -o libgpuGLES.so.1.0.0\r
+OBJ = gpuDraw.o gpuFps.o gpuPlugin.o gpuPrim.o gpuTexture.o\r
+\r
+LIB = -L$(PREFIX)/lib -lGLES_CM -lX11 -lXau -lXdmcp -lstdc++\r
+\r
+##############################################################################\r
+# 2. MAIN RULE\r
+##############################################################################\r
+\r
+gpuPeopsMesaGL : $(OBJ)\r
+ $(LINK) $(LINKFLAGS) $(OBJ) $(LIB)\r
+\r
+##############################################################################\r
+# 3. GENERAL RULES\r
+##############################################################################\r
+\r
+%.o : %.c\r
+ $(CC) $(CCFLAGS) $(INCLUDE) $<\r
+\r
+##############################################################################\r
+# 4. SPECIFIC RULES\r
+##############################################################################\r
+\r
+clean:\r
+ rm *.o libgpuGLES.so*
\ No newline at end of file
#include "texture.h"\r
#else\r
#include "gpuExternals.h"\r
-#include "GPUPlugin.h"\r
+#include "gpuPlugin.h"\r
#include "gpuDraw.h"\r
#include "gpuPrim.h"\r
#include "gpuTexture.h"\r
#endif\r
\r
#ifdef MAEMO_CHANGES\r
+#define MODE_RAW 0\r
+#define MODE_X11 1\r
+#define MODE_SDL 2\r
+int pandora_driver_mode = MODE_RAW;\r
+int use_fsaa = 0;\r
+\r
+EGLDisplay display;\r
+EGLConfig config;\r
+EGLContext context;\r
+EGLSurface surface;\r
+\r
+#if defined(USE_X11)\r
+#include "X11/Xlib.h"\r
+#include "X11/Xutil.h"\r
+#include "X11/Xatom.h"\r
+\r
+Window x11Window = 0;\r
+Display* x11Display = 0;\r
+long x11Screen = 0;\r
+XVisualInfo x11Visual;\r
+XVisualInfo* px11Visual = 0;\r
+Colormap x11Colormap = 0;\r
+#endif\r
+\r
+EGLint attrib_list_fsaa[] =\r
+{\r
+ EGL_SURFACE_TYPE, EGL_WINDOW_BIT,\r
+ EGL_BUFFER_SIZE, 0,\r
+ EGL_DEPTH_SIZE, 16,\r
+ EGL_SAMPLE_BUFFERS, 1,\r
+ EGL_SAMPLES, 4,\r
+ EGL_NONE\r
+};\r
+\r
+EGLint attrib_list[] =\r
+{\r
+ EGL_SURFACE_TYPE, EGL_WINDOW_BIT,\r
+ EGL_BUFFER_SIZE, 0,\r
+ EGL_DEPTH_SIZE, 16,\r
+ EGL_NONE\r
+};\r
+\r
bool TestEGLError(const char* pszLocation)\r
{\r
/*\r
if (iErr != EGL_SUCCESS)\r
{\r
printf("%s failed (%d).\n", pszLocation, iErr);\r
- return false;\r
+ return FALSE;\r
}\r
\r
- return true;\r
+ return TRUE;\r
}\r
\r
void maemoGLinit(){\r
- iResX= 800;\r
- iResY =480;\r
+ printf ("GL init\n");\r
\r
+ EGLint numConfigs;\r
+ EGLint majorVersion;\r
+ EGLint minorVersion;\r
+#if defined(USE_X11)\r
+ enum\r
+ {\r
+ _NET_WM_STATE_REMOVE =0,\r
+ _NET_WM_STATE_ADD = 1,\r
+ _NET_WM_STATE_TOGGLE =2\r
+ };\r
\r
- printf ("maemo GL init\n");\r
- long int winxid=GDK_WINDOW_XID(GTK_WIDGET(windowG)->window);\r
- printf ("%d\n",winxid);\r
+ Window sRootWindow;\r
+ XSetWindowAttributes sWA;\r
+ unsigned int ui32Mask;\r
+ int i32Depth;\r
+#endif\r
\r
- EGLContext context = 0;\r
- EGLConfig eglConfig = 0;\r
- EGLContext eglContext = 0;\r
- display = eglGetDisplay( EGL_DEFAULT_DISPLAY );\r
+ EGLint *attribList = NULL;\r
+ if (use_fsaa)\r
+ {\r
+ printf( "GLES: Using Full Scene Antialiasing\n" );\r
+ attribList = attrib_list_fsaa;\r
+ }\r
+ else\r
+ {\r
+ attribList = attrib_list;\r
+ }\r
+\r
+#if defined(USE_X11)\r
+ pandora_driver_mode = MODE_X11; // TODO make configurable\r
+#else\r
+ pandora_driver_mode = MODE_RAW; // TODO make configurable\r
+#endif\r
\r
- if( eglInitialize( display, NULL, NULL ) == EGL_FALSE )\r
+ switch(pandora_driver_mode)\r
{ \r
- printf( "EGL Initialize failed!\n" );\r
+#if defined(USE_X11)\r
+ case MODE_X11:\r
+ // Initializes the display and screen\r
+ x11Display = XOpenDisplay( ":0" );\r
+ if (!x11Display)\r
+ {\r
+ printf("GLES Error: Unable to open X display\n");\r
+ }\r
+ x11Screen = XDefaultScreen( x11Display );\r
\r
+ // Gets the display parameters so we can pass the same parameters to the window to be created.\r
+ sRootWindow = RootWindow(x11Display, x11Screen);\r
+ i32Depth = DefaultDepth(x11Display, x11Screen);\r
+ px11Visual = &x11Visual;\r
+ XMatchVisualInfo( x11Display, x11Screen, i32Depth, TrueColor, px11Visual);\r
+ if (!px11Visual)\r
+ {\r
+ printf("GLES Error: Unable to acquire visual\n");\r
}\r
+ // Colormap of the specified visual type for the display.\r
+ x11Colormap = XCreateColormap( x11Display, sRootWindow, px11Visual->visual, AllocNone );\r
+ sWA.colormap = x11Colormap;\r
+\r
+ // List of events to be handled by the application. Add to these for handling other events.\r
+ sWA.event_mask = StructureNotifyMask | ExposureMask | ButtonPressMask | ButtonReleaseMask | KeyPressMask | KeyReleaseMask;\r
\r
-const EGLint attributeList[] = { \r
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT, \r
- /*EGL_BUFFER_SIZE, 32, */\r
- EGL_NONE \r
- };\r
+ // Display capabilities list.\r
+ ui32Mask = CWBackPixel | CWBorderPixel | CWEventMask | CWColormap;\r
\r
- EGLint pi32ConfigAttribs[5];\r
- pi32ConfigAttribs[0] = EGL_SURFACE_TYPE;\r
- pi32ConfigAttribs[1] = EGL_WINDOW_BIT;\r
- pi32ConfigAttribs[2] = EGL_RENDERABLE_TYPE;\r
- pi32ConfigAttribs[3] = EGL_OPENGL_ES2_BIT; \r
- pi32ConfigAttribs[4] = EGL_NONE;\r
-\r
- EGLint pi32ContextAttribs[3];\r
- pi32ContextAttribs[0] = EGL_CONTEXT_CLIENT_VERSION;\r
- pi32ContextAttribs[1] = 2;\r
- pi32ContextAttribs[2] = EGL_NONE;\r
-\r
- int iConfigs;\r
- if (!eglChooseConfig(display, attributeList, &eglConfig, 1, &iConfigs) || (iConfigs != 1))\r
+ // Creates the X11 window\r
+ x11Window = XCreateWindow( x11Display, RootWindow(x11Display, x11Screen), 0, 0, iResX, iResY,\r
+ 0, CopyFromParent, InputOutput, CopyFromParent, ui32Mask, &sWA);\r
+\r
+ // Make the window viewable and flush the output buffer.\r
+ XMapWindow(x11Display, x11Window);\r
+ XFlush(x11Display);\r
+\r
+ // Make the window fullscreen\r
+ unsigned char fullScreen = 1;\r
+ Atom wmState = XInternAtom(x11Display, "_NET_WM_STATE", False);\r
+ Atom wmFullScreen = XInternAtom(x11Display,"_NET_WM_STATE_FULLSCREEN", False);\r
+\r
+ XEvent xev;\r
+ xev.xclient.type = ClientMessage;\r
+ xev.xclient.serial = 0;\r
+ xev.xclient.send_event = True;\r
+ xev.xclient.window = x11Window;\r
+ xev.xclient.message_type = wmState;\r
+ xev.xclient.format = 32;\r
+ xev.xclient.data.l[0] = (fullScreen ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE);\r
+ xev.xclient.data.l[1] = wmFullScreen;\r
+ xev.xclient.data.l[2] = 0;\r
+\r
+ XSendEvent(x11Display, DefaultRootWindow(x11Display), False, SubstructureRedirectMask | SubstructureNotifyMask, &xev);\r
+\r
+ display = eglGetDisplay( (EGLNativeDisplayType)x11Display );\r
+ break;\r
+#endif\r
+ case MODE_RAW:\r
+ default:\r
+ display = eglGetDisplay( (EGLNativeDisplayType)0 );\r
+ break;\r
+ }\r
+\r
+ if( display == EGL_NO_DISPLAY )\r
{\r
- printf("Error: eglChooseConfig() failed.\n");\r
+ printf( "GLES EGL Error: GL No Display\n" );\r
}\r
- printf ("%d\n",iConfigs);\r
- surface = eglCreateWindowSurface(display, eglConfig, (void*)winxid, NULL);\r
- printf ("%d\n",surface);\r
- if (!TestEGLError("eglCreateWindowSurface"))\r
+\r
+ if( !eglInitialize( display, &majorVersion, &minorVersion ) )\r
{\r
- printf ("eglCreateWindowSurface fail");\r
+ printf( "GLES EGL Error: eglInitialize failed\n" );\r
}\r
\r
- //context = eglCreateContext(display, eglConfig, NULL, pi32ContextAttribs);\r
- context =eglCreateContext( display, eglConfig,\r
- EGL_NO_CONTEXT, NULL \r
- );\r
-printf ("%d\n",context);\r
- if (!TestEGLError("eglCreateContext"))\r
+ if( !eglChooseConfig( display, attribList, &config, 1, &numConfigs ) )\r
{\r
- printf("error eglCreateContext");\r
+ printf( "GLES EGL Error: eglChooseConfig failed\n" );\r
}\r
\r
- eglMakeCurrent(display, surface, surface, context);\r
+ context = eglCreateContext( display, config, NULL, NULL );\r
+ if( context==0 )\r
+ {\r
+ printf( "GLES EGL Error: eglCreateContext failed\n" );\r
+ }\r
\r
- if (!TestEGLError("eglMakeCurrent"))\r
+ switch(pandora_driver_mode)\r
{\r
- printf("error eglMakeCurrent");\r
+#if defined(USE_X11)\r
+ case MODE_X11:\r
+ surface = eglCreateWindowSurface( display, config, (EGLNativeDisplayType)x11Window, NULL );\r
+ break;\r
+#endif\r
+ case MODE_RAW:\r
+ default:\r
+ surface = eglCreateWindowSurface( display, config, (EGLNativeDisplayType)0, NULL );\r
+ break;\r
}\r
+\r
+ eglMakeCurrent( display, surface, surface, context );\r
+ if (!TestEGLError("eglMakeCurrent"))\r
+ printf("error eglMakeCurrent");\r
+ else\r
+ printf("GLES Window Opened\n");\r
}\r
#endif\r
\r
if(!bWindowMode && dcGlobal) \r
ReleaseDC(hWWindow,dcGlobal);\r
#endif\r
+\r
+ eglMakeCurrent( display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );\r
+ eglDestroySurface( display, surface );\r
+ eglDestroyContext( display, context );\r
+ eglTerminate( display );\r
+\r
+#if defined(USE_X11)\r
+ if (pandora_driver_mode == MODE_X11)\r
+ {\r
+ if (x11Window) XDestroyWindow(x11Display, x11Window);\r
+ if (x11Colormap) XFreeColormap( x11Display, x11Colormap );\r
+ if (x11Display) XCloseDisplay(x11Display);\r
+ }\r
+#endif\r
}\r
\r
////////////////////////////////////////////////////////////////////////\r
extern "C" {\r
#endif\r
\r
-#include "minimal.h"\r
-#include <gdk/gdkx.h>\r
+\r
\r
// internally used defines\r
\r
#ifdef __cplusplus\r
extern "C" {\r
#endif\r
-#define _GPU_API_\r
+\r
+typedef unsigned char u8;\r
+typedef signed char s8;\r
+typedef unsigned short int u16;\r
+typedef signed short int s16;\r
+typedef unsigned long u32;\r
+typedef signed long s32;\r
+typedef unsigned long long int u64;\r
+typedef signed long long int s64;\r
+\r
#ifndef _WINDOWS\r
#ifdef __NANOGL__\r
#include <gl/gl.h>\r
#ifdef SOFT_LINKAGE\r
#pragma softfp_linkage\r
#endif\r
-#include <gles/gl.h> // for opengl es types \r
+#include <GLES/gl.h> // for opengl es types\r
#ifdef SOFT_LINKAGE\r
#pragma no_softfp_linkage\r
#endif\r
#endif\r
#endif\r
\r
-#ifdef MAEMO_CHANGES\r
- #include "../psxCommon.h"\r
-#else\r
- #include "psxCommon.h"\r
-#endif\r
-\r
#ifdef __NANOGL__\r
#define glTexParameteri(x,y,z) glTexParameterf(x,y,z) \r
#define glAlphaFuncx(x,y) glAlphaFunc(x,y) \r
int x;\r
int y;\r
} Vec2f;\r
-/**/\r
+*/\r
\r
typedef struct {\r
Vec3f xyz;\r
#ifdef _WINDOWS\r
void CALLBACK GPUmakeSnapshot(void)\r
#else\r
-void CALLBACK GPU_makeSnapshot(void)\r
+void CALLBACK GPUmakeSnapshot(void)\r
#endif\r
{\r
//bSnapShot = TRUE;\r
#ifdef _WINDOWS\r
long CALLBACK GPUinit()\r
#else\r
-long CALLBACK GPU_init()\r
+long CALLBACK GPUinit()\r
#endif\r
{\r
memset(ulStatusControl,0,256*sizeof(unsigned long));\r
\r
long CALLBACK GPUopen(HWND hwndGPU) \r
#else\r
-long CALLBACK GPU_open(int hwndGPU) \r
+long CALLBACK GPUopen(int hwndGPU)\r
#endif\r
{\r
#ifdef _WINDOWS\r
\r
\r
\r
- \r
- \r
#ifdef _WINDOWS\r
iResX=240;iResY=320;\r
#endif\r
- iColDepth=32;\r
+#ifdef MAEMO_CHANGES\r
+ iResX=640;iResY=480;\r
+#endif\r
+ iColDepth=8;\r
bChangeRes=FALSE;\r
#ifdef _WINDOWS\r
bWindowMode=TRUE;\r
\r
#else\r
\r
-long GPU_close() // LINUX CLOSE\r
+long GPUclose() // LINUX CLOSE\r
{\r
GLcleanup(); // close OGL\r
\r
#ifdef _WINDOWS\r
long CALLBACK GPUshutdown()\r
#else\r
-long CALLBACK GPU_shutdown()\r
+long CALLBACK GPUshutdown()\r
#endif\r
{\r
if(psxVSecure) free(psxVSecure); // kill emulated vram memory\r
\r
int iLastRGB24=0; // special vars for checking when to skip two display updates\r
int iSkipTwo=0;\r
-void GPU_vSinc(void){\r
+void GPUvSinc(void){\r
updateDisplay();\r
}\r
void updateDisplay(void) // UPDATE DISPLAY\r
#ifdef _WINDOWS\r
void CALLBACK GPUupdateLace(void)\r
#else\r
-void CALLBACK GPU_updateLace(void)\r
+void CALLBACK GPUupdateLace(void)\r
#endif\r
{\r
if(!(dwActFixes&0x1000)) \r
#ifdef _WINDOWS\r
unsigned long CALLBACK GPUreadStatus(void)\r
#else\r
-unsigned long CALLBACK GPU_readStatus(void)\r
+unsigned long CALLBACK GPUreadStatus(void)\r
#endif\r
{\r
if(dwActFixes&0x1000) // CC game fix\r
#ifdef _WINDOWS\r
void CALLBACK GPUwriteStatus(unsigned long gdata)\r
#else\r
-void CALLBACK GPU_writeStatus(unsigned long gdata)\r
+void CALLBACK GPUwriteStatus(unsigned long gdata)\r
#endif\r
{\r
unsigned long lCommand=(gdata>>24)&0xff;\r
#ifdef _WINDOWS\r
void CALLBACK GPUreadDataMem(unsigned int * pMem, int iSize)\r
#else\r
-void CALLBACK GPU_readDataMem(unsigned long * pMem, int iSize)\r
+void CALLBACK GPUreadDataMem(unsigned long * pMem, int iSize)\r
#endif\r
{\r
int i;\r
#ifdef _WINDOWS\r
unsigned long CALLBACK GPUreadData(void)\r
#else\r
-unsigned long CALLBACK GPU_readData(void)\r
+unsigned long CALLBACK GPUreadData(void)\r
#endif\r
{\r
unsigned long l;\r
#ifdef _WINDOWS\r
GPUreadDataMem(&l,1);\r
#else\r
- GPU_readDataMem(&l,1);\r
+ GPUreadDataMem(&l,1);\r
#endif \r
return GPUdataRet;\r
}\r
#ifdef _WINDOWS\r
void CALLBACK GPUwriteDataMem(unsigned long * pMem, int iSize)\r
#else\r
-void CALLBACK GPU_writeDataMem(unsigned long * pMem, int iSize)\r
+void CALLBACK GPUwriteDataMem(unsigned long * pMem, int iSize)\r
#endif\r
{\r
u8 command;\r
#ifdef _WINDOWS\r
void CALLBACK GPUwriteData(unsigned long gdata)\r
#else\r
-void CALLBACK GPU_writeData(unsigned long gdata)\r
+void CALLBACK GPUwriteData(unsigned long gdata)\r
#endif\r
{\r
#ifdef _WINDOWS\r
GPUwriteDataMem(&gdata,1);\r
#else\r
- GPU_writeDataMem(&gdata,1);\r
+ GPUwriteDataMem(&gdata,1);\r
#endif \r
}\r
\r
#ifdef _WINDOWS\r
long CALLBACK GPUconfigure(void)\r
#else\r
-long CALLBACK GPU_configure(void)\r
+long CALLBACK GPUconfigure(void)\r
#endif\r
{\r
\r
#ifdef _WINDOWS\r
long CALLBACK GPUdmaChain(unsigned long * baseAddrL, unsigned long addr)\r
#else\r
-long CALLBACK GPU_dmaChain(unsigned long * baseAddrL, unsigned long addr)\r
+long CALLBACK GPUdmaChain(unsigned long * baseAddrL, unsigned long addr)\r
#endif\r
{\r
unsigned long dmaMem;\r
#ifdef _WINDOWS\r
if(count>0) GPUwriteDataMem(&baseAddrL[dmaMem>>2],count);\r
#else\r
- if(count>0) GPU_writeDataMem(&baseAddrL[dmaMem>>2],count);\r
+ if(count>0) GPUwriteDataMem(&baseAddrL[dmaMem>>2],count);\r
#endif\r
\r
addr = baseAddrL[addr>>2]&0xffffff;\r
#ifdef _WINDOWS\r
void CALLBACK GPUabout(void)\r
#else\r
-void CALLBACK GPU_about(void)\r
+void CALLBACK GPUabout(void)\r
#endif\r
{\r
\r
#ifdef _WINDOWS\r
long CALLBACK GPUtest(void)\r
#else\r
-long CALLBACK GPU_test(void)\r
+long CALLBACK GPUtest(void)\r
#endif\r
{\r
// if test fails this function should return negative value for error (unable to continue)\r
#ifdef _WINDOWS\r
long CALLBACK GPUfreeze(unsigned long ulGetFreezeData,GPUFreeze_t * pF)\r
#else\r
-long CALLBACK GPU_freeze(unsigned long ulGetFreezeData,GPUFreeze_t * pF)\r
+long CALLBACK GPUfreeze(unsigned long ulGetFreezeData,GPUFreeze_t * pF)\r
#endif\r
{\r
if(ulGetFreezeData==2) \r
GPUwriteStatus(ulStatusControl[5]);\r
GPUwriteStatus(ulStatusControl[4]);\r
#else\r
- GPU_writeStatus(ulStatusControl[0]);\r
- GPU_writeStatus(ulStatusControl[1]);\r
- GPU_writeStatus(ulStatusControl[2]);\r
- GPU_writeStatus(ulStatusControl[3]);\r
- GPU_writeStatus(ulStatusControl[8]);\r
- GPU_writeStatus(ulStatusControl[6]);\r
- GPU_writeStatus(ulStatusControl[7]);\r
- GPU_writeStatus(ulStatusControl[5]);\r
- GPU_writeStatus(ulStatusControl[4]);\r
+ GPUwriteStatus(ulStatusControl[0]);\r
+ GPUwriteStatus(ulStatusControl[1]);\r
+ GPUwriteStatus(ulStatusControl[2]);\r
+ GPUwriteStatus(ulStatusControl[3]);\r
+ GPUwriteStatus(ulStatusControl[8]);\r
+ GPUwriteStatus(ulStatusControl[6]);\r
+ GPUwriteStatus(ulStatusControl[7]);\r
+ GPUwriteStatus(ulStatusControl[5]);\r
+ GPUwriteStatus(ulStatusControl[4]);\r
#endif\r
return 1;\r
}\r
#ifdef _WINDOWS\r
void CALLBACK GPUgetScreenPic(u8 * pMem)\r
#else\r
-long CALLBACK GPU_getScreenPic(u8 * pMem)\r
+long CALLBACK GPUgetScreenPic(u8 * pMem)\r
#endif\r
{\r
float XS,YS;int x,y,v;\r
#ifdef _WINDOWS\r
void CALLBACK GPUshowScreenPic(u8 * pMem)\r
#else\r
-long CALLBACK GPU_showScreenPic(u8 * pMem)\r
+long CALLBACK GPUshowScreenPic(u8 * pMem)\r
#endif\r
{\r
// DestroyPic();\r
#include "plugin.h"\r
#include <gl/gl.h>\r
#else\r
-#ifndef MAEMO_CHANGES\r
- #include "psxCommon.h"\r
-#else\r
- #include "../psxCommon.h"\r
-#endif \r
+//#ifndef MAEMO_CHANGES\r
+// #include "psxCommon.h"\r
+//#else\r
+// #include "../psxCommon.h"\r
+//#endif\r
#include "gpuExternals.h"\r
#ifdef __NANOGL__\r
#include <gl/gl.h>\r
u8 psxVRam[1024*1024*2];\r
} GPUFreeze_t;\r
\r
-long CALLBACK GPU_init();\r
-long CALLBACK GPU_shutdown();\r
-long CALLBACK GPU_open(int hwndGPU); \r
-long CALLBACK GPU_close();\r
-unsigned long CALLBACK GPU_readData(void);\r
-void CALLBACK GPU_readDataMem(unsigned long * pMem, int iSize);\r
-unsigned long CALLBACK GPU_readStatus(void);\r
-void CALLBACK GPU_writeData(unsigned long gdata);\r
-void CALLBACK GPU_writeDataMem(unsigned long * pMem, int iSize);\r
-void CALLBACK GPU_writeStatus(unsigned long gdata);\r
-long CALLBACK GPU_dmaChain(unsigned long * baseAddrL, unsigned long addr);\r
-void CALLBACK GPU_updateLace(void);\r
-void CALLBACK GPU_makeSnapshot(void);\r
-long CALLBACK GPU_freeze(unsigned long ulGetFreezeData,GPUFreeze_t * pF);\r
-long CALLBACK GPU_getScreenPic(u8 * pMem);\r
-long CALLBACK GPU_showScreenPic(u8 * pMem);\r
-//void CALLBACK GPU_keypressed(int keycode);\r
-//void CALLBACK GPU_displayText(s8 * pText);\r
-//void CALLBACK GPU_clearDynarec(void (CALLBACK *callback)(void));\r
-long CALLBACK GPU_configure(void);\r
-long CALLBACK GPU_test(void);\r
-void CALLBACK GPU_about(void);\r
+long CALLBACK GPUinit();\r
+long CALLBACK GPUshutdown();\r
+long CALLBACK GPUopen(int hwndGPU);\r
+long CALLBACK GPUclose();\r
+unsigned long CALLBACK GPUreadData(void);\r
+void CALLBACK GPUreadDataMem(unsigned long * pMem, int iSize);\r
+unsigned long CALLBACK GPUreadStatus(void);\r
+void CALLBACK GPUwriteData(unsigned long gdata);\r
+void CALLBACK GPUwriteDataMem(unsigned long * pMem, int iSize);\r
+void CALLBACK GPUwriteStatus(unsigned long gdata);\r
+long CALLBACK GPUdmaChain(unsigned long * baseAddrL, unsigned long addr);\r
+void CALLBACK GPUupdateLace(void);\r
+void CALLBACK GPUmakeSnapshot(void);\r
+long CALLBACK GPUfreeze(unsigned long ulGetFreezeData,GPUFreeze_t * pF);\r
+long CALLBACK GPUgetScreenPic(u8 * pMem);\r
+long CALLBACK GPUshowScreenPic(u8 * pMem);\r
+//void CALLBACK GPUkeypressed(int keycode);\r
+//void CALLBACK GPUdisplayText(s8 * pText);\r
+//void CALLBACK GPUclearDynarec(void (CALLBACK *callback)(void));\r
+long CALLBACK GPUconfigure(void);\r
+long CALLBACK GPUtest(void);\r
+void CALLBACK GPUabout(void);\r
\r
\r
void DoSnapShot(void);\r
-void GPU_vSinc(void);\r
+void GPUvSinc(void);\r
void updateDisplay(void);\r
void updateFrontDisplay(void);\r
void SetAutoFrameCap(void);\r
// globals\r
////////////////////////////////////////////////////////////////////////\r
\r
-#ifndef _WINDOWS\r
-EGLSurface surface;\r
-EGLDisplay display;\r
-#endif\r
+//#ifndef _WINDOWS\r
+//EGLSurface surface;\r
+//EGLDisplay display;\r
+//#endif\r
\r
BOOL bDrawTextured; // current active drawing states\r
BOOL bDrawSmoothShaded;\r
extern "C" {\r
#endif\r
\r
-\r
+#ifndef _GPU_API_\r
+#define _GPU_API_ 1\r
+#endif\r
\r
\r
\r
#pragma softfp_linkage\r
#endif\r
#ifdef MAEMO_CHANGES\r
- #include <GLES/glplatform.h>\r
+\r
+ //#include <GLES/glplatform.h>\r
#include <GLES/gl.h>\r
- #include <GLES/glext.h>\r
- #include <EGL/egl.h>\r
+ //#include <GLES/glext.h>\r
+ #include <GLES/EGL/egl.h>\r
+ //#include "../maemo/minimal.h"\r
+ //#include <gdk/gdkx.h>\r
+ //#include <gdk/gdk.h>\r
+\r
+\r
#else\r
#include <gles/gl.h> // for opengl es types \r
#include <gles/egltypes.h>\r
#include "prim.h"\r
#else\r
#include "gpuStdafx.h"\r
-#ifdef __NANOGL__\r
-#include <gl/gl.h>\r
-#include <gl/gl.h>\r
-#else\r
-#ifdef SOFT_LINKAGE\r
-#pragma softfp_linkage\r
-#endif\r
-#ifdef MAEMO_CHANGES\r
- #include <GLES/glplatform.h>\r
- #include <GLES/gl.h>\r
- #include <GLES/glext.h>\r
- #include <EGL/egl.h>\r
-#else\r
- #include <gles/gl.h> // for opengl es types \r
- #include <gles/egltypes.h>\r
-#endif\r
-#ifdef SOFT_LINKAGE\r
-#pragma no_softfp_linkage\r
-#endif\r
-#endif\r
+\r
#include "gpuDraw.h"\r
//#include "plugins.h"\r
#include "gpuExternals.h"\r