Remove GLVersion properties, and use the underlying GLArea implementation.

This commit is contained in:
Jarl Gullberg 2017-09-15 11:52:50 +02:00
parent 456d7cde37
commit c485327da5
No known key found for this signature in database
GPG key ID: FBB69BD7CAE095A0

View file

@ -64,16 +64,6 @@ namespace OpenTK
/// </summary>
public bool Stereo { get; set; }
/// <summary>
/// The major version of OpenGL to use.
/// </summary>
public int GlVersionMajor { get; set; }
/// <summary>
/// The minor version of OpenGL to use.
/// </summary>
public int GlVersionMinor { get; set; }
/// <summary>
/// The set <see cref="GraphicsContextFlags"/> for this widget.
/// </summary>
@ -114,8 +104,7 @@ namespace OpenTK
Samples = graphicsMode.Samples;
Stereo = graphicsMode.Stereo;
GlVersionMajor = glVersionMajor;
GlVersionMinor = glVersionMinor;
SetRequiredVersion(glVersionMajor, glVersionMinor);
GraphicsContextFlags = graphicsContextFlags;
}
@ -393,7 +382,8 @@ namespace OpenTK
// Since the GDK context is already created and has been made current, we can retrieve its handle.
var gdkContextHandle = Factory.Default.CreateGetCurrentGraphicsContext()();
_GraphicsContext = new GraphicsContext(gdkContextHandle, _WindowInfo, null, GlVersionMajor, GlVersionMinor, GraphicsContextFlags);
GetRequiredVersion(out int glVersionMajor, out int glVersionMinor);
_GraphicsContext = new GraphicsContext(gdkContextHandle, _WindowInfo, null, glVersionMajor, glVersionMinor, GraphicsContextFlags);
_GraphicsContext.MakeCurrent(_WindowInfo);
if (GraphicsContext.ShareContexts)