thefiddler [Fri, 18 Jul 2014 07:44:47 +0000 (09:44 +0200)]
[Examples] Only use WinForms when supported.
thefiddler [Fri, 18 Jul 2014 07:22:12 +0000 (09:22 +0200)]
[Linux] Fixed CursorVisible=false behavior
thefiddler [Fri, 18 Jul 2014 07:19:37 +0000 (09:19 +0200)]
[Linux] Fixed X11 vs KMS detection
thefiddler [Fri, 18 Jul 2014 07:05:46 +0000 (09:05 +0200)]
[Linux] Fixed compilation issue
thefiddler [Fri, 18 Jul 2014 07:02:01 +0000 (09:02 +0200)]
[Linux] Print libinput seat for each detected device
thefiddler [Thu, 17 Jul 2014 09:59:38 +0000 (11:59 +0200)]
[KMS] VSync off causes a crash; force VSync on until fixed
VSync off leads to buffer starvation and a crash in
Egl.SwapBuffers. We need to understand why and fix that
before we can disable vsync.
thefiddler [Thu, 17 Jul 2014 09:59:04 +0000 (11:59 +0200)]
[KMS] Print device names when adding input devices
thefiddler [Thu, 17 Jul 2014 09:20:01 +0000 (11:20 +0200)]
[Linux] Improved mouse cursor behavior
thefiddler [Thu, 17 Jul 2014 07:45:13 +0000 (09:45 +0200)]
[Linux] Implemented CursorVisible
thefiddler [Thu, 17 Jul 2014 07:25:16 +0000 (09:25 +0200)]
[Linux] Implemented MouseCursor
thefiddler [Wed, 16 Jul 2014 12:51:14 +0000 (14:51 +0200)]
[KMS] Implemented INativeWindow.PointToClient/Screen
thefiddler [Wed, 16 Jul 2014 12:25:55 +0000 (14:25 +0200)]
[Linux] Corrected values for mouse move and scroll events
thefiddler [Wed, 16 Jul 2014 10:18:24 +0000 (12:18 +0200)]
[Linux] Implemented INativeWindow keyboard/mouse events
The mouse cursor is now confined to the display bounds.
thefiddler [Wed, 16 Jul 2014 09:34:01 +0000 (11:34 +0200)]
[Linux] Fixed GameWindow.ClientSize values.
thefiddler [Wed, 16 Jul 2014 09:24:53 +0000 (11:24 +0200)]
[Linux] Implemented libinput IMouseDriver2
thefiddler [Wed, 16 Jul 2014 09:23:23 +0000 (11:23 +0200)]
[Input] MouseState position is now stored in floating point
Several platforms provide subpixel accuracy for mouse position.
OpenTK can now take advantage of that.
thefiddler [Tue, 15 Jul 2014 21:32:57 +0000 (23:32 +0200)]
[Examples] Reverted mistaken change
thefiddler [Tue, 15 Jul 2014 20:54:04 +0000 (22:54 +0200)]
[Linux] Fixed keyboard polling
thefiddler [Tue, 15 Jul 2014 15:28:31 +0000 (17:28 +0200)]
[Linux] Fixed poll() in libinput event loop
thefiddler [Tue, 15 Jul 2014 07:09:11 +0000 (09:09 +0200)]
[Linux] Completed libinput keyboard driver implementation
thefiddler [Mon, 14 Jul 2014 23:15:44 +0000 (23:15 +0000)]
[Linux] Implemented libinput keyboard input
thefiddler [Mon, 14 Jul 2014 21:35:30 +0000 (21:35 +0000)]
[Linux] Disabled TTY keyboard driver in favor of libinput
The TTY keyboard driver requires a robust cleanup method to avoid
hogging the keyboard/console after the process exists. Without
this, it does not make sense to use enable this driver.
thefiddler [Mon, 14 Jul 2014 21:07:28 +0000 (21:07 +0000)]
[Linux] Improve checks for TTY
thefiddler [Mon, 14 Jul 2014 15:42:17 +0000 (15:42 +0000)]
[Linux] Implemented TTY and libinput keyboard drivers
thefiddler [Thu, 26 Jun 2014 21:11:12 +0000 (23:11 +0200)]
[Linux] Added stub TTY and libinput IKeyboardDriver2
thefiddler [Thu, 26 Jun 2014 20:52:17 +0000 (22:52 +0200)]
[KMS] Query GPUs lazily
thefiddler [Thu, 26 Jun 2014 19:51:01 +0000 (21:51 +0200)]
[KMS] Fixed Gbm.DestroyDevice entry point
thefiddler [Thu, 26 Jun 2014 19:46:04 +0000 (21:46 +0200)]
[KMS] Fixed NRE in Toolkit.Init(); improved resource cleanup
thefiddler [Thu, 26 Jun 2014 13:40:00 +0000 (15:40 +0200)]
[KMS] Added DRM/GBM framebuffer implementation
thefiddler [Thu, 26 Jun 2014 13:39:07 +0000 (15:39 +0200)]
[ES][GL] Print name when loading bindings (debug only)
thefiddler [Wed, 25 Jun 2014 07:35:20 +0000 (09:35 +0200)]
[EGL] Added support for desktop GL rendering
On Linux, EGL can be used to initialize a desktop GL context.
This is especially true on KMS, Wayland and Mir.
thefiddler [Wed, 25 Jun 2014 07:17:20 +0000 (09:17 +0200)]
[EGL] Egl.GetError() now returns ErrorCode
thefiddler [Wed, 25 Jun 2014 07:11:47 +0000 (09:11 +0200)]
[KMS] Improved GBM surface format selection
thefiddler [Wed, 25 Jun 2014 07:01:35 +0000 (09:01 +0200)]
[KMS] Create window surface
thefiddler [Tue, 24 Jun 2014 17:27:38 +0000 (19:27 +0200)]
[KMS] Added new Linux KMS driver
thefiddler [Mon, 23 Jun 2014 20:22:04 +0000 (22:22 +0200)]
[KMS] Initial implementation
thefiddler [Tue, 15 Jul 2014 06:06:41 +0000 (06:06 +0000)]
Merge pull request #149 from thefiddler/mac_stability
[Mac] Improved stability for NSOpenGLPixelFormat
thefiddler [Mon, 14 Jul 2014 10:27:28 +0000 (12:27 +0200)]
[Mac] Improved stability for NSOpenGLPixelFormat
Non-accelerated contexts are now considered iff no accelerated contexts
are available. Additionally, a GraphicsException will be thrown if
context construction fails for any reason, instead of causing a runtime
crash.
thefiddler [Mon, 7 Jul 2014 11:41:04 +0000 (13:41 +0200)]
Merge pull request #147 from thefiddler/arrayfix
[Rewrite] Refactored string prologue/epilogues
thefiddler [Mon, 7 Jul 2014 11:16:17 +0000 (13:16 +0200)]
[Rewrite] Refactored string prologue/epilogues
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.
thefiddler [Mon, 23 Jun 2014 06:48:36 +0000 (08:48 +0200)]
Merge pull request #145 from Frassle/throw
Preserve stack trace in OutOfMemory exception
Fraser Waters [Sun, 22 Jun 2014 19:38:10 +0000 (20:38 +0100)]
Change to correct throw statement to preserve stack trace.
thefiddler [Fri, 20 Jun 2014 09:36:16 +0000 (11:36 +0200)]
[Docs] Updated readme for 1.1.3 release
thefiddler [Fri, 20 Jun 2014 09:35:54 +0000 (11:35 +0200)]
Merge pull request #140 from thefiddler/glspecs_june2014
[ES][GL] Sync with June 2014 specification
thefiddler [Fri, 20 Jun 2014 07:27:04 +0000 (09:27 +0200)]
Revert "[Convert] Workaround for broken names with spaces"
This reverts commit
1e78e62b906fd5fa9f10501ffd0543d4f3e3dc8d.
The relevant issue has been fixed upstream by Khronos.
thefiddler [Fri, 20 Jun 2014 06:45:03 +0000 (08:45 +0200)]
Merge pull request #141 from Frassle/marshal
Fixes bugs in String marshalling.
Fraser Waters [Thu, 19 Jun 2014 21:51:47 +0000 (22:51 +0100)]
Fixes bugs in String marshalling.
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.
thefiddler [Thu, 19 Jun 2014 14:24:49 +0000 (16:24 +0200)]
[ES][GL] Regenerated bindings
thefiddler [Thu, 19 Jun 2014 14:24:40 +0000 (16:24 +0200)]
[ES][GL] Synced with June 2014 specifications
This introduces support for the following extensions:
- EXT_geometry_point_size
- EXT_primitive_bounding_box
- EXT_texture_array
- EXT_tessellation_point_size
thefiddler [Thu, 19 Jun 2014 14:22:38 +0000 (16:22 +0200)]
[Convert] Workaround for broken names with spaces
thefiddler [Wed, 18 Jun 2014 08:26:06 +0000 (10:26 +0200)]
Merge pull request #138 from thefiddler/xi2exitfix
[X11] Fix hang when exiting XI2 input thread
thefiddler [Tue, 17 Jun 2014 07:06:05 +0000 (09:06 +0200)]
Merge pull request #135 from thefiddler/xquartz
XQuartz support (X11 on Mac)
thefiddler [Tue, 17 Jun 2014 07:05:29 +0000 (09:05 +0200)]
[X11] Send ClientMessage to exit input event loop
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
thefiddler [Tue, 17 Jun 2014 06:51:00 +0000 (08:51 +0200)]
[X11] Remove unused XCreateWindow overloads
thefiddler [Sun, 15 Jun 2014 12:32:43 +0000 (14:32 +0200)]
[X11] Construct X11 Factory first if enabled
This allows us to use X11 on Windows and Mac, if explicitly requested
by the user via `ToolkitOptions.Backend`.
thefiddler [Sun, 15 Jun 2014 12:30:40 +0000 (14:30 +0200)]
[X11] Added glXQueryVersion DllImport.
thefiddler [Sun, 15 Jun 2014 12:30:23 +0000 (14:30 +0200)]
[X11] Throw exception if GLX is not supported
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.
thefiddler [Sun, 15 Jun 2014 12:29:07 +0000 (14:29 +0200)]
[X11] Check before monitoring /dev/input
This avoids a crash on non-Linux systems that do not support /dev/input.
thefiddler [Sun, 15 Jun 2014 12:28:23 +0000 (14:28 +0200)]
[X11] Implement support for XQuartz (X11 on Mac)
thefiddler [Sun, 15 Jun 2014 12:24:44 +0000 (14:24 +0200)]
Merge branch 'xquartz' of https://github.com/thefiddler/opentk into xquartz
thefiddler [Wed, 11 Jun 2014 05:41:38 +0000 (07:41 +0200)]
Merge pull request #134 from thefiddler/scrollfix
[Mac][X11] Match win32 wheel coordinate system
thefiddler [Tue, 10 Jun 2014 15:43:31 +0000 (17:43 +0200)]
[Mac] Fix Mouse.GetState() h-wheel
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.
thefiddler [Tue, 10 Jun 2014 14:41:09 +0000 (16:41 +0200)]
[Mac] Add note for higher precision pixel scroll
thefiddler [Tue, 10 Jun 2014 14:40:44 +0000 (16:40 +0200)]
[Mac] Match win32 scrolling coordinates
thefiddler [Tue, 10 Jun 2014 12:53:23 +0000 (14:53 +0200)]
[X11] Match win32 wheel coordinate system
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
thefiddler [Sun, 8 Jun 2014 10:30:41 +0000 (12:30 +0200)]
Merge pull request #132 from thefiddler/fixbool2
Fix bool return types
thefiddler [Sun, 8 Jun 2014 07:58:01 +0000 (09:58 +0200)]
[ES][GL] Regenerated bindings
thefiddler [Sun, 8 Jun 2014 07:57:48 +0000 (09:57 +0200)]
[Bind] Fixed a System.FormatException
thefiddler [Sun, 8 Jun 2014 07:42:27 +0000 (09:42 +0200)]
[Rewrite] Implement byte -> bool marshalling
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.
thefiddler [Sun, 8 Jun 2014 07:40:30 +0000 (09:40 +0200)]
[Bind] Use byte for GLboolean return types
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.
thefiddler [Mon, 2 Jun 2014 12:47:43 +0000 (14:47 +0200)]
Merge pull request #127 from thefiddler/apitest
[AL][ES][GL] Add API compatibility test
thefiddler [Mon, 2 Jun 2014 11:03:30 +0000 (13:03 +0200)]
Merge pull request #128 from Frassle/half-fix
Fix a bug in single->half conversion.
Fraser Waters [Mon, 2 Jun 2014 10:16:43 +0000 (11:16 +0100)]
Fix a bug in single->half conversion.
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).
thefiddler [Sat, 31 May 2014 22:38:32 +0000 (00:38 +0200)]
[Test] Added API.Desktop to OpenTK.sln
thefiddler [Sat, 31 May 2014 22:10:21 +0000 (00:10 +0200)]
[Test] Added API compatibility test
This test checks every public API under OpenTK.Audio, OpenTK.Compute
and OpenTK.Graphics for compatibility. Incompatible changes will cause
a compilation failure.
thefiddler [Sat, 31 May 2014 13:54:20 +0000 (15:54 +0200)]
Merge pull request #126 from thefiddler/sdlversion
[SDL] Do not attempt to use versions < 2.0.0
thefiddler [Fri, 30 May 2014 11:50:11 +0000 (13:50 +0200)]
[SDL] Removed unnecessary if-branch
thefiddler [Fri, 30 May 2014 11:47:27 +0000 (13:47 +0200)]
[SDL] Do not attempt to use versions < 2.0.0
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.
thefiddler [Mon, 19 May 2014 08:36:15 +0000 (10:36 +0200)]
[X11] Added dllmap for Mac OS X (XQuartz)
thefiddler [Mon, 19 May 2014 23:11:41 +0000 (01:11 +0200)]
Merge pull request #125 from thefiddler/r112
Prepare for 1.1.2 release
thefiddler [Mon, 19 May 2014 23:00:54 +0000 (01:00 +0200)]
[Mac] Fixed NRE and initial position on 64bit
thefiddler [Mon, 19 May 2014 22:14:57 +0000 (00:14 +0200)]
[Mac] Added NSFloat implementation
thefiddler [Mon, 19 May 2014 21:14:41 +0000 (23:14 +0200)]
Merge pull request #123 from thefiddler/eglfix
[EGL] Fix initialization and extension loading
thefiddler [Mon, 19 May 2014 21:14:32 +0000 (23:14 +0200)]
Merge pull request #124 from thefiddler/xdestroyfix
[X11] Fixed BadWindow error on shutdown
thefiddler [Mon, 19 May 2014 21:11:25 +0000 (23:11 +0200)]
[Docs] Yet more formatting fixes
thefiddler [Mon, 19 May 2014 21:08:22 +0000 (23:08 +0200)]
[Docs] Minor formatting fixes
thefiddler [Mon, 19 May 2014 21:03:39 +0000 (23:03 +0200)]
[Graphics] Synced with May 2014 Khronos spec
thefiddler [Mon, 19 May 2014 21:01:29 +0000 (23:01 +0200)]
[Docs] Updated documentation for release
thefiddler [Mon, 19 May 2014 20:02:46 +0000 (22:02 +0200)]
[X11] Fixed BadWindow error on shutdown
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.
thefiddler [Mon, 19 May 2014 10:34:09 +0000 (12:34 +0200)]
Removed file committed by mistake
thefiddler [Mon, 19 May 2014 08:52:37 +0000 (10:52 +0200)]
Merge branch 'xkeyfix' of https://github.com/thefiddler/opentk into develop
thefiddler [Mon, 19 May 2014 07:22:27 +0000 (09:22 +0200)]
[X11] Improved WindowBorder.Fixed detection
This now works even without having to map the window first.
thefiddler [Mon, 19 May 2014 06:43:45 +0000 (08:43 +0200)]
Merge branch 'develop' of git://github.com/Goz3rr/opentk into pr/122
thefiddler [Mon, 19 May 2014 06:31:38 +0000 (08:31 +0200)]
[EGL] Fixed display connection
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
thefiddler [Sun, 18 May 2014 20:04:52 +0000 (22:04 +0200)]
[EGL] Egl.GetProcAddress only returns extensions
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
Goz3rr [Fri, 16 May 2014 22:27:38 +0000 (00:27 +0200)]
Made NativeWindow set WindowBorder to Fixed when created with FixedWindow flag like SDL windows
Goz3rr [Thu, 15 May 2014 09:52:55 +0000 (11:52 +0200)]
Changed TranslateFlags to actually translate flags instead of using switch
thefiddler [Thu, 15 May 2014 08:24:03 +0000 (10:24 +0200)]
[X11] Renamed XI2Mouse
This file now implements both mouse and keyboard input, so its name
has been updated to reflect that.
thefiddler [Thu, 15 May 2014 08:22:01 +0000 (10:22 +0200)]
[X11] Split X11 and XI2 input drivers
thefiddler [Thu, 15 May 2014 08:21:06 +0000 (10:21 +0200)]
[X11] Implemented XI2 keyboard input