Split GLProfile from GLFeatures.

This commit is contained in:
Paul Chote
2020-04-21 10:23:57 +01:00
committed by abcdefg30
parent a4b427bfac
commit 91c4179f05
5 changed files with 29 additions and 20 deletions

View File

@@ -50,7 +50,7 @@ namespace OpenRA.Platforms.Default
OpenGL.glBindRenderbuffer(OpenGL.GL_RENDERBUFFER, depth);
OpenGL.CheckGLError();
var glDepth = OpenGL.Features.HasFlag(OpenGL.GLFeatures.GLES) ? OpenGL.GL_DEPTH_COMPONENT16 : OpenGL.GL_DEPTH_COMPONENT;
var glDepth = OpenGL.Profile == GLProfile.Embedded ? OpenGL.GL_DEPTH_COMPONENT16 : OpenGL.GL_DEPTH_COMPONENT;
OpenGL.glRenderbufferStorage(OpenGL.GL_RENDERBUFFER, glDepth, size.Width, size.Height);
OpenGL.CheckGLError();