From c0b5aaa995f9cf826fdad921094e53c164202a19 Mon Sep 17 00:00:00 2001 From: nakeee Date: Wed, 17 Dec 2008 22:09:33 +0000 Subject: [PATCH] Added not implemeted rendering backend chosing git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1568 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoOGL/Src/Config.h | 67 ++++++++++--------- .../Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp | 18 +++++ .../Plugin_VideoOGL/Src/GUI/ConfigDlg.h | 5 ++ 3 files changed, 57 insertions(+), 33 deletions(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Config.h b/Source/Plugins/Plugin_VideoOGL/Src/Config.h index d39e1e9907..f998d12f57 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Config.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/Config.h @@ -32,46 +32,47 @@ struct Config void Save(); // General - bool bFullscreen; - bool renderToMainframe; - char iFSResolution[16]; - char iWindowedRes[16]; - bool bStretchToFit; - bool bKeepAR; - bool bHideCursor; - bool bSafeTextureCache; - + bool bFullscreen; + bool renderToMainframe; + char iFSResolution[16]; + char iWindowedRes[16]; + char iBackend[10]; + bool bStretchToFit; + bool bKeepAR; + bool bHideCursor; + bool bSafeTextureCache; + // Enhancements - int iMultisampleMode; + int iMultisampleMode; bool bForceFiltering; int iMaxAnisotropy; // Information bool bShowFPS; - bool bOverlayStats; + bool bOverlayStats; bool bTexFmtOverlayEnable; - bool bTexFmtOverlayCenter; - - // Render - bool bUseXFB; - bool bWireFrame; - bool bDisableLighting; - bool bDisableTexturing; - - // Utility - char texDumpPath[280]; - bool bDumpTextures; - - // Hacks - bool bEFBToTextureDisable; - bool bEFBToTextureDisableHotKey; - bool bProjectionHax1; - bool bProjectionHax2; - - int iLog; // CONF_ bits - int iSaveTargetId; - - //currently unused: + bool bTexFmtOverlayCenter; + + // Render + bool bUseXFB; + bool bWireFrame; + bool bDisableLighting; + bool bDisableTexturing; + + // Utility + char texDumpPath[280]; + bool bDumpTextures; + + // Hacks + bool bEFBToTextureDisable; + bool bEFBToTextureDisableHotKey; + bool bProjectionHax1; + bool bProjectionHax2; + + int iLog; // CONF_ bits + int iSaveTargetId; + + //currently unused: int iCompileDLsLevel; bool bShowShaderErrors; }; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp index ea91c19be8..ab1c4e760f 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp @@ -110,13 +110,20 @@ void ConfigDialog::CreateGUIControls() m_KeepAR->SetValue(g_Config.bKeepAR); m_HideCursor = new wxCheckBox(m_PageGeneral, ID_HIDECURSOR, wxT("Hide mouse cursor"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); m_HideCursor->SetValue(g_Config.bHideCursor); + wxStaticText *FSText = new wxStaticText(m_PageGeneral, ID_FSTEXT, wxT("Fullscreen video mode:"), wxDefaultPosition, wxDefaultSize, 0); m_FullscreenCB = new wxComboBox(m_PageGeneral, ID_FULLSCREENCB, wxEmptyString, wxDefaultPosition, wxDefaultSize, arrayStringFor_FullscreenCB, 0, wxDefaultValidator); m_FullscreenCB->SetValue(wxString::FromAscii(g_Config.iFSResolution)); + wxStaticText *WMText = new wxStaticText(m_PageGeneral, ID_WMTEXT, wxT("Windowed resolution:"), wxDefaultPosition, wxDefaultSize, 0); m_WindowResolutionCB = new wxComboBox(m_PageGeneral, ID_WINDOWRESOLUTIONCB, wxEmptyString, wxDefaultPosition, wxDefaultSize, arrayStringFor_WindowResolutionCB, 0, wxDefaultValidator); m_WindowResolutionCB->SetValue(wxString::FromAscii(g_Config.iWindowedRes)); + wxStaticText *BEText = new wxStaticText(m_PageGeneral, ID_BETEXT, wxT("Rendering backend:"), wxDefaultPosition, wxDefaultSize, 0); + m_RenderBackend = new wxComboBox(m_PageGeneral, ID_RENDERBACKEND, wxEmptyString, wxDefaultPosition, wxDefaultSize, arrayStringFor_RenderBackend, 0, wxDefaultValidator); + m_RenderBackend->SetValue(wxString::FromAscii(g_Config.iBackend)); + + // Enhancements sbEnhancements = new wxStaticBoxSizer(wxVERTICAL, m_PageGeneral, wxT("Enhancements")); m_ForceFiltering = new wxCheckBox(m_PageGeneral, ID_FORCEFILTERING, wxT("Force bi/trilinear filtering (May cause small glitches)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); @@ -149,6 +156,8 @@ void ConfigDialog::CreateGUIControls() sBasic->Add(m_FullscreenCB, wxGBPosition(5, 1), wxGBSpan(1, 1), wxALL, 5); sBasic->Add(WMText, wxGBPosition(6, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); sBasic->Add(m_WindowResolutionCB, wxGBPosition(6, 1), wxGBSpan(1, 1), wxALL, 5); + sBasic->Add(BEText, wxGBPosition(7, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); + sBasic->Add(m_RenderBackend, wxGBPosition(7, 1), wxGBSpan(1, 1), wxALL, 5); sbBasic->Add(sBasic); sGeneral->Add(sbBasic, 0, wxEXPAND|wxALL, 5); @@ -294,6 +303,12 @@ void ConfigDialog::AddWindowReso(char *reso) m_WindowResolutionCB->Append(wxString::FromAscii(reso)); } +void ConfigDialog::AddRenderBackend(char *backend) +{ + m_RenderBackend->Append(wxString::FromAscii(backend)); +} + + void ConfigDialog::AddAAMode(int mode) { wxString tmp; @@ -334,6 +349,9 @@ void ConfigDialog::GeneralSettingsChanged(wxCommandEvent& event) case ID_WINDOWRESOLUTIONCB: strcpy(g_Config.iWindowedRes, m_WindowResolutionCB->GetValue().mb_str() ); break; + case ID_RENDERBACKEND: + strcpy(g_Config.iBackend, m_RenderBackend->GetValue().mb_str() ); + break; case ID_FORCEFILTERING: g_Config.bForceFiltering = m_ForceFiltering->IsChecked(); break; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h index 1a7f00aa96..cfb2dbe83d 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h @@ -42,6 +42,7 @@ class ConfigDialog : public wxDialog void AddFSReso(char *reso); void AddWindowReso(char *reso); + void AddRenderBackend(char *backend); void AddAAMode(int mode); private: @@ -76,6 +77,8 @@ class ConfigDialog : public wxDialog wxComboBox *m_FullscreenCB; wxArrayString arrayStringFor_WindowResolutionCB; wxComboBox *m_WindowResolutionCB; + wxArrayString arrayStringFor_RenderBackend; + wxComboBox *m_RenderBackend; wxCheckBox *m_ForceFiltering; // advanced wxChoice *m_MaxAnisotropyCB; @@ -115,6 +118,8 @@ class ConfigDialog : public wxDialog ID_FULLSCREENCB, ID_WMTEXT, ID_WINDOWRESOLUTIONCB, + ID_BETEXT, + ID_RENDERBACKEND, ID_FORCEFILTERING, ID_MAXANISOTROPY,