Since GL_TRUE and GL_FALSE match .Net true and false (1 and 0,
respectively), we can simply reinterpret the byte value as a bool.
In the future, we could issue a `(if value == 0 then false else true)`
statement for added safety, but this does not appear to be necessary
right now.
GLboolean is typedefed as an unsigned char. It appears that `[return:
MarshalAs(UnmanagedType.U1)]` is ignored in calli p/invokes, so we need
to take care of this ourselves by emitting byte instead of bool for the
p/invoke signature. The public API remains unchanged.
Fixes issue #129.
The original C code had if(m & 0x00800000) which is true if the
expresssion does not evaluate to zero. This was inncorretly translated
to the C# code if((m & 0x00800000) == 1) which only evaluates true if
the expression evalaute to 1, which it never does. The correct test is
to test not equal to zero (!= 0).
This test checks every public API under OpenTK.Audio, OpenTK.Compute
and OpenTK.Graphics for compatibility. Incompatible changes will cause
a compilation failure.
Versions prior to 2.0.0 are not ABI-compatible with 2.0.x and
attempting to use those will result in random instability. We now
explicitly check the SDL2 version before enabling the SDL2 backend.
This was caused by calling XDestroyWindow inside Dispose(), or
by processing events after calling XDestroyWindow. Pending events
are now discarded when Close() is called and not cancelled, and
XDestroyWindow is only called if the window exists.
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