Enables stereo rendering with OpenGL ES 3.1 + AEP.

If the host device supports GLES 3.1 and AEP we can have stereo rendering.
Just need to make sure to grab the correct function pointer that GL_EXT_geometry_shader provides, and enable AEP in the shaders.

We can't just check if AEP is in the extension list for support because Qualcomm has failed once more.
With the Nexus 6 it reports support for AEP but doesn't support OpenGL ES 3.1, which is an impossible combination.
From reports on their forum it seems that attempting to use any AEP things results in nothing happening, seems like a stub implementation.
This commit is contained in:
Ryan Houdek
2014-12-07 05:29:36 +00:00
parent 40f2333145
commit ce7c52eca0
4 changed files with 14 additions and 2 deletions

View File

@ -497,15 +497,17 @@ Renderer::Renderer()
if (strstr(g_ogl_config.glsl_version, "3.0"))
{
g_ogl_config.eSupportedGLSLVersion = GLSLES_300;
g_ogl_config.bSupportsAEP = false;
g_Config.backend_info.bSupportsStereoscopy = false;
}
else
{
g_ogl_config.eSupportedGLSLVersion = GLSLES_310;
g_ogl_config.bSupportsAEP = GLExtensions::Supports("GL_ANDROID_extension_pack_es31a");
g_Config.backend_info.bSupportsBindingLayout = true;
g_Config.backend_info.bSupportsEarlyZ = true;
g_Config.backend_info.bSupportsStereoscopy = g_ogl_config.bSupportsAEP;
}
// TODO: OpenGL ES 3.1 provides the necessary features as extensions.
g_Config.backend_info.bSupportsStereoscopy = false;
}
else
{
@ -532,6 +534,9 @@ Renderer::Renderer()
{
g_ogl_config.eSupportedGLSLVersion = GLSL_150;
}
// Desktop OpenGL can't have the Android Extension Pack
g_ogl_config.bSupportsAEP = false;
}
if (GLExtensions::Supports("GL_KHR_debug"))