diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLWindow.h b/Source/Plugins/Plugin_VideoOGL/Src/GLWindow.h index 09104e003a..0279d6f9d2 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLWindow.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLWindow.h @@ -43,7 +43,7 @@ class GLWindow { int GetYoff() {return yOffset;} int GetXoff() {return xOffset;} - virtual bool valid() { return false; } + static bool valid() { return false; } // bool GLwindow(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight) {}; // setResolution // resolution iter diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp index 6b62035f4a..1e3c14a630 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp @@ -30,6 +30,7 @@ BEGIN_EVENT_TABLE(ConfigDialog,wxDialog) EVT_CHECKBOX(ID_RENDERTOMAINWINDOW, ConfigDialog::GeneralSettingsChanged) EVT_COMBOBOX(ID_FULLSCREENCB, ConfigDialog::GeneralSettingsChanged) EVT_COMBOBOX(ID_WINDOWRESOLUTIONCB, ConfigDialog::GeneralSettingsChanged) + EVT_COMBOBOX(ID_RENDERBACKEND, ConfigDialog::GeneralSettingsChanged) EVT_COMBOBOX(ID_ALIASMODECB, ConfigDialog::GeneralSettingsChanged) EVT_CHOICE(ID_MAXANISOTROPY, ConfigDialog::GeneralSettingsChanged) EVT_CHECKBOX(ID_FORCEFILTERING, ConfigDialog::GeneralSettingsChanged) @@ -350,7 +351,7 @@ void ConfigDialog::GeneralSettingsChanged(wxCommandEvent& event) strcpy(g_Config.iWindowedRes, m_WindowResolutionCB->GetValue().mb_str() ); break; case ID_RENDERBACKEND: - strcpy(g_Config.iBackend, m_RenderBackend->GetValue().mb_str() ); + strcpy(g_Config.iBackend, m_RenderBackend->GetValue().mb_str()); break; case ID_FORCEFILTERING: g_Config.bForceFiltering = m_ForceFiltering->IsChecked(); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/SDLWindow.h b/Source/Plugins/Plugin_VideoOGL/Src/SDLWindow.h index fe85ddaf00..38a63360f2 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/SDLWindow.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/SDLWindow.h @@ -15,7 +15,8 @@ public: virtual bool PeekMessages(); virtual void Update(); virtual bool MakeCurrent(); - + + static bool valid() { return true; } ~SDLWindow(); SDLWindow(int _iwidth, int _iheight); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/WXGLWindow.h b/Source/Plugins/Plugin_VideoOGL/Src/WXGLWindow.h index 7eef302058..c3acb58425 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/WXGLWindow.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/WXGLWindow.h @@ -23,6 +23,7 @@ public: virtual void Update(); virtual bool MakeCurrent(); + static bool valid() { return true; } ~WXGLWindow(); WXGLWindow(int _iwidth, int _iheight); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/X11Window.h b/Source/Plugins/Plugin_VideoOGL/Src/X11Window.h index aaad03de55..02d06b9ec9 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/X11Window.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/X11Window.h @@ -30,7 +30,8 @@ public: virtual bool PeekMessages(); virtual void Update(); virtual bool MakeCurrent(); - + + static bool valid() { return true; } ~X11Window(); X11Window(int _iwidth, int _iheight); }; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/nGLUtil.cpp b/Source/Plugins/Plugin_VideoOGL/Src/nGLUtil.cpp index 4dd0917dac..4411bf7c39 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/nGLUtil.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/nGLUtil.cpp @@ -110,3 +110,16 @@ int OpenGL_GetXoff() { int OpenGL_GetYoff() { return glWin->GetYoff(); } + +void OpenGL_AddBackends(ConfigDialog *frame) { + if(SDLWindow::valid()) + frame->AddRenderBackend("SDL"); + if(X11Window::valid()) + frame->AddRenderBackend("X11"); + if(WXGLWindow::valid()) + frame->AddRenderBackend("WXGL"); +} + +void OpenGL_AddResolutions(ConfigDialog *frame) { + // TODO get resolution iter +} diff --git a/Source/Plugins/Plugin_VideoOGL/Src/nGLUtil.h b/Source/Plugins/Plugin_VideoOGL/Src/nGLUtil.h index a3578ba92c..ca70c576d6 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/nGLUtil.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/nGLUtil.h @@ -20,6 +20,7 @@ #include "Config.h" #include "pluginspecs_video.h" +#include "GUI/ConfigDlg.h" #include "GLWindow.h" // backends #include "SDLWindow.h" @@ -41,6 +42,9 @@ #define GL_REPORT_ERRORD() #endif +void OpenGL_AddBackends(ConfigDialog *frame); +void OpenGL_AddResolutions(ConfigDialog *frame); + // TODO old interface removal bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _width, int _height); bool OpenGL_MakeCurrent();