[Glide64] Make wrpFBO private

This commit is contained in:
zilmar 2017-03-13 17:42:49 +11:00
parent db3701bde0
commit 28a78a9c95
4 changed files with 21 additions and 10 deletions

View File

@ -316,7 +316,7 @@ public:
m_cbxFBO.Attach(GetDlgItem(IDC_CHK_USE_FRAME_BUFFER_OBJECT)); m_cbxFBO.Attach(GetDlgItem(IDC_CHK_USE_FRAME_BUFFER_OBJECT));
TTSetTxt(IDC_CHK_USE_FRAME_BUFFER_OBJECT, "Use frame buffer objects:\n\nChanges the way FB effects are rendered - with or without usage of the OpenGL Frame Buffer Objects (FBO) extension.\nThe choice depends on game and your video card. FBO off is good for NVIDIA cards, while for ATI cards, it's usually best that FBOs are turned on.\nAlso, some FB effects works only with one of the methods, no matter, which card you have.\nOn the whole, with FBO off, compatibility/ accuracy is a bit better (which is the case for Resident Evil 2).\nHowever, with FBO on with some systems, it can actually be a bit faster in cases.\n\n[Recommended: video card and game dependant]"); TTSetTxt(IDC_CHK_USE_FRAME_BUFFER_OBJECT, "Use frame buffer objects:\n\nChanges the way FB effects are rendered - with or without usage of the OpenGL Frame Buffer Objects (FBO) extension.\nThe choice depends on game and your video card. FBO off is good for NVIDIA cards, while for ATI cards, it's usually best that FBOs are turned on.\nAlso, some FB effects works only with one of the methods, no matter, which card you have.\nOn the whole, with FBO off, compatibility/ accuracy is a bit better (which is the case for Resident Evil 2).\nHowever, with FBO on with some systems, it can actually be a bit faster in cases.\n\n[Recommended: video card and game dependant]");
m_cbxFBO.SetCheck(g_settings->wrpFBO > 0 ? BST_CHECKED : BST_UNCHECKED); m_cbxFBO.SetCheck(g_settings->wrpFBO() > 0 ? BST_CHECKED : BST_UNCHECKED);
m_cbxVRAM.Attach(GetDlgItem(IDC_CHK_AUTODETECT_VRAM)); m_cbxVRAM.Attach(GetDlgItem(IDC_CHK_AUTODETECT_VRAM));
TTSetTxt(IDC_CHK_AUTODETECT_VRAM, "Autodetect VRAM Size:\n\nSince OpenGL cannot do this reliably at the moment, the option to set this manually is available.\nIf checked, plugin will try to autodetect VRAM size.\nBut if this appears wrong, please uncheck and set it to correct value.\n\n[Recommended: on]"); TTSetTxt(IDC_CHK_AUTODETECT_VRAM, "Autodetect VRAM Size:\n\nSince OpenGL cannot do this reliably at the moment, the option to set this manually is available.\nIf checked, plugin will try to autodetect VRAM size.\nBut if this appears wrong, please uncheck and set it to correct value.\n\n[Recommended: on]");
@ -340,7 +340,7 @@ public:
g_settings->SetFullScreenRes(m_cmbFSResolution.GetCurSel()); g_settings->SetFullScreenRes(m_cmbFSResolution.GetCurSel());
g_settings->wrpAnisotropic = m_cbxAnisotropic.GetCheck() == BST_CHECKED; g_settings->wrpAnisotropic = m_cbxAnisotropic.GetCheck() == BST_CHECKED;
g_settings->SetWrpVRAM(m_cbxVRAM.GetCheck() == BST_CHECKED ? 0 : atoi(spinVRAM)); g_settings->SetWrpVRAM(m_cbxVRAM.GetCheck() == BST_CHECKED ? 0 : atoi(spinVRAM));
g_settings->wrpFBO = m_cbxFBO.GetCheck() == BST_CHECKED; g_settings->SetWrpFBO(m_cbxFBO.GetCheck() == BST_CHECKED);
if (memcmp(&oldsettings, g_settings, sizeof(oldsettings))) //check that settings were changed if (memcmp(&oldsettings, g_settings, sizeof(oldsettings))) //check that settings were changed
{ {

View File

@ -205,7 +205,7 @@ void ChangeSize()
void ConfigWrapper() void ConfigWrapper()
{ {
grConfigWrapperExt(g_settings->wrpVRAM() * 1024 * 1024, g_settings->wrpFBO, g_settings->wrpAnisotropic); grConfigWrapperExt(g_settings->wrpVRAM() * 1024 * 1024, g_settings->wrpFBO(), g_settings->wrpAnisotropic);
} }
void UseUnregisteredSetting(int /*SettingID*/) void UseUnregisteredSetting(int /*SettingID*/)
@ -1008,7 +1008,7 @@ int CALL InitiateGFX(GFX_INFO Gfx_Info)
CountCombine(); CountCombine();
ZLUT_init(); ZLUT_init();
grConfigWrapperExt(g_settings->wrpVRAM() * 1024 * 1024, g_settings->wrpFBO, g_settings->wrpAnisotropic); grConfigWrapperExt(g_settings->wrpVRAM() * 1024 * 1024, g_settings->wrpFBO(), g_settings->wrpAnisotropic);
grGlideInit(); grGlideInit();
const char *extensions = grGetString(GR_EXTENSION); const char *extensions = grGetString(GR_EXTENSION);
grGlideShutdown(); grGlideShutdown();

View File

@ -88,7 +88,7 @@ CSettings::CSettings() :
m_FullScreenRes(0), m_FullScreenRes(0),
#endif #endif
m_wrpVRAM(0), m_wrpVRAM(0),
wrpFBO(0), m_wrpFBO(false),
wrpAnisotropic(0), wrpAnisotropic(0),
m_FlushLogs(false) m_FlushLogs(false)
{ {
@ -114,9 +114,9 @@ void CSettings::RegisterSettings(void)
general_setting(Set_texenh_options, "texenh_options", false); general_setting(Set_texenh_options, "texenh_options", false);
general_setting(Set_wrpVRAM, "wrpVRAM", 0); general_setting(Set_wrpVRAM, "wrpVRAM", 0);
#ifndef ANDROID #ifndef ANDROID
general_setting(Set_wrpFBO, "wrpFBO", 0); general_setting(Set_wrpFBO, "wrpFBO", false);
#else #else
general_setting(Set_wrpFBO, "wrpFBO", 1); general_setting(Set_wrpFBO, "wrpFBO", true);
#endif #endif
general_setting(Set_Rotate, "rotate", Rotate_None); general_setting(Set_Rotate, "rotate", Rotate_None);
general_setting(Set_wrpAnisotropic, "wrpAnisotropic", 0); general_setting(Set_wrpAnisotropic, "wrpAnisotropic", 0);
@ -324,6 +324,15 @@ void CSettings::SetWrpVRAM(int value)
} }
} }
void CSettings::SetWrpFBO(bool value)
{
if (value != m_wrpFBO)
{
m_wrpFBO = value;
m_dirty = true;
}
}
void CSettings::SetGhqFltr(TextureFilter_t value) void CSettings::SetGhqFltr(TextureFilter_t value)
{ {
if (value != m_ghq_fltr) if (value != m_ghq_fltr)
@ -559,7 +568,7 @@ void CSettings::ReadSettings()
m_texenh_options = GetSetting(Set_texenh_options) != 0; m_texenh_options = GetSetting(Set_texenh_options) != 0;
m_wrpVRAM = GetSetting(Set_wrpVRAM); m_wrpVRAM = GetSetting(Set_wrpVRAM);
this->wrpFBO = GetSetting(Set_wrpFBO); m_wrpFBO = GetSetting(Set_wrpFBO) != 0;
this->wrpAnisotropic = GetSetting(Set_wrpAnisotropic); this->wrpAnisotropic = GetSetting(Set_wrpAnisotropic);
m_autodetect_ucode = GetSetting(Set_autodetect_ucode) != 0; m_autodetect_ucode = GetSetting(Set_autodetect_ucode) != 0;
@ -829,7 +838,7 @@ void CSettings::WriteSettings(void)
SetSetting(Set_texenh_options, m_texenh_options); SetSetting(Set_texenh_options, m_texenh_options);
SetSetting(Set_wrpVRAM, m_wrpVRAM); SetSetting(Set_wrpVRAM, m_wrpVRAM);
SetSetting(Set_wrpFBO, g_settings->wrpFBO); SetSetting(Set_wrpFBO, m_wrpFBO);
SetSetting(Set_wrpAnisotropic, g_settings->wrpAnisotropic); SetSetting(Set_wrpAnisotropic, g_settings->wrpAnisotropic);
SetSetting(Set_autodetect_ucode, m_autodetect_ucode); SetSetting(Set_autodetect_ucode, m_autodetect_ucode);

View File

@ -262,7 +262,7 @@ public:
inline uint32_t FullScreenRes(void) const { return m_FullScreenRes; } inline uint32_t FullScreenRes(void) const { return m_FullScreenRes; }
#endif #endif
inline int wrpVRAM(void) const { return m_wrpVRAM; } inline int wrpVRAM(void) const { return m_wrpVRAM; }
int wrpFBO; inline bool wrpFBO(void) const { return m_wrpFBO; }
int wrpAnisotropic; int wrpAnisotropic;
inline bool FlushLogs(void) const { return m_FlushLogs; } inline bool FlushLogs(void) const { return m_FlushLogs; }
@ -276,6 +276,7 @@ public:
void SetFog(bool value); void SetFog(bool value);
void SetBuffClear(bool value); void SetBuffClear(bool value);
void SetWrpVRAM(int value); void SetWrpVRAM(int value);
void SetWrpFBO(bool value);
void SetGhqFltr(TextureFilter_t value); void SetGhqFltr(TextureFilter_t value);
void SetGhqEnht(TextureEnhancement_t value); void SetGhqEnht(TextureEnhancement_t value);
void SetGhqCmpr(TextureCompression_t value); void SetGhqCmpr(TextureCompression_t value);
@ -320,6 +321,7 @@ private:
uint32_t m_FullScreenRes; uint32_t m_FullScreenRes;
#endif #endif
int m_wrpVRAM; int m_wrpVRAM;
bool m_wrpFBO;
bool m_FlushLogs; bool m_FlushLogs;
char m_log_dir[260]; char m_log_dir[260];
uint32_t m_ScreenRes; uint32_t m_ScreenRes;