Commit graph

6109 commits

Author SHA1 Message Date
thefiddler 67727d2e9b [Linux] Completed libinput keyboard driver implementation 2014-07-16 14:28:27 +02:00
thefiddler c5abbe8030 [Linux] Implemented libinput keyboard input 2014-07-16 14:28:27 +02:00
thefiddler 4a53a5511a [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.
2014-07-16 14:28:27 +02:00
thefiddler e7bd311fbd [Linux] Improve checks for TTY 2014-07-16 14:28:27 +02:00
thefiddler 9e73358dd7 [Linux] Implemented TTY and libinput keyboard drivers 2014-07-16 14:28:27 +02:00
thefiddler 97a539258b [Linux] Added stub TTY and libinput IKeyboardDriver2 2014-07-16 14:28:27 +02:00
thefiddler 9bc774f78c [KMS] Query GPUs lazily 2014-07-16 14:28:27 +02:00
thefiddler 69dbdb7d67 [KMS] Fixed Gbm.DestroyDevice entry point 2014-07-16 14:28:27 +02:00
thefiddler 452bafdbb1 [KMS] Fixed NRE in Toolkit.Init(); improved resource cleanup 2014-07-16 14:28:27 +02:00
thefiddler 753032b844 [KMS] Added DRM/GBM framebuffer implementation 2014-07-16 14:28:27 +02:00
thefiddler 19b34446bb [ES][GL] Print name when loading bindings (debug only) 2014-07-16 14:28:27 +02:00
thefiddler d8adf92feb [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.
2014-07-16 14:28:27 +02:00
thefiddler 5da5ac0fa7 [EGL] Egl.GetError() now returns ErrorCode 2014-07-16 14:28:27 +02:00
thefiddler f9d20b5e3e [KMS] Improved GBM surface format selection 2014-07-16 14:28:27 +02:00
thefiddler 6454822116 [KMS] Create window surface 2014-07-16 14:28:27 +02:00
thefiddler 6f6798de62 [KMS] Added new Linux KMS driver 2014-07-16 14:28:27 +02:00
thefiddler c3451530a6 [KMS] Initial implementation 2014-07-16 14:28:27 +02:00
thefiddler c1c6b4269b Merge pull request #149 from thefiddler/mac_stability
[Mac] Improved stability for NSOpenGLPixelFormat
2014-07-15 06:06:41 +00:00
thefiddler 32958ffcce [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.
2014-07-14 12:27:28 +02:00
thefiddler 022f74c814 Merge pull request #147 from thefiddler/arrayfix
[Rewrite] Refactored string prologue/epilogues
2014-07-07 13:41:04 +02:00
thefiddler c32bf4ec5d [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.
2014-07-07 13:16:17 +02:00
thefiddler c8a5bf5e32 Merge pull request #145 from Frassle/throw
Preserve stack trace in OutOfMemory exception
2014-06-23 08:48:36 +02:00
Fraser Waters 6dda84dc77 Change to correct throw statement to preserve stack trace. 2014-06-22 20:40:15 +01:00
thefiddler 381c34da0b [Docs] Updated readme for 1.1.3 release 2014-06-20 11:37:06 +02:00
thefiddler cb861446ab Merge pull request #140 from thefiddler/glspecs_june2014
[ES][GL] Sync with June 2014 specification
2014-06-20 11:35:54 +02:00
thefiddler 9659aad748 Revert "[Convert] Workaround for broken names with spaces"
This reverts commit 1e78e62b90.
The relevant issue has been fixed upstream by Khronos.
2014-06-20 09:27:22 +02:00
thefiddler 4acbc2268d Merge pull request #141 from Frassle/marshal
Fixes bugs in String marshalling.
2014-06-20 08:45:03 +02:00
Fraser Waters 22760a4032 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.
2014-06-19 22:51:47 +01:00
thefiddler 7629d45907 [ES][GL] Regenerated bindings 2014-06-19 16:24:49 +02:00
thefiddler 28746e85cc [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
2014-06-19 16:24:40 +02:00
thefiddler 1e78e62b90 [Convert] Workaround for broken names with spaces 2014-06-19 16:22:38 +02:00
thefiddler f0fd13a23e Merge pull request #138 from thefiddler/xi2exitfix
[X11] Fix hang when exiting XI2 input thread
2014-06-18 10:26:06 +02:00
thefiddler f889835dd5 Merge pull request #135 from thefiddler/xquartz
XQuartz support (X11 on Mac)
2014-06-17 09:06:05 +02:00
thefiddler ea5f1ad1e8 [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
2014-06-17 09:05:29 +02:00
thefiddler 7accefea3e [X11] Remove unused XCreateWindow overloads 2014-06-17 08:51:00 +02:00
thefiddler e39e4fbb37 [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`.
2014-06-15 14:32:43 +02:00
thefiddler 9d840e5969 [X11] Added glXQueryVersion DllImport. 2014-06-15 14:30:40 +02:00
thefiddler 9075129df0 [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.
2014-06-15 14:30:23 +02:00
thefiddler c657b3d11e [X11] Check before monitoring /dev/input
This avoids a crash on non-Linux systems that do not support /dev/input.
2014-06-15 14:29:07 +02:00
thefiddler 40f1668989 [X11] Implement support for XQuartz (X11 on Mac) 2014-06-15 14:28:23 +02:00
thefiddler ef0ebb0a64 Merge branch 'xquartz' of https://github.com/thefiddler/opentk into xquartz 2014-06-15 14:24:44 +02:00
thefiddler bc555efd03 Merge pull request #134 from thefiddler/scrollfix
[Mac][X11] Match win32 wheel coordinate system
2014-06-11 07:41:38 +02:00
thefiddler 8373782fad [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.
2014-06-10 17:43:31 +02:00
thefiddler 5e63c5fa5c [Mac] Add note for higher precision pixel scroll 2014-06-10 16:41:09 +02:00
thefiddler 2a4f634848 [Mac] Match win32 scrolling coordinates 2014-06-10 16:40:44 +02:00
thefiddler 525af589f1 [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
2014-06-10 14:53:23 +02:00
thefiddler b9e948580a Merge pull request #132 from thefiddler/fixbool2
Fix bool return types
2014-06-08 12:30:41 +02:00
thefiddler 829185a68b [ES][GL] Regenerated bindings 2014-06-08 09:58:01 +02:00
thefiddler c0f6d4bc79 [Bind] Fixed a System.FormatException 2014-06-08 09:57:48 +02:00
thefiddler c7c3e3b69b [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.
2014-06-08 09:52:25 +02:00