use opengl_makecurrent before save
and 2 small sdl/wx changes git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1526 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
bb817fbced
commit
77aaf18d21
|
@ -34,14 +34,6 @@ struct RECT
|
||||||
|
|
||||||
#include "GLUtil.h"
|
#include "GLUtil.h"
|
||||||
|
|
||||||
#ifndef USE_SDL
|
|
||||||
#define USE_SDL 0
|
|
||||||
#endif
|
|
||||||
#if USE_SDL
|
|
||||||
#include <SDL.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Handles OpenGL and the window
|
// Handles OpenGL and the window
|
||||||
|
|
||||||
// externals
|
// externals
|
||||||
|
@ -514,6 +506,9 @@ bool OpenGL_MakeCurrent()
|
||||||
MessageBox(NULL,"(5) Can't Activate The GL Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
|
MessageBox(NULL,"(5) Can't Activate The GL Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#elif defined(USE_WX) && USE_WX
|
||||||
|
GLWin.glCanvas->SetCurrent(*GLWin.glCtxt);
|
||||||
|
return true;
|
||||||
#elif defined(HAVE_X11) && HAVE_X11
|
#elif defined(HAVE_X11) && HAVE_X11
|
||||||
Window winDummy;
|
Window winDummy;
|
||||||
unsigned int borderDummy;
|
unsigned int borderDummy;
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include <GL/glxew.h>
|
#include <GL/glxew.h>
|
||||||
#elif defined(USE_SDL) && USE_SDL
|
#elif defined(USE_SDL) && USE_SDL
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
|
#include <SDL.h>
|
||||||
#elif defined(HAVE_COCOA) && HAVE_COCOA
|
#elif defined(HAVE_COCOA) && HAVE_COCOA
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
#include "cocoaGL.h"
|
#include "cocoaGL.h"
|
||||||
|
|
|
@ -21,10 +21,6 @@
|
||||||
#include "OS/Win32.h"
|
#include "OS/Win32.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USE_SDL) && USE_SDL
|
|
||||||
#include <SDL.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
#include "GUI/ConfigDlg.h"
|
#include "GUI/ConfigDlg.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -195,8 +191,6 @@ void DllConfig(HWND _hParent)
|
||||||
XFree(modes);
|
XFree(modes);
|
||||||
frame.ShowModal();
|
frame.ShowModal();
|
||||||
#endif
|
#endif
|
||||||
#else
|
|
||||||
//TODO
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -236,17 +230,18 @@ void Video_Initialize(SVideoInitialize* _pVideoInitialize)
|
||||||
}
|
}
|
||||||
|
|
||||||
void Video_DoState(unsigned char **ptr, int mode) {
|
void Video_DoState(unsigned char **ptr, int mode) {
|
||||||
#ifdef _WIN32
|
//#ifdef _WIN32
|
||||||
// What is this code doing here?
|
// What is this code doing here?
|
||||||
// if (!wglMakeCurrent(hDC,hRC)) {
|
// if (!wglMakeCurrent(hDC,hRC)) {
|
||||||
// PanicAlert("Can't Activate The GL Rendering Context for saving");
|
// PanicAlert("Can't Activate The GL Rendering Context for saving");
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
#elif defined(HAVE_COCOA) && HAVE_COCOA
|
//#elif defined(HAVE_COCOA) && HAVE_COCOA
|
||||||
cocoaGLMakeCurrent(GLWin.cocoaCtx,GLWin.cocoaWin);
|
// cocoaGLMakeCurrent(GLWin.cocoaCtx,GLWin.cocoaWin);
|
||||||
#elif defined(HAVE_X11) && HAVE_X11
|
//#elif defined(HAVE_X11) && HAVE_X11
|
||||||
glXMakeCurrent(GLWin.dpy, GLWin.win, GLWin.ctx);
|
// glXMakeCurrent(GLWin.dpy, GLWin.win, GLWin.ctx);
|
||||||
#endif
|
//#endif
|
||||||
|
OpenGL_MakeCurrent();
|
||||||
|
|
||||||
// Clear all caches that touch RAM
|
// Clear all caches that touch RAM
|
||||||
TextureMngr::Invalidate();
|
TextureMngr::Invalidate();
|
||||||
|
|
Loading…
Reference in New Issue