mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 13:55:38 +00:00
Don't require OpenGL compatibility profile
This commit is contained in:
parent
1c17d5495e
commit
f5482cb3b6
|
@ -59,8 +59,8 @@ void GPU_HW_ShaderGen::SetGLSLVersionString()
|
|||
}
|
||||
|
||||
char buf[128];
|
||||
std::snprintf(buf, sizeof(buf), "#version %d%02d %s", major_version, minor_version,
|
||||
(!m_glsl_es && major_version >= 3 && minor_version >= 3) ? "core" : (m_glsl_es ? "es" : ""));
|
||||
std::snprintf(buf, sizeof(buf), "#version %d%02d%s", major_version, minor_version,
|
||||
(m_glsl_es && major_version >= 3) ? " es" : "");
|
||||
m_glsl_version_string = buf;
|
||||
}
|
||||
|
||||
|
|
|
@ -174,7 +174,20 @@ void OpenGLDisplayWindow::WindowResized() {}
|
|||
|
||||
const char* OpenGLDisplayWindow::GetGLSLVersionString() const
|
||||
{
|
||||
return m_gl_context->isOpenGLES() ? "#version 300 es" : "#version 130\n";
|
||||
if (m_gl_context->isOpenGLES())
|
||||
{
|
||||
if (GLAD_GL_ES_VERSION_3_0)
|
||||
return "#version 300 es";
|
||||
else
|
||||
return "#version 100";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GLAD_GL_VERSION_3_3)
|
||||
return "#version 330";
|
||||
else
|
||||
return "#version 130";
|
||||
}
|
||||
}
|
||||
|
||||
std::string OpenGLDisplayWindow::GetGLSLVersionHeader() const
|
||||
|
|
|
@ -143,7 +143,20 @@ void OpenGLHostDisplay::WindowResized()
|
|||
|
||||
const char* OpenGLHostDisplay::GetGLSLVersionString() const
|
||||
{
|
||||
return m_is_gles ? "#version 300 es" : "#version 130\n";
|
||||
if (m_is_gles)
|
||||
{
|
||||
if (GLAD_GL_ES_VERSION_3_0)
|
||||
return "#version 300 es";
|
||||
else
|
||||
return "#version 100";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GLAD_GL_VERSION_3_3)
|
||||
return "#version 330";
|
||||
else
|
||||
return "#version 130";
|
||||
}
|
||||
}
|
||||
|
||||
std::string OpenGLHostDisplay::GetGLSLVersionHeader() const
|
||||
|
|
Loading…
Reference in a new issue