diff --git a/OpenRA.Platforms.Default/OpenGL.cs b/OpenRA.Platforms.Default/OpenGL.cs index 7f49bb34ad..dbf6ffe9a7 100644 --- a/OpenRA.Platforms.Default/OpenGL.cs +++ b/OpenRA.Platforms.Default/OpenGL.cs @@ -596,15 +596,24 @@ namespace OpenRA.Platforms.Default glBindTexture = Bind("glBindTexture"); glActiveTexture = Bind("glActiveTexture"); glTexImage2D = Bind("glTexImage2D"); - glGetTexImage = Bind("glGetTexImage"); glTexParameteri = Bind("glTexParameteri"); glTexParameterf = Bind("glTexParameterf"); if (Profile != GLProfile.Legacy) { + if (Profile != GLProfile.Embedded) + { + glGetTexImage = Bind("glGetTexImage"); + glBindFragDataLocation = Bind("glBindFragDataLocation"); + } + else + { + glGetTexImage = null; + glBindFragDataLocation = null; + } + glGenVertexArrays = Bind("glGenVertexArrays"); glBindVertexArray = Bind("glBindVertexArray"); - glBindFragDataLocation = Bind("glBindFragDataLocation"); glGenFramebuffers = Bind("glGenFramebuffers"); glBindFramebuffer = Bind("glBindFramebuffer"); glFramebufferTexture2D = Bind("glFramebufferTexture2D"); diff --git a/OpenRA.Platforms.Default/Shader.cs b/OpenRA.Platforms.Default/Shader.cs index 1ae7dd9b67..0062434af5 100644 --- a/OpenRA.Platforms.Default/Shader.cs +++ b/OpenRA.Platforms.Default/Shader.cs @@ -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();