We currently have three categories of string parameters: `string`,
`string[]` and `StringBuilder`. (OpenTK 1.2 adds one more: `ref
string`.) Each category needs to be marshaled separately into a native
character array.
This commit implements the following changes:
- string[] epilogues are now correctly emitted, instead of being
ignored.
- string[] prologues and epilogues now use the same local variable name.
- all epilogues are now generated with a single pass over the function
parameters, instead of requiring a separate pass for each category.
- string prologues and epilogues now allocate local variables based on
the relevant parameter *name* rather than the parameter *type*.
Fixes issue #144.
Fixes two issues:
1. FreeStringArrayPtr used the wrong variable in the offset to
ReadIntPtr causing an access violation.
2. Better cleanup of memory in MarshalStringArrayToPtr when any alloc
fails.
This introduces support for the following extensions:
- EXT_geometry_point_size
- EXT_primitive_bounding_box
- EXT_texture_array
- EXT_tessellation_point_size
To do that, we need a custom InputOnly window. This window is only used
for receiving the exit ClientMessage - XI2 input is still received
through the root window.
Fixes issue https://github.com/mono/MonoGame/issues/2711
You cannot create an X11/OpenGL context without the GLX extension.
OpenTK will now throw a `NotSupportedException` when this condition is
encountered.
In some cases, it may be possible to enable the EGL backend by passing
`GraphicsContextFlags.Embedded` to the `GraphicsContext` constructor.
External mice will now report horizontal scrolling in the low-level
`Mouse.GetState()` API. The touchpad apparently creates an emulated
mouse device that does not report horizontal wheel scrolling events.
Touchpad support probably requires a proper multitouch implementation.
OpenTK uses the win32 wheel coordinate system, where
(+h, +v) = (right, up). XI2 uses (+h, +v) = (right, down)
instead, so we need to flip the vertical offset.
Fixes issue #133 and https://github.com/mono/MonoGame/issues/2686
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.