Creating a GraphicsContext with null parameters is not a guarantee that
we will get a dummy context that does not call any OpenGL functions. We
need to explicitly define and construct a dummy context that is safe to
use inside the designer.
Affects issue #49
GraphicsMode.Index is set by the platform-specific context constructor,
which is invoked after the X11GLControl constructor. It does not make
sense to check GraphicsMode.Index in the X11GLControl constructor, as it
is never set at that point.
In OpenTK 1.1, GraphicsMode queries the platform for a mode id lazily.
By delaying VisualInfo selection until the GraphicsContext is constructed
we ensure that a concrete GraphicsMode is selected and ready for use.
WS_CLIPCHILDREN and WS_CLIPSIBLINGS appear to cause flickering on
specific video cards. OpenGL appears to work correctly without these, so
we'll disable them to return to OpenTK 1.0 behavior.
SDL does not currently support embedding into Windows Forms (this is an
upstream limitation.) To ensure that existing WinForms applications
continue to function even if SDL is installed, GLControl will now try to
initialize OpenTK with a native backend. The user can still override
this behavior using OpenTK.Toolkit.Init(ToolkitOptions), as normal.
SDL2 will refuse to create an OpenGL context on a window with the SDL_WINDOW_FOREIGN flag (i.e. windows that are passed to SDL2 through SDL_CreateWindowFrom). This must be fixed upstream.
Fixed msbuild compilation by removing the 3.5 bootstrap ItemGroups. (VS2010 added those on its own - hey, we are targeting v2.0 and we are not using ClickOnce!)
* Source/Build.Tasks/Build.Tasks.csproj:
* Source/Examples/OpenTK.Examples.csproj:
* Source/GLControl/OpenTK.GLControl.csproj:
* Source/Compatibility/OpenTK.Compatibility.csproj: Ensure we are
using the 2.0 toolset to build. Fixes compilation errors on
MonoDevelop/xbuild.
* Documentation/Build.Docs.csproj: Use "." instead of
"$(MSBuildProjectDirectory)", because MonoDevelop/xbuild fails to
replace the latter with its value.
* GLControl.cs: More defensive checks for null GraphicsModes.
Set flags, context version and GraphicsMode before calling
InitializeComponents(), as the latter might cause the context to be
created (and we need this information before creating the context).
Fixes ArgumentNullException on Linux.
Removed OpenTK.Platform.Utilities.CreateWindowInfo and made the platform-specific CreateWindowInfo methods public (e.g. CreateX11WindowInfo).
Moved Mono Windows.Forms-specific code into X11GLControl.
Removed OpenTK.Platform.Utilities.IsIdle.
Removed obsolete methods from OpenTK.Platform.Utilities.
Marked OpenTK.Platform.Utilities.CreateGraphicsContext as obsolete (use GraphicsContext constructor instead).
Made IWindowInfo implementations private.
members are accessed (issue [#1141]: "Unhandled exception in
GlControl possible bug in rev 2207"). Throw ObjectDisposedException
if public members are accessed after the GLControl has been
disposed. Force the create/recreation of the control if a public
member is called and the control handle or context does not exist.