getting ready for AA

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@238 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman 2008-08-17 19:35:23 +00:00
parent 8c132bdae5
commit 06e1add86c
4 changed files with 50 additions and 33 deletions

View File

@ -245,7 +245,7 @@ void CFrame::PopulateToolbar(wxToolBar* toolBar)
toolBar->AddTool(IDM_CONFIG_DSP_PLUGIN, _T("DSP"), m_Bitmaps[Toolbar_PluginDSP], _T("DSP settings"));
toolBar->AddTool(IDM_CONFIG_PAD_PLUGIN, _T("PAD"), m_Bitmaps[Toolbar_PluginPAD], _T("PAD settings"));
toolBar->AddSeparator();
toolBar->AddTool(wxID_HELP, _T("About"), m_Bitmaps[Toolbar_Help], _T("About Dolphin"));
toolBar->AddTool(IDM_HELPABOUT, _T("About"), m_Bitmaps[Toolbar_Help], _T("About Dolphin"));
// after adding the buttons to the toolbar, must call Realize() to reflect
// the changes

View File

@ -29,6 +29,7 @@ BEGIN_EVENT_TABLE(ConfigDialog,wxDialog)
EVT_CHECKBOX(ID_RENDERTOMAINWINDOW,ConfigDialog::RenderMainCheck)
EVT_COMBOBOX(ID_FULLSCREENCB,ConfigDialog::FSCB)
EVT_COMBOBOX(ID_WINDOWRESOLUTIONCB,ConfigDialog::WMCB)
EVT_COMBOBOX(ID_ALIASMODECB,ConfigDialog::AACB)
EVT_CHECKBOX(ID_FORCEFILTERING,ConfigDialog::ForceFilteringCheck)
EVT_CHECKBOX(ID_FORCEANISOTROPY,ConfigDialog::ForceAnisotropyCheck)
EVT_CHECKBOX(ID_WIREFRAME,ConfigDialog::WireframeCheck)
@ -54,11 +55,11 @@ ConfigDialog::~ConfigDialog()
void ConfigDialog::CreateGUIControls()
{
//notebook
m_Notebook = new wxNotebook(this, ID_PAGEENHANCEMENTS, wxDefaultPosition, wxDefaultSize);
m_Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
m_PageVideo = new wxPanel(m_Notebook, ID_PAGEVIDEO, wxDefaultPosition, wxDefaultSize);
m_Notebook->AddPage(m_PageVideo, wxT("Video"));
m_PageEnhancements = new wxPanel(m_Notebook, ID_WXNOTEBOOKPAGE3, wxDefaultPosition, wxDefaultSize);
m_PageEnhancements = new wxPanel(m_Notebook, ID_PAGEENHANCEMENTS, wxDefaultPosition, wxDefaultSize);
m_Notebook->AddPage(m_PageEnhancements, wxT("Enhancements"));
m_PageAdvanced = new wxPanel(m_Notebook, ID_PAGEADVANCED, wxDefaultPosition, wxDefaultSize);
@ -100,6 +101,14 @@ void ConfigDialog::CreateGUIControls()
m_WindowResolutionCB = new wxComboBox(m_PageVideo, ID_WINDOWRESOLUTIONCB, wxEmptyString, wxDefaultPosition, wxDefaultSize, arrayStringFor_WindowResolutionCB, 0, wxDefaultValidator);
m_WindowResolutionCB->SetValue(wxString::FromAscii(g_Config.iWindowedRes));
wxStaticText *AAText = new wxStaticText(m_PageVideo, ID_AATEXT, wxT("Anti-alias mode:"), wxDefaultPosition, wxDefaultSize, 0);
wxArrayString arrayStringFor_AliasModeCB;
m_AliasModeCB = new wxComboBox(m_PageVideo, ID_ALIASMODECB, wxEmptyString, wxDefaultPosition, wxDefaultSize, arrayStringFor_AliasModeCB, wxCB_READONLY, wxDefaultValidator);
wxString tmp;
tmp<<g_Config.iMultisampleMode;
// since wxCB_READONLY is being used, SetValue will only succeed if tmp is in the list.
m_AliasModeCB->SetValue(tmp);
//page2
m_ForceFiltering = new wxCheckBox(m_PageEnhancements, ID_FORCEFILTERING, wxT("Force bi/trilinear filtering (May cause small glitches)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
m_ForceFiltering->SetValue(g_Config.bForceFiltering);
@ -121,11 +130,6 @@ void ConfigDialog::CreateGUIControls()
m_TexturePath->Enable(m_DumpTextures->IsChecked());
//TODO: make the following work ^^
wxStaticText *AAText = new wxStaticText(m_PageVideo, ID_AATEXT, wxT("Anti-alias mode:"), wxDefaultPosition, wxDefaultSize, 0);
wxArrayString arrayStringFor_AliasModeCB;
m_AliasModeCB = new wxComboBox(m_PageVideo, ID_ALIASMODECB, wxT(""), wxDefaultPosition, wxDefaultSize, arrayStringFor_AliasModeCB, 0, wxDefaultValidator);
m_AliasModeCB->Enable(false);
m_ForceAnisotropy = new wxCheckBox(m_PageEnhancements, ID_FORCEANISOTROPY, wxT("Force maximum anisotropy filtering"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
//m_ForceAnisotropy->SetValue(g_Config.bForceMaxAniso);
m_ForceAnisotropy->Enable(false);
@ -226,6 +230,18 @@ void ConfigDialog::WMCB(wxCommandEvent& event)
strcpy(g_Config.iWindowedRes, m_WindowResolutionCB->GetValue().mb_str() );
}
void ConfigDialog::AddAAMode(int mode)
{
wxString tmp;
tmp<<mode;
m_AliasModeCB->wxControlWithItems::Append(tmp);
}
void ConfigDialog::AACB(wxCommandEvent& event)
{
g_Config.iMultisampleMode = atoi(m_AliasModeCB->GetValue().mb_str());
}
void ConfigDialog::ForceFilteringCheck(wxCommandEvent& event)
{
g_Config.bForceFiltering = m_ForceFiltering->IsChecked();

View File

@ -51,6 +51,8 @@ class ConfigDialog : public wxDialog
void FSCB(wxCommandEvent& event);
void AddWindowReso(char *reso);
void WMCB(wxCommandEvent& event);
void AddAAMode(int mode);
void AACB(wxCommandEvent& event);
void ForceFilteringCheck(wxCommandEvent& event);
void ForceAnisotropyCheck(wxCommandEvent& event);
void WireframeCheck(wxCommandEvent& event);
@ -88,30 +90,29 @@ class ConfigDialog : public wxDialog
enum
{
////GUI Enum Control ID Start
ID_CANCEL = 1030,
ID_OK = 1028,
ID_TEXTUREPATH = 1027,
ID_SHADERERRORS = 1026,
ID_TEXFMTCENTER = 1025,
ID_TEXFMTOVERLAY = 1024,
ID_STATISTICS = 1023,
ID_DUMPTEXTURES = 1022,
ID_WIREFRAME = 1021,
ID_FORCEANISOTROPY = 1020,
ID_FORCEFILTERING = 1019,
ID_AATEXT = 1015,
ID_ALIASMODECB = 1014,
ID_FSTEXT = 1013,
ID_WMTEXT = 1012,
ID_WINDOWRESOLUTIONCB = 1011,
ID_FULLSCREENCB = 1010,
ID_RENDERTOMAINWINDOW = 1009,
ID_FULLSCREEN = 1008,
ID_PAGEADVANCED = 1007,
ID_WXNOTEBOOKPAGE3 = 1006,
ID_PAGEVIDEO = 1005,
ID_PAGEENHANCEMENTS = 1004,
ID_WXNOTEBOOKPAGE1 = 1003,
ID_CANCEL = 1000,
ID_OK,
ID_TEXTUREPATH,
ID_SHADERERRORS,
ID_TEXFMTCENTER,
ID_TEXFMTOVERLAY,
ID_STATISTICS,
ID_DUMPTEXTURES,
ID_WIREFRAME,
ID_FORCEANISOTROPY,
ID_FORCEFILTERING,
ID_ALIASMODECB,
ID_AATEXT,
ID_WINDOWRESOLUTIONCB,
ID_WMTEXT,
ID_FULLSCREENCB,
ID_FSTEXT,
ID_RENDERTOMAINWINDOW,
ID_FULLSCREEN,
ID_PAGEADVANCED,
ID_NOTEBOOK,
ID_PAGEVIDEO,
ID_PAGEENHANCEMENTS,
////GUI Enum Control ID End
ID_DUMMY_VALUE_ //don't remove this value unless you have other enum values
};

View File

@ -133,6 +133,7 @@ struct Config
bool renderToMainframe;
char iFSResolution[16];
char iWindowedRes[16];
int iMultisampleMode;
bool bForceFiltering;
bool bForceMaxAniso;
@ -148,7 +149,6 @@ struct Config
int iLog; // CONF_ bits
int iSaveTargetId;
int iAdapter;
int iMultisampleMode;
char psProfile[16];
char vsProfile[16];
int iPostprocessEffect;