protected static GLContextSpec GetVersionSpec(RendererOpenGLVersion version) { var spec = new GLContextSpec { OpenGLVersion = version }; switch (version) { case RendererOpenGLVersion.GL33: spec.Major = 3; spec.Minor = 3; spec.Profile = GLContextProfile.Core; spec.CreationApi = GLContextCreationApi.Native; break; case RendererOpenGLVersion.GL31: spec.Major = 3; spec.Minor = 1; spec.Profile = GLContextProfile.Compatibility; spec.CreationApi = GLContextCreationApi.Native; break; case RendererOpenGLVersion.GLES3: spec.Major = 3; spec.Minor = 0; spec.Profile = GLContextProfile.Es; // Initializing ES on Windows EGL so that we can use ANGLE. spec.CreationApi = OperatingSystem.IsWindows() ? GLContextCreationApi.Egl : GLContextCreationApi.Native; break; case RendererOpenGLVersion.GLES2: spec.Major = 2; spec.Minor = 0; spec.Profile = GLContextProfile.Es; // Initializing ES on Windows EGL so that we can use ANGLE. spec.CreationApi = OperatingSystem.IsWindows() ? GLContextCreationApi.Egl : GLContextCreationApi.Native; break; default: throw new ArgumentOutOfRangeException(); } return(spec); }
public override GLContextSpec?SpecWithOpenGLVersion(RendererOpenGLVersion version) { // Do not initialize GL context on the window directly, we use ANGLE. return(null); }
public override GLContextSpec?SpecWithOpenGLVersion(RendererOpenGLVersion version) { return(null); }
public abstract GLContextSpec?SpecWithOpenGLVersion(RendererOpenGLVersion version);
public override GLContextSpec?SpecWithOpenGLVersion(RendererOpenGLVersion version) { return(GetVersionSpec(version)); }