Remove glGetTexImage/glBindFragDataLocation on GLES.

These functions are not available in GLES3.
This commit is contained in:
Paul Chote
2020-10-01 18:37:31 +01:00
committed by abcdefg30
parent f2a1a497c7
commit 1ab1c30e39
2 changed files with 12 additions and 3 deletions

View File

@@ -596,15 +596,24 @@ namespace OpenRA.Platforms.Default
glBindTexture = Bind<BindTexture>("glBindTexture");
glActiveTexture = Bind<ActiveTexture>("glActiveTexture");
glTexImage2D = Bind<TexImage2D>("glTexImage2D");
glGetTexImage = Bind<GetTexImage>("glGetTexImage");
glTexParameteri = Bind<TexParameteri>("glTexParameteri");
glTexParameterf = Bind<TexParameterf>("glTexParameterf");
if (Profile != GLProfile.Legacy)
{
if (Profile != GLProfile.Embedded)
{
glGetTexImage = Bind<GetTexImage>("glGetTexImage");
glBindFragDataLocation = Bind<BindFragDataLocation>("glBindFragDataLocation");
}
else
{
glGetTexImage = null;
glBindFragDataLocation = null;
}
glGenVertexArrays = Bind<GenVertexArrays>("glGenVertexArrays");
glBindVertexArray = Bind<BindVertexArray>("glBindVertexArray");
glBindFragDataLocation = Bind<BindFragDataLocation>("glBindFragDataLocation");
glGenFramebuffers = Bind<GenFramebuffers>("glGenFramebuffers");
glBindFramebuffer = Bind<BindFramebuffer>("glBindFramebuffer");
glFramebufferTexture2D = Bind<FramebufferTexture2D>("glFramebufferTexture2D");

View File

@@ -84,7 +84,7 @@ namespace OpenRA.Platforms.Default
OpenGL.glBindAttribLocation(program, TintAttributeIndex, "aVertexTint");
OpenGL.CheckGLError();
if (OpenGL.Profile != GLProfile.Legacy)
if (OpenGL.Profile == GLProfile.Modern)
{
OpenGL.glBindFragDataLocation(program, 0, "fragColor");
OpenGL.CheckGLError();