Remove glGetTexImage/glBindFragDataLocation on GLES.
These functions are not available in GLES3.
This commit is contained in:
@@ -596,15 +596,24 @@ namespace OpenRA.Platforms.Default
|
|||||||
glBindTexture = Bind<BindTexture>("glBindTexture");
|
glBindTexture = Bind<BindTexture>("glBindTexture");
|
||||||
glActiveTexture = Bind<ActiveTexture>("glActiveTexture");
|
glActiveTexture = Bind<ActiveTexture>("glActiveTexture");
|
||||||
glTexImage2D = Bind<TexImage2D>("glTexImage2D");
|
glTexImage2D = Bind<TexImage2D>("glTexImage2D");
|
||||||
glGetTexImage = Bind<GetTexImage>("glGetTexImage");
|
|
||||||
glTexParameteri = Bind<TexParameteri>("glTexParameteri");
|
glTexParameteri = Bind<TexParameteri>("glTexParameteri");
|
||||||
glTexParameterf = Bind<TexParameterf>("glTexParameterf");
|
glTexParameterf = Bind<TexParameterf>("glTexParameterf");
|
||||||
|
|
||||||
if (Profile != GLProfile.Legacy)
|
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");
|
glGenVertexArrays = Bind<GenVertexArrays>("glGenVertexArrays");
|
||||||
glBindVertexArray = Bind<BindVertexArray>("glBindVertexArray");
|
glBindVertexArray = Bind<BindVertexArray>("glBindVertexArray");
|
||||||
glBindFragDataLocation = Bind<BindFragDataLocation>("glBindFragDataLocation");
|
|
||||||
glGenFramebuffers = Bind<GenFramebuffers>("glGenFramebuffers");
|
glGenFramebuffers = Bind<GenFramebuffers>("glGenFramebuffers");
|
||||||
glBindFramebuffer = Bind<BindFramebuffer>("glBindFramebuffer");
|
glBindFramebuffer = Bind<BindFramebuffer>("glBindFramebuffer");
|
||||||
glFramebufferTexture2D = Bind<FramebufferTexture2D>("glFramebufferTexture2D");
|
glFramebufferTexture2D = Bind<FramebufferTexture2D>("glFramebufferTexture2D");
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ namespace OpenRA.Platforms.Default
|
|||||||
OpenGL.glBindAttribLocation(program, TintAttributeIndex, "aVertexTint");
|
OpenGL.glBindAttribLocation(program, TintAttributeIndex, "aVertexTint");
|
||||||
OpenGL.CheckGLError();
|
OpenGL.CheckGLError();
|
||||||
|
|
||||||
if (OpenGL.Profile != GLProfile.Legacy)
|
if (OpenGL.Profile == GLProfile.Modern)
|
||||||
{
|
{
|
||||||
OpenGL.glBindFragDataLocation(program, 0, "fragColor");
|
OpenGL.glBindFragDataLocation(program, 0, "fragColor");
|
||||||
OpenGL.CheckGLError();
|
OpenGL.CheckGLError();
|
||||||
|
|||||||
Reference in New Issue
Block a user