Remove GLVersion properties, and use the underlying GLArea implementation.
This commit is contained in:
parent
456d7cde37
commit
c485327da5
1 changed files with 3 additions and 13 deletions
|
@ -64,16 +64,6 @@ namespace OpenTK
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Stereo { get; set; }
|
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>
|
/// <summary>
|
||||||
/// The set <see cref="GraphicsContextFlags"/> for this widget.
|
/// The set <see cref="GraphicsContextFlags"/> for this widget.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -114,8 +104,7 @@ namespace OpenTK
|
||||||
Samples = graphicsMode.Samples;
|
Samples = graphicsMode.Samples;
|
||||||
Stereo = graphicsMode.Stereo;
|
Stereo = graphicsMode.Stereo;
|
||||||
|
|
||||||
GlVersionMajor = glVersionMajor;
|
SetRequiredVersion(glVersionMajor, glVersionMinor);
|
||||||
GlVersionMinor = glVersionMinor;
|
|
||||||
GraphicsContextFlags = graphicsContextFlags;
|
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.
|
// Since the GDK context is already created and has been made current, we can retrieve its handle.
|
||||||
var gdkContextHandle = Factory.Default.CreateGetCurrentGraphicsContext()();
|
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);
|
_GraphicsContext.MakeCurrent(_WindowInfo);
|
||||||
|
|
||||||
if (GraphicsContext.ShareContexts)
|
if (GraphicsContext.ShareContexts)
|
||||||
|
|
Loading…
Reference in a new issue