Enable gfx_opengl3 by default

This commit is contained in:
def 2017-10-20 22:52:38 +02:00
parent 342c6048bf
commit cb00a294b8
4 changed files with 13 additions and 10 deletions

View file

@ -1515,7 +1515,7 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt
}
m_UseOpenGL3_3 = false;
if (!g_Config.m_GfxForceOldOpenGL && SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE) == 0)
if (g_Config.m_GfxOpenGL3 && SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE) == 0)
{
pErr = SDL_GetError();
if(pErr[0] != '\0')

View file

@ -1236,12 +1236,15 @@ int CGraphics_Threaded::InitWindow()
return 0;
}
//try using old opengl context
if(!g_Config.m_GfxForceOldOpenGL)
// try using old opengl context
if(g_Config.m_GfxOpenGL3)
{
g_Config.m_GfxForceOldOpenGL = 1;
g_Config.m_GfxOpenGL3 = 0;
if(IssueInit() == 0)
{
g_Config.m_GfxOpenGL3 = 1;
return 0;
}
}
// try lowering the resolution

View file

@ -400,7 +400,7 @@ MACRO_CONFIG_INT(ClDemoSliceEnd, cl_demo_slice_end, -1, 0, 0, CFGFLAG_SAVE|CFGFL
MACRO_CONFIG_INT(ClDemoShowSpeed, cl_demo_show_speed, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Show speed meter on change")
//opengl
MACRO_CONFIG_INT(GfxForceOldOpenGL, gfx_force_old_opengl, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Forces to use the old opengl version.")
MACRO_CONFIG_INT(GfxOpenGL3, gfx_opengl3, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Use new OpenGL3 with shaders")
#if !defined(CONF_PLATFORM_MACOSX)
MACRO_CONFIG_INT(GfxEnableTextureUnitOptimization, gfx_enable_texture_unit_optimization, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Use multiple texture units, instead of only one.")
#else

View file

@ -909,7 +909,7 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
static int s_GfxFsaaSamples = g_Config.m_GfxFsaaSamples;
static int s_GfxTextureQuality = g_Config.m_GfxTextureQuality;
static int s_GfxTextureCompression = g_Config.m_GfxTextureCompression;
static int s_GfxOpenGLVersion = g_Config.m_GfxForceOldOpenGL;
static int s_GfxOpenGLVersion = g_Config.m_GfxOpenGL3;
static int s_GfxEnableTextureUnitOptimization = g_Config.m_GfxEnableTextureUnitOptimization;
static int s_GfxUsePreinitBuffer = g_Config.m_GfxUsePreinitBuffer;
@ -1034,13 +1034,13 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
g_Config.m_GfxHighDetail ^= 1;
MainView.HSplitTop(20.0f, &Button, &MainView);
if(DoButton_CheckBox(&g_Config.m_GfxForceOldOpenGL, Localize("Use OpenGL 3.3 (experimental)"), g_Config.m_GfxForceOldOpenGL^1, &Button))
if(DoButton_CheckBox(&g_Config.m_GfxOpenGL3, Localize("Use OpenGL 3.3 (experimental)"), g_Config.m_GfxOpenGL3, &Button))
{
CheckSettings = true;
g_Config.m_GfxForceOldOpenGL ^= 1;
g_Config.m_GfxOpenGL3 ^= 1;
}
if(g_Config.m_GfxForceOldOpenGL == 0)
if(g_Config.m_GfxOpenGL3)
{
MainView.HSplitTop(20.0f, &Button, &MainView);
if(DoButton_CheckBox(&g_Config.m_GfxUsePreinitBuffer, Localize("Preinit VBO (iGPUs only)"), g_Config.m_GfxUsePreinitBuffer, &Button))
@ -1067,7 +1067,7 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
s_GfxFsaaSamples == g_Config.m_GfxFsaaSamples &&
s_GfxTextureQuality == g_Config.m_GfxTextureQuality &&
s_GfxTextureCompression == g_Config.m_GfxTextureCompression &&
s_GfxOpenGLVersion == g_Config.m_GfxForceOldOpenGL &&
s_GfxOpenGLVersion == g_Config.m_GfxOpenGL3 &&
s_GfxUsePreinitBuffer == g_Config.m_GfxUsePreinitBuffer &&
s_GfxEnableTextureUnitOptimization == g_Config.m_GfxEnableTextureUnitOptimization)
m_NeedRestartGraphics = false;