summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortmator <tmator@gmail.com>2009-04-30 07:19:23 +0000
committertmator <tmator@gmail.com>2009-04-30 07:19:23 +0000
commit44516dc2265b159e254dfa90ffcdf903e312f687 (patch)
treeb8c6ea97a325461c97745411f8f01755c2e298fb
parent28e3abbe6fe421c3aa4fac18332bafeef4e0e949 (diff)
wxgl build fix for osx (not working)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3106 8ced0084-cf51-0410-be5f-012b33b47a6e
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp
index c6133d2a0b..0fbf986208 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp
@@ -201,20 +201,29 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight
if (!g_Config.renderToMainframe ||
g_VideoInitialize.pWindowHandle == NULL) {
GLWin.frame = new wxFrame((wxWindow *)g_VideoInitialize.pWindowHandle,
- -1, _("Dolphin"), wxPoint(0,0), size);
+ -1, _("Dolphin"), wxPoint(50,50), size);
} else {
GLWin.frame = new wxFrame((wxWindow *)NULL,
- -1, _("Dolphin"), wxPoint(0,0), size);
+ -1, _("Dolphin"), wxPoint(50,50), size);
}
+
+#if defined(__APPLE__)
+ GLWin.glCanvas = new wxGLCanvas(GLWin.frame, wxID_ANY, wxPoint(0,0), size, 0, wxT("Dolphin"), args, wxNullPalette);
+#else
GLWin.glCanvas = new wxGLCanvas(GLWin.frame, wxID_ANY, args,
wxPoint(0,0), size, wxSUNKEN_BORDER);
GLWin.glCtxt = new wxGLContext(GLWin.glCanvas);
+#endif
GLWin.frame->Show(TRUE);
GLWin.glCanvas->Show(TRUE);
+#if defined(__APPLE__)
+ GLWin.glCanvas->SetCurrent();
+#else
GLWin.glCanvas->SetCurrent(*GLWin.glCtxt);
// GLWin.glCtxt->SetCurrent(*GLWin.glCanvas);
+#endif
#elif defined(_WIN32)
@@ -515,7 +524,11 @@ bool OpenGL_MakeCurrent()
return false;
}
#elif defined(USE_WX) && USE_WX
+#if defined(__APPLE__)
+ GLWin.glCanvas->SetCurrent();
+#else
GLWin.glCanvas->SetCurrent(*GLWin.glCtxt);
+#endif
return true;
#elif defined(HAVE_X11) && HAVE_X11
Window winDummy;