Inherit from GLArea instead of DrawingArea.

This commit is contained in:
Jarl Gullberg 2017-09-15 11:21:22 +02:00
parent d4112a6e95
commit d677aef6c3
No known key found for this signature in database
GPG key ID: FBB69BD7CAE095A0

View file

@ -7,6 +7,7 @@ using OpenTK.Platform;
using Gtk; using Gtk;
using OpenTK.OSX; using OpenTK.OSX;
using OpenTK.Platform.X11;
using OpenTK.Win; using OpenTK.Win;
using OpenTK.X11; using OpenTK.X11;
@ -17,7 +18,7 @@ namespace OpenTK
/// </summary> /// </summary>
[CLSCompliant(false)] [CLSCompliant(false)]
[ToolboxItem(true)] [ToolboxItem(true)]
public class GLWidget: DrawingArea public class GLWidget: GLArea
{ {
private static int _GraphicsContextCount; private static int _GraphicsContextCount;
@ -386,6 +387,7 @@ namespace OpenTK
} }
// GraphicsContext // GraphicsContext
_GraphicsContext = new GraphicsContext(graphicsMode, _WindowInfo, GlVersionMajor, GlVersionMinor, GraphicsContextFlags); _GraphicsContext = new GraphicsContext(graphicsMode, _WindowInfo, GlVersionMajor, GlVersionMinor, GraphicsContextFlags);
_GraphicsContext.MakeCurrent(_WindowInfo); _GraphicsContext.MakeCurrent(_WindowInfo);