Move the GLSL extension checks over here so it is nicer.
This commit is contained in:
parent
7cb3d86e31
commit
ac77bbd47b
|
@ -80,16 +80,6 @@ void PixelShaderCache::Init()
|
||||||
pSetPSConstant4fv = SetGLSLPSConstant4fv;
|
pSetPSConstant4fv = SetGLSLPSConstant4fv;
|
||||||
pSetMultiPSConstant4fv = SetMultiGLSLPSConstant4fv;
|
pSetMultiPSConstant4fv = SetMultiGLSLPSConstant4fv;
|
||||||
pCompilePixelShader = CompileGLSLPixelShader;
|
pCompilePixelShader = CompileGLSLPixelShader;
|
||||||
// Should this be set here?
|
|
||||||
if (strstr((const char*)glGetString(GL_EXTENSIONS), "GL_ARB_shading_language_420pack") != NULL)
|
|
||||||
g_Config.backend_info.bSupportsGLSLBinding = true;
|
|
||||||
if (strstr((const char*)glGetString(GL_EXTENSIONS), "GL_ARB_uniform_buffer_object") != NULL)
|
|
||||||
g_Config.backend_info.bSupportsGLSLUBO = true;
|
|
||||||
|
|
||||||
UpdateActiveConfig();
|
|
||||||
OSD::AddMessage(StringFromFormat("Using GLSL. Supports Binding: %s UBOs: %s",
|
|
||||||
g_ActiveConfig.backend_info.bSupportsGLSLBinding ? "True" : "False",
|
|
||||||
g_ActiveConfig.backend_info.bSupportsGLSLUBO ? "True" : "False").c_str(), 5000);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -315,6 +315,17 @@ Renderer::Renderer()
|
||||||
s_bHaveFramebufferBlit = strstr(ptoken, "GL_EXT_framebuffer_blit") != NULL;
|
s_bHaveFramebufferBlit = strstr(ptoken, "GL_EXT_framebuffer_blit") != NULL;
|
||||||
s_bHaveCoverageMSAA = strstr(ptoken, "GL_NV_framebuffer_multisample_coverage") != NULL;
|
s_bHaveCoverageMSAA = strstr(ptoken, "GL_NV_framebuffer_multisample_coverage") != NULL;
|
||||||
|
|
||||||
|
|
||||||
|
if (glewIsSupported("GL_ARB_shading_language_420pack"))
|
||||||
|
g_Config.backend_info.bSupportsGLSLBinding = true;
|
||||||
|
if (glewIsSupported("GL_ARB_uniform_buffer_object"))
|
||||||
|
g_Config.backend_info.bSupportsGLSLUBO = true;
|
||||||
|
|
||||||
|
UpdateActiveConfig();
|
||||||
|
OSD::AddMessage(StringFromFormat("Using GLSL. Supports Binding: %s UBOs: %s",
|
||||||
|
g_ActiveConfig.backend_info.bSupportsGLSLBinding ? "True" : "False",
|
||||||
|
g_ActiveConfig.backend_info.bSupportsGLSLUBO ? "True" : "False").c_str(), 5000);
|
||||||
|
|
||||||
s_LastMultisampleMode = g_ActiveConfig.iMultisampleMode;
|
s_LastMultisampleMode = g_ActiveConfig.iMultisampleMode;
|
||||||
s_MSAASamples = GetNumMSAASamples(s_LastMultisampleMode);
|
s_MSAASamples = GetNumMSAASamples(s_LastMultisampleMode);
|
||||||
s_MSAACoverageSamples = GetNumMSAACoverageSamples(s_LastMultisampleMode);
|
s_MSAACoverageSamples = GetNumMSAACoverageSamples(s_LastMultisampleMode);
|
||||||
|
|
Loading…
Reference in New Issue