aboutsummaryrefslogtreecommitdiff
path: root/plugins/gpu-gles/gpuDraw.c
diff options
context:
space:
mode:
authornotaz2012-01-16 23:41:08 +0200
committernotaz2012-01-19 01:42:10 +0200
commit13326d3e8422568b7f5528e7b8878b2f496ea652 (patch)
tree560d55c603358cb8478dde0677f028936d96a0ab /plugins/gpu-gles/gpuDraw.c
parent07f75e28d81b8acc64cfb6dee9302fb0eba8774a (diff)
downloadpcsx_rearmed-13326d3e8422568b7f5528e7b8878b2f496ea652.tar.gz
pcsx_rearmed-13326d3e8422568b7f5528e7b8878b2f496ea652.tar.bz2
pcsx_rearmed-13326d3e8422568b7f5528e7b8878b2f496ea652.zip
gpu-gles: schtruck/fpse merge: remove windows code
probably a good idea, it's long broken anyway
Diffstat (limited to 'plugins/gpu-gles/gpuDraw.c')
-rw-r--r--plugins/gpu-gles/gpuDraw.c90
1 files changed, 1 insertions, 89 deletions
diff --git a/plugins/gpu-gles/gpuDraw.c b/plugins/gpu-gles/gpuDraw.c
index 2eaa825..3842503 100644
--- a/plugins/gpu-gles/gpuDraw.c
+++ b/plugins/gpu-gles/gpuDraw.c
@@ -27,17 +27,7 @@
#define _IN_DRAW
-#ifdef _WINDOWS
-#include "stdafx.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include "externals.h"
-#include "gpu.h"
-#include "draw.h"
-#include "prim.h"
-#include "texture.h"
-#else
+
#include "gpuExternals.h"
#include "gpuPlugin.h"
#include "gpuDraw.h"
@@ -48,7 +38,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#endif
//#include "menu.h"
////////////////////////////////////////////////////////////////////////////////////
@@ -102,13 +91,8 @@
////////////////////////////////////////////////////////////////////////////////////
// draw globals
-#ifdef _WINDOWS
-HDC dcGlobal=NULL;
-HWND hWWindow;
-#else
void glBlendEquationEXT(GLenum mode);
void glColorTableEXT(GLenum target, GLenum internalFormat, GLsizei width, GLenum format,GLenum type, const GLvoid *data);
-#endif
// draw globals; most will be initialized again later (by config or checks)
@@ -158,50 +142,6 @@ GLbitfield uiBufferBits=GL_COLOR_BUFFER_BIT;
// Set OGL pixel format
////////////////////////////////////////////////////////////////////////
-#ifdef _WINDOWS
-BOOL bSetupPixelFormat(HDC hDC)
-{
- int pixelformat;
- static PIXELFORMATDESCRIPTOR pfd =
- {
- sizeof(PIXELFORMATDESCRIPTOR), // size of this pfd
- 1, // version number
- PFD_DRAW_TO_WINDOW | // support window
- PFD_SUPPORT_OPENGL | // support OpenGL
- PFD_DOUBLEBUFFER, // double buffered
- PFD_TYPE_RGBA, // RGBA type
- 16, // 16-bit color depth (adjusted later)
- 0, 0, 0, 0, 0, 0, // color bits ignored
- 0, // no alpha buffer
- 0, // shift bit ignored
- 0, // no accumulation buffer
- 0, 0, 0, 0, // accum bits ignored
- 0, // z-buffer
- 0,
- 0, // no auxiliary buffer
- PFD_MAIN_PLANE, // main layer
- 0, // reserved
- 0, 0, 0 // layer masks ignored
- };
-
- pfd.cColorBits=iColDepth; // set user color depth
- pfd.cDepthBits=iZBufferDepth; // set user zbuffer (by psx mask)
-
- if((pixelformat=ChoosePixelFormat(hDC,&pfd))==0)
- {
- MessageBox(NULL,"ChoosePixelFormat failed","Error",MB_OK);
- return FALSE;
- }
-
- if(SetPixelFormat(hDC,pixelformat, &pfd)==FALSE)
- {
- MessageBox(NULL,"SetPixelFormat failed","Error",MB_OK);
- return FALSE;
- }
-
- return TRUE;
-}
-#endif
////////////////////////////////////////////////////////////////////////
// Get extension infos (f.e. pal textures / packed pixels)
@@ -216,11 +156,7 @@ void GetExtInfos(void)
bPacked=TRUE; // -> ok
- #ifdef _WINDOWS
- iClampType=GL_CLAMP;
-#else
iClampType=GL_CLAMP_TO_EDGE;
-#endif
}
////////////////////////////////////////////////////////////////////////
@@ -304,10 +240,6 @@ void CreateScanLines(void)
// Initialize OGL
////////////////////////////////////////////////////////////////////////
-#ifdef _WINDOWS
-HGLRC GLCONTEXT=NULL;
-#endif
-
#define MODE_RAW 0
#define MODE_X11 1
#define MODE_SDL 2
@@ -491,17 +423,6 @@ static void initEGL(void)
int GLinitialize()
{
- //----------------------------------------------------//
-#ifdef _WINDOWS
- HGLRC objectRC;
- // init
- dcGlobal = GetDC(hWWindow); // FIRST: dc/rc stuff
- objectRC = wglCreateContext(dcGlobal);
- GLCONTEXT=objectRC;
- wglMakeCurrent(dcGlobal, objectRC);
- // CheckWGLExtensions(dcGlobal);
- if(bWindowMode) ReleaseDC(hWWindow,dcGlobal); // win mode: release dc again
-#endif
initEGL();
//----------------------------------------------------//
@@ -591,13 +512,6 @@ void GLcleanup()
{
CleanupTextureStore(); // bye textures
-#ifdef _WINDOWS
- wglMakeCurrent(NULL, NULL); // bye context
- if(GLCONTEXT) wglDeleteContext(GLCONTEXT);
- if(!bWindowMode && dcGlobal)
- ReleaseDC(hWWindow,dcGlobal);
-#endif
-
eglMakeCurrent( display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );
eglDestroySurface( display, surface );
eglDestroyContext( display, context );
@@ -1307,9 +1221,7 @@ void assignTexture4(void)
// render pos / buffers
////////////////////////////////////////////////////////////////////////
-#ifndef _WINDOWS
#define EqualRect(pr1,pr2) ((pr1)->left==(pr2)->left && (pr1)->top==(pr2)->top && (pr1)->right==(pr2)->right && (pr1)->bottom==(pr2)->bottom)
-#endif
////////////////////////////////////////////////////////////////////////
// SetDisplaySettings: "simply" calcs the new drawing area and updates