mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
Added "Hacks" tab to OGL plugin config window and the hack option "Invert Depth". Use hacks to figure out some graphics bugs like the logo in ZWW is not a glDepth problem as I would figured it was. These hacks should be temp until the problem has been solved correctly. Also more hacks can help us figure out graphics problems we do not understand faster.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@971 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
fae0a612f9
commit
309c50d26f
@ -72,6 +72,8 @@ void Config::Load()
|
||||
iniFile.Get("Enhancements", "ForceMaxAniso", &bForceMaxAniso, 0);
|
||||
iniFile.Get("Enhancements", "StretchToFit", &bStretchToFit, false);
|
||||
iniFile.Get("Enhancements", "KeepAR", &bKeepAR, false);
|
||||
|
||||
iniFile.Get("Hacks", "InvertDepth", &bInvertDepth, 0);
|
||||
}
|
||||
|
||||
void Config::Save()
|
||||
@ -100,5 +102,7 @@ void Config::Save()
|
||||
iniFile.Set("Enhancements", "StretchToFit", bStretchToFit);
|
||||
iniFile.Set("Enhancements", "KeepAR", bKeepAR);
|
||||
|
||||
iniFile.Set("Hacks", "InvertDepth", bInvertDepth);
|
||||
|
||||
iniFile.Save("gfx_opengl.ini");
|
||||
}
|
||||
|
@ -50,6 +50,9 @@ struct Config
|
||||
bool bDumpTextures;
|
||||
char texDumpPath[280];
|
||||
|
||||
// Hacks
|
||||
bool bInvertDepth;
|
||||
|
||||
int iLog; // CONF_ bits
|
||||
int iSaveTargetId;
|
||||
|
||||
|
@ -44,6 +44,7 @@ BEGIN_EVENT_TABLE(ConfigDialog,wxDialog)
|
||||
EVT_CHECKBOX(ID_TEXFMTCENTER,ConfigDialog::TexFmtOverlayChange)
|
||||
EVT_CHECKBOX(ID_USEXFB,ConfigDialog::UseXFBChange)
|
||||
EVT_CHECKBOX(ID_DUMPTEXTURES,ConfigDialog::DumpTexturesChange)
|
||||
EVT_CHECKBOX(ID_INVERTDEPTH,ConfigDialog::InvertDepth)
|
||||
EVT_DIRPICKER_CHANGED(ID_TEXTUREPATH,ConfigDialog::TexturePathChange)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
@ -70,6 +71,9 @@ void ConfigDialog::CreateGUIControls()
|
||||
|
||||
m_PageAdvanced = new wxPanel(m_Notebook, ID_PAGEADVANCED, wxDefaultPosition, wxDefaultSize);
|
||||
m_Notebook->AddPage(m_PageAdvanced, wxT("Advanced"));
|
||||
|
||||
m_PageHacks = new wxPanel(m_Notebook, ID_PAGEHACKS, wxDefaultPosition, wxDefaultSize);
|
||||
m_Notebook->AddPage(m_PageHacks, wxT("Hacks"));
|
||||
|
||||
//buttons
|
||||
m_About = new wxButton(this, ID_GRAPHIC_ABOUT, wxT("About"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
@ -164,6 +168,11 @@ void ConfigDialog::CreateGUIControls()
|
||||
//m_ShaderErrors->SetValue(g_Config.bShowShaderErrors);
|
||||
m_ShaderErrors->Enable(false);
|
||||
|
||||
// Page 4 (hacks)
|
||||
m_InvertDepth = new wxCheckBox(m_PageHacks, ID_INVERTDEPTH, wxT("Invert Depth"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_InvertDepth->Enable(true);
|
||||
m_InvertDepth->SetValue(g_Config.bInvertDepth);
|
||||
|
||||
//Put options in sizers within the notebook
|
||||
wxGridBagSizer* sPage1;
|
||||
sPage1 = new wxGridBagSizer(0, 0);
|
||||
@ -206,6 +215,14 @@ void ConfigDialog::CreateGUIControls()
|
||||
m_PageAdvanced->SetSizer(sPage3);
|
||||
sPage3->Layout();
|
||||
|
||||
wxGridBagSizer* sPage4;
|
||||
sPage4 = new wxGridBagSizer(0, 0);
|
||||
sPage4->SetFlexibleDirection(wxBOTH);
|
||||
sPage4->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
|
||||
sPage4->Add(m_InvertDepth, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||
m_PageHacks->SetSizer(sPage4);
|
||||
sPage4->Layout();
|
||||
|
||||
SetIcon(wxNullIcon);
|
||||
Fit();
|
||||
}
|
||||
@ -348,3 +365,7 @@ void ConfigDialog::DllAbout(wxCommandEvent& event)
|
||||
info.SetDescription(_T("Vertex/Pixel Shader 2.0 or higher, framebuffer objects, multiple render targets"));
|
||||
wxAboutBox(info);
|
||||
}
|
||||
void ConfigDialog::InvertDepth(wxCommandEvent& event)
|
||||
{
|
||||
g_Config.bInvertDepth = m_InvertDepth->IsChecked();
|
||||
}
|
||||
|
@ -46,7 +46,8 @@ class ConfigDialog : public wxDialog
|
||||
virtual ~ConfigDialog();
|
||||
void OKClick(wxCommandEvent& event);
|
||||
|
||||
void FullScreenCheck(wxCommandEvent& event); // video
|
||||
// Video
|
||||
void FullScreenCheck(wxCommandEvent& event);
|
||||
void RenderMainCheck(wxCommandEvent& event);
|
||||
void AddFSReso(char *reso);
|
||||
void FSCB(wxCommandEvent& event);
|
||||
@ -55,12 +56,14 @@ class ConfigDialog : public wxDialog
|
||||
void AddAAMode(int mode);
|
||||
void AACB(wxCommandEvent& event);
|
||||
|
||||
void ForceFilteringCheck(wxCommandEvent& event); // enhancements
|
||||
// Enhancements
|
||||
void ForceFilteringCheck(wxCommandEvent& event);
|
||||
void ForceAnisotropyCheck(wxCommandEvent& event);
|
||||
void StretchToFitCheck(wxCommandEvent& event);
|
||||
void KeepARCheck(wxCommandEvent& event);
|
||||
|
||||
void WireframeCheck(wxCommandEvent& event); // advanced
|
||||
// Advanced
|
||||
void WireframeCheck(wxCommandEvent& event);
|
||||
void ShowFPSCheck(wxCommandEvent& event);
|
||||
void OverlayCheck(wxCommandEvent& event);
|
||||
void ShowShaderErrorsCheck(wxCommandEvent& event);
|
||||
@ -70,6 +73,9 @@ class ConfigDialog : public wxDialog
|
||||
void TexturePathChange(wxFileDirPickerEvent& event);
|
||||
void DllAbout(wxCommandEvent& event);
|
||||
|
||||
// Hacks
|
||||
void InvertDepth(wxCommandEvent& event);
|
||||
|
||||
private:
|
||||
|
||||
wxButton* m_About;
|
||||
@ -93,9 +99,11 @@ class ConfigDialog : public wxDialog
|
||||
wxComboBox *m_FullscreenCB;
|
||||
wxCheckBox *m_RenderToMainWindow;
|
||||
wxCheckBox *m_Fullscreen;
|
||||
wxCheckBox *m_InvertDepth;
|
||||
wxPanel *m_PageAdvanced;
|
||||
wxPanel *m_PageEnhancements;
|
||||
wxPanel *m_PageVideo;
|
||||
wxPanel *m_PageHacks;
|
||||
wxNotebook *m_Notebook;
|
||||
|
||||
private:
|
||||
@ -130,6 +138,8 @@ class ConfigDialog : public wxDialog
|
||||
ID_NOTEBOOK,
|
||||
ID_PAGEVIDEO,
|
||||
ID_PAGEENHANCEMENTS,
|
||||
ID_INVERTDEPTH,
|
||||
ID_PAGEHACKS,
|
||||
ID_GRAPHIC_ABOUT,
|
||||
////GUI Enum Control ID End
|
||||
ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values
|
||||
|
@ -425,7 +425,7 @@ void VertexShaderMngr::SetConstants()
|
||||
}
|
||||
|
||||
// Metroid Prime 1 & 2 likes this
|
||||
glDepthRange(-(0.0f - (rawViewport[5]-rawViewport[2])/16777215.0f), rawViewport[5]/16777215.0f);
|
||||
glDepthRange((g_Config.bInvertDepth ? -1 : 1) * -(0.0f - (rawViewport[5]-rawViewport[2])/16777215.0f), rawViewport[5]/16777215.0f);
|
||||
|
||||
// FZero stage likes this (a sonic hack)
|
||||
// glDepthRange(-(0.0f - (rawViewport[5]-rawViewport[2])/-16777215.0f), rawViewport[5]/16777215.0f);
|
||||
|
Loading…
x
Reference in New Issue
Block a user