We now use the display connection specified in EglWindowInfo
throughout the EGL backend, instead of opening new connections
in EglGraphicsMode. This fixes EGL errors in
Egl.CreateWindowSurface.
As part of this fix, all instances of
IPlatformFactory.CreateGraphicsMode() have been removed. This
API is no longer used in OpenTK 1.1
We have to load statically exported entry points using the regular OS
symbol loading facilities, and only use eglGetProcAddress for
extensions.
Fixes crash in https://github.com/mono/MonoGame/pull/2377
EGL and NSOpenGL do not offer an EXT_swap_control_tear equivalent so
use regular vsync for now. The relevant extension string is now
correctly checked on WGL and GLX.
* EglContext.cs:
* EglGraphicsMode.cs: Added a parameter to indicate which ES renderer
version we wish to use. Fixes issue [#2247]: "CreateEGLGraphicsMode
should select the correct renderer".
* Source/OpenTK/Graphics/GraphicsContext.cs:
* Source/OpenTK/Graphics/IGraphicsContext.cs:
* Source/OpenTK/Platform/MacOS/AglContext.cs:
* Source/OpenTK/Platform/X11/X11GLContext.cs:
* Source/OpenTK/Graphics/GraphicsContextBase.cs:
* Source/OpenTK/Platform/Windows/WinGLContext.cs:
* Source/OpenTK/Platform/Dummy/DummyGLContext.cs: Added IsDisposed
property to IGraphicsContext and implemented in all context classes.
Removed 'bool disposed' fields from these classes in favor of the
new property.
Added GraphicsContextBase, which acts as the foundation of all IGraphicsContext implementations.
Added DesktopGraphicsContext, which acts as the foundation of all desktop (i.e. not ES) IGraphicsContext implementations.
Modified all IGraphicsContext implementations to inherit from GraphicsContextBase and/or DesktopGraphicsContext.