platform/core/csapi/opentk.git
10 years ago[Mac] Implemented necessary CFString methods
thefiddler [Sun, 5 Jan 2014 01:42:33 +0000 (02:42 +0100)]
[Mac] Implemented necessary CFString methods

10 years ago[Mac] Construct JoystickDevice when joysticks are connected
thefiddler [Sat, 4 Jan 2014 23:47:40 +0000 (00:47 +0100)]
[Mac] Construct JoystickDevice when joysticks are connected

10 years ago[Input] Allow extending JoystickDevice<>
thefiddler [Sat, 4 Jan 2014 23:46:59 +0000 (00:46 +0100)]
[Input] Allow extending JoystickDevice<>

10 years ago[Mac] Only add callbacks for recognized USB HID devices
thefiddler [Sat, 4 Jan 2014 23:00:49 +0000 (00:00 +0100)]
[Mac] Only add callbacks for recognized USB HID devices

10 years ago[Mac] Implement device added/removed events for joysticks
thefiddler [Sat, 4 Jan 2014 22:58:59 +0000 (23:58 +0100)]
[Mac] Implement device added/removed events for joysticks

10 years ago[Mac] Add skeleton HID input implementation for joysticks
thefiddler [Sat, 4 Jan 2014 22:55:38 +0000 (23:55 +0100)]
[Mac] Add skeleton HID input implementation for joysticks

10 years agoMerge branch 'gamepad' into develop
thefiddler [Fri, 3 Jan 2014 01:23:02 +0000 (02:23 +0100)]
Merge branch 'gamepad' into develop

Conflicts:
Source/OpenTK/OpenTK.csproj

10 years ago[Graphics] Added missing documentation comment
thefiddler [Fri, 3 Jan 2014 01:18:28 +0000 (02:18 +0100)]
[Graphics] Added missing documentation comment

10 years ago[Input] Corrected malformed documentation comments
thefiddler [Fri, 3 Jan 2014 01:17:42 +0000 (02:17 +0100)]
[Input] Corrected malformed documentation comments

10 years ago[Input] Documented all public members
thefiddler [Fri, 3 Jan 2014 00:58:16 +0000 (01:58 +0100)]
[Input] Documented all public members

10 years ago[Input] Removed JoystickState.GetAxis(int) overload
thefiddler [Fri, 3 Jan 2014 00:58:08 +0000 (01:58 +0100)]
[Input] Removed JoystickState.GetAxis(int) overload

10 years ago[Input] Added SetVibration() API skeleton
thefiddler [Thu, 2 Jan 2014 18:52:00 +0000 (19:52 +0100)]
[Input] Added SetVibration() API skeleton

10 years ago[Input] GamePad and Joystick classes should be sealed
thefiddler [Thu, 2 Jan 2014 18:27:04 +0000 (19:27 +0100)]
[Input] GamePad and Joystick classes should be sealed

10 years ago[SDL2] Implemented PacketNumber property
thefiddler [Thu, 2 Jan 2014 18:24:38 +0000 (19:24 +0100)]
[SDL2] Implemented PacketNumber property

10 years ago[Input] Added PacketNumber property
thefiddler [Thu, 2 Jan 2014 18:24:15 +0000 (19:24 +0100)]
[Input] Added PacketNumber property

10 years ago[Input] Implemented GetState() and simplified GetCapabilities()
thefiddler [Thu, 2 Jan 2014 17:37:53 +0000 (18:37 +0100)]
[Input] Implemented GetState() and simplified GetCapabilities()

10 years ago[Input] Simplified configuration parser and added GetEnumerator()
thefiddler [Thu, 2 Jan 2014 17:37:20 +0000 (18:37 +0100)]
[Input] Simplified configuration parser and added GetEnumerator()

10 years ago[Input] Added internal Joystick.GetAxisRaw() method
thefiddler [Thu, 2 Jan 2014 17:36:27 +0000 (18:36 +0100)]
[Input] Added internal Joystick.GetAxisRaw() method

10 years ago[Input] Added Source and Target to GamePadConfigurationItem
thefiddler [Thu, 2 Jan 2014 17:36:09 +0000 (18:36 +0100)]
[Input] Added Source and Target to GamePadConfigurationItem

10 years ago[Input] Made configuration database non-static
thefiddler [Thu, 2 Jan 2014 01:42:51 +0000 (02:42 +0100)]
[Input] Made configuration database non-static

10 years ago[SDL2] Fixed SDL_JoystickGetGUID capitalization
thefiddler [Thu, 2 Jan 2014 01:20:51 +0000 (02:20 +0100)]
[SDL2] Fixed SDL_JoystickGetGUID capitalization

10 years ago[Input] Initialize JoystickDevice.Details in constructor
thefiddler [Thu, 2 Jan 2014 01:20:25 +0000 (02:20 +0100)]
[Input] Initialize JoystickDevice.Details in constructor

10 years ago[Input] Renamed GamePadMap to GamePadConfiguration
thefiddler [Thu, 2 Jan 2014 00:38:12 +0000 (01:38 +0100)]
[Input] Renamed GamePadMap to GamePadConfiguration

10 years ago[Input] Implemented IGamePadDriver.GetName()
thefiddler [Thu, 2 Jan 2014 00:34:21 +0000 (01:34 +0100)]
[Input] Implemented IGamePadDriver.GetName()

10 years ago[Input] Made the Name property public
thefiddler [Thu, 2 Jan 2014 00:33:57 +0000 (01:33 +0100)]
[Input] Made the Name property public

We can use the name property to implement a hypothetical
GamePad.GetName() method in the future.

10 years ago[Input] Added xml documentation for GamePadCapabilities
thefiddler [Thu, 2 Jan 2014 00:33:08 +0000 (01:33 +0100)]
[Input] Added xml documentation for GamePadCapabilities

10 years ago[Input] Implemented MappedGamePadDriver.GetCapabilities()
thefiddler [Thu, 2 Jan 2014 00:13:20 +0000 (01:13 +0100)]
[Input] Implemented MappedGamePadDriver.GetCapabilities()

10 years ago[Input] Added ability to parse SDL configuration db strings
thefiddler [Thu, 2 Jan 2014 00:07:21 +0000 (01:07 +0100)]
[Input] Added ability to parse SDL configuration db strings

10 years ago[Input] Added configuration db for GamePads
thefiddler [Thu, 2 Jan 2014 00:06:47 +0000 (01:06 +0100)]
[Input] Added configuration db for GamePads

The database is based on the SDL bindings found at
https://hg.libsdl.org/SDL/file/b744b3f8754b/src/joystick/SDL_gamecontrol
lerdb.h

10 years ago[Input] Added IJoystickDriver2.GetGuid() API
thefiddler [Tue, 31 Dec 2013 13:09:17 +0000 (14:09 +0100)]
[Input] Added IJoystickDriver2.GetGuid() API

10 years ago[SDL2] Added JoystickGetGUID method
thefiddler [Tue, 31 Dec 2013 13:08:28 +0000 (14:08 +0100)]
[SDL2] Added JoystickGetGUID method

10 years ago[SDL2] Add compile-time check for SDL2 GameController vs MappedGamePadDriver
thefiddler [Tue, 31 Dec 2013 10:46:40 +0000 (11:46 +0100)]
[SDL2] Add compile-time check for SDL2 GameController vs MappedGamePadDriver

10 years ago[Input] Removed unnecessary #region
thefiddler [Tue, 31 Dec 2013 00:02:07 +0000 (01:02 +0100)]
[Input] Removed unnecessary #region

10 years ago[Input] Renamed GamePadMapping to GamePadMap
thefiddler [Tue, 31 Dec 2013 00:01:52 +0000 (01:01 +0100)]
[Input] Renamed GamePadMapping to GamePadMap

10 years ago[SDL2] Fixed joystick/controller hotplugging support
thefiddler [Mon, 30 Dec 2013 16:22:45 +0000 (17:22 +0100)]
[SDL2] Fixed joystick/controller hotplugging support

10 years ago[SDL2] Fixed GameControllerButton to Buttons translation
thefiddler [Mon, 30 Dec 2013 16:15:49 +0000 (17:15 +0100)]
[SDL2] Fixed GameControllerButton to Buttons translation

10 years ago[SDL2] Fix issue where changes to mutable struct were lost
thefiddler [Mon, 30 Dec 2013 16:09:20 +0000 (17:09 +0100)]
[SDL2] Fix issue where changes to mutable struct were lost

10 years ago[SDL2] Explicitly enable joystick and gamepad events
thefiddler [Mon, 30 Dec 2013 16:08:42 +0000 (17:08 +0100)]
[SDL2] Explicitly enable joystick and gamepad events

10 years ago[Input] Buttons should have [Flags] attribute
thefiddler [Mon, 30 Dec 2013 15:07:06 +0000 (16:07 +0100)]
[Input] Buttons should have [Flags] attribute

10 years ago[SDL2] Fixed joystick hotplugging
Stefanos A. [Mon, 30 Dec 2013 14:24:48 +0000 (15:24 +0100)]
[SDL2] Fixed joystick hotplugging

SDL2 uses a weird system of device ids and instance ids to report
joystick events, where the ADDED event uses a device id and the rest use
instance ids.

The SDL2 joystick driver is now fixed to correctly distinguish between
the two, which fixes hotplugging support for joystick devices.

10 years ago[SDL2] Fixed mapping of instance ids to device ids
thefiddler [Mon, 30 Dec 2013 13:57:28 +0000 (14:57 +0100)]
[SDL2] Fixed mapping of instance ids to device ids

10 years ago[Input] Added missing closing brace in ToString() message
thefiddler [Mon, 30 Dec 2013 13:56:22 +0000 (14:56 +0100)]
[Input] Added missing closing brace in ToString() message

10 years ago[Input] Fixed incorrect variable name
thefiddler [Mon, 30 Dec 2013 12:49:26 +0000 (13:49 +0100)]
[Input] Fixed incorrect variable name

10 years ago[SDL] Use TranslateAxis() to decode ControllerAxisEvent
thefiddler [Mon, 30 Dec 2013 12:42:37 +0000 (13:42 +0100)]
[SDL] Use TranslateAxis() to decode ControllerAxisEvent

SDL GameControllerAxis and GamePadAxes are not interchangeable. The
driver will now correctly interpret incoming SDL messages and update
the GamePadState for the relevant axis.

10 years ago[Input] Fixed GamePadState.SetAxis() implementation
thefiddler [Mon, 30 Dec 2013 12:39:43 +0000 (13:39 +0100)]
[Input] Fixed GamePadState.SetAxis() implementation

GamePadState.SetAxis() receives a GamePadAxes enumeration, which is a
bitmask of the axes we wish to set. SetAxis now correctly decodes the
bitmask to apply the values we are interested in.

10 years ago[X11] Removed unused variable
thefiddler [Mon, 30 Dec 2013 09:25:17 +0000 (10:25 +0100)]
[X11] Removed unused variable

10 years ago[X11] Fixed current resolution detection.
thefiddler [Mon, 30 Dec 2013 08:23:33 +0000 (09:23 +0100)]
[X11] Fixed current resolution detection.

10 years agoMerge branch 'external' into develop
thefiddler [Sat, 28 Dec 2013 00:27:49 +0000 (01:27 +0100)]
Merge branch 'external' into develop

10 years ago[Build] Added new files to the relevant csproj scripts
thefiddler [Sat, 28 Dec 2013 00:23:39 +0000 (01:23 +0100)]
[Build] Added new files to the relevant csproj scripts

10 years ago[Examples] Added ExternalContext test
thefiddler [Sat, 28 Dec 2013 00:17:56 +0000 (01:17 +0100)]
[Examples] Added ExternalContext test

This test uses SDL2 to create a window and an OpenGL context. It then
uses OpenTK to render into the external SDL2 context. If everything is
working correctly, a black window should appear and gradually turn
white before disappearing.

10 years ago[Graphics] Improved support for external OpenGL contexts
thefiddler [Sat, 28 Dec 2013 00:14:59 +0000 (01:14 +0100)]
[Graphics] Improved support for external OpenGL contexts

When combining OpenTK with a third-party OpenGL toolkit, it is now
possible to implement a suitable GetAddress() and GetCurrentContext()
implementation in terms of the third-party toolkit. If no
implementation is specified, then OpenTK will try to guess the most
suitable implementation within its own platform backends.

If no custom implementation is defined, and if no suitable
implementation can be found, then OpenTK will throw a
PlatformNotSupportedException. If a suitable implementation is found or
defined, then OpenTK will attempt to load OpenGL entry points using
that implementation.

In this case third-party toolkit remains solely responsible for
managing its context via its MakeCurrent(), SwapBuffers(), etc
implementations.

10 years ago[Dummy] Improved thread-safety; added entry-point loader
thefiddler [Sat, 28 Dec 2013 00:09:59 +0000 (01:09 +0100)]
[Dummy] Improved thread-safety; added entry-point loader

DummyGLContext will now attempt to load OpenGL and OpenGL ES entry
points when a suitable OpenGL context is current on the calling thread.
This allows OpenTK to be used on contexts created through third-party
toolkits.

10 years ago[Platform] Added internal CreateGetAddress() function
thefiddler [Sat, 28 Dec 2013 00:08:24 +0000 (01:08 +0100)]
[Platform] Added internal CreateGetAddress() function

CreateGetAddress() constructs a GraphicsContext.GetAddressDelegate that
is suitable for the current platform. This can be used when combining
OpenTK with an OpenGL context created through a third-party toolkit.

10 years ago[Mac] Moved GetAddress implementation to its own class
thefiddler [Sat, 28 Dec 2013 00:06:33 +0000 (01:06 +0100)]
[Mac] Moved GetAddress implementation to its own class

The functions defined in libdl.dylib are useful in more places than
just AglContext. Moving them to their own class ensures we can access
these from wherever we might need them.

10 years ago[SDL2] Added missing [SuppressUnamangedCodeSecurity] attribute
thefiddler [Sat, 28 Dec 2013 00:04:46 +0000 (01:04 +0100)]
[SDL2] Added missing [SuppressUnamangedCodeSecurity] attribute

10 years ago[Mac] Use Cgl.GetCurrentContext instead of Agl
thefiddler [Sat, 28 Dec 2013 00:04:22 +0000 (01:04 +0100)]
[Mac] Use Cgl.GetCurrentContext instead of Agl

CGL appears to work with both AGL and NSOpenGL contexts, whereas AGL is
limited to AGL contexts. This allows us to be more flexible in terms of
implementation (i.e. we can use Cgl.GetCurrentContext to retrieve a
handle to a context created through SDL, which uses NSOpenGL
internally.)

10 years ago[X11] Improve GraphicsMode fallback (fixes issue #23)
thefiddler [Fri, 27 Dec 2013 12:01:21 +0000 (14:01 +0200)]
[X11] Improve GraphicsMode fallback (fixes issue #23)

When the user requests a GraphicsMode that is not directly supported
by the GPU/drivers, we should relax the requested parameters until
we find a supported mode. An exception should only be thrown when
there is no usable mode.

This makes the X11 backend match the behavior of Windows. The SDL/X11
backend works a little bit differently, in that it falls back to the
a default mode directly if the requested mode is not available. There
is nothing we can do about that.

10 years ago[X11] Fixed border size on Gnome 3
thefiddler [Fri, 27 Dec 2013 11:31:51 +0000 (13:31 +0200)]
[X11] Fixed border size on Gnome 3

The _NET_FRAME_EXTENTS atom is implemented differently by
different window managers, when window decorations are hidden
with Motif. Unity returns a 0 size, while Gnome 3 returns the
previous size.

This patch removes that ambiguity: when decorations are hidden,
border size becomes zero. This should work everywhere, unless
some window manager decides to troll us by decorating the window
when we explicitly request no decorations. Sigh...

10 years ago[Input] Do not crash with scancodes > 255
thefiddler [Fri, 27 Dec 2013 10:10:41 +0000 (11:10 +0100)]
[Input] Do not crash with scancodes > 255

10 years ago[X11] Allow resizing with fixed borders
thefiddler [Fri, 27 Dec 2013 10:07:38 +0000 (11:07 +0100)]
[X11] Allow resizing with fixed borders

Windows can now be resized programmatically, even when they have
WindowBorder.Fixed. All resizing logic is now consolidated in the
Bounds property, and ConfigureNotify messages are now handled
correctly depending on their source (StructureNotify or
SubStructureNotify.)

10 years agoImplemented X11 KeyDown/KeyUp events and reduced code duplication
thefiddler [Wed, 25 Dec 2013 10:46:02 +0000 (11:46 +0100)]
Implemented X11 KeyDown/KeyUp events and reduced code duplication

10 years agoDo not raise KeyPress for control characters
thefiddler [Wed, 25 Dec 2013 10:14:30 +0000 (11:14 +0100)]
Do not raise KeyPress for control characters

10 years agoIgnore *.pidb files from MonoDevelop 2.x
parallels [Wed, 25 Dec 2013 10:11:29 +0000 (11:11 +0100)]
Ignore *.pidb files from MonoDevelop 2.x

10 years agoIsButtonBind should check for buttons, not axes
thefiddler [Wed, 25 Dec 2013 00:47:27 +0000 (01:47 +0100)]
IsButtonBind should check for buttons, not axes

10 years agoImplemented SDL IJoystickDriver2 and IGamePadDriver
thefiddler [Tue, 24 Dec 2013 18:15:23 +0000 (19:15 +0100)]
Implemented SDL IJoystickDriver2 and IGamePadDriver

10 years agoAdded GameControllerGetBind APIs
thefiddler [Tue, 24 Dec 2013 18:14:54 +0000 (19:14 +0100)]
Added GameControllerGetBind APIs

10 years agoRemoved duplicate button types
thefiddler [Tue, 24 Dec 2013 18:14:35 +0000 (19:14 +0100)]
Removed duplicate button types

10 years agoMerge branch 'gamepad' of https://github.com/opentk/opentk into gamepad
thefiddler [Tue, 24 Dec 2013 16:18:20 +0000 (17:18 +0100)]
Merge branch 'gamepad' of https://github.com/opentk/opentk into gamepad

10 years agoUse IGamePadDriver through MappedGamePadDriver
thefiddler [Tue, 24 Dec 2013 16:16:16 +0000 (17:16 +0100)]
Use IGamePadDriver through MappedGamePadDriver

10 years agoImproved ToString implementation
Stefanos A [Tue, 24 Dec 2013 16:06:39 +0000 (17:06 +0100)]
Improved ToString implementation

10 years agoFixed WinMM offsets for IJoystickDevice2
Stefanos A [Tue, 24 Dec 2013 15:42:48 +0000 (16:42 +0100)]
Fixed WinMM offsets for IJoystickDevice2

10 years agoImproved WinMMJoystickDriver hotplugging behavior
Stefanos A [Tue, 24 Dec 2013 14:51:25 +0000 (15:51 +0100)]
Improved WinMMJoystickDriver hotplugging behavior

10 years agoAdded state output for OpenTK.Input.Joystick
Stefanos A [Tue, 24 Dec 2013 14:01:33 +0000 (15:01 +0100)]
Added state output for OpenTK.Input.Joystick

10 years agoImplemented structural equality
Stefanos A [Tue, 24 Dec 2013 14:01:10 +0000 (15:01 +0100)]
Implemented structural equality

10 years agoConnected XInput driver
Stefanos A [Tue, 24 Dec 2013 13:24:42 +0000 (14:24 +0100)]
Connected XInput driver

10 years agoWinMMJoystick implements IJoystickDriver2
Stefanos A [Tue, 24 Dec 2013 13:24:29 +0000 (14:24 +0100)]
WinMMJoystick implements IJoystickDriver2

WinMM is optimized for general joystick use, not for the canonical
GamePad layout. Instead of exposing IGamePadDriver directly, it should
expose IJoystickDriver2 and use a mapping driver to get GamePad support.

10 years agoAdded MappedGamePadDriver skeleton implementation
Stefanos A [Tue, 24 Dec 2013 13:22:03 +0000 (14:22 +0100)]
Added MappedGamePadDriver skeleton implementation

10 years agoImplements JoystickState and Capabilities setters
Stefanos A [Tue, 24 Dec 2013 13:21:37 +0000 (14:21 +0100)]
Implements JoystickState and Capabilities setters

10 years agoNo reason to comment out #region License
Stefanos A [Tue, 24 Dec 2013 11:52:57 +0000 (12:52 +0100)]
No reason to comment out #region License

10 years agoAdded internal GamePadMapping class
Stefanos A [Tue, 24 Dec 2013 11:48:15 +0000 (12:48 +0100)]
Added internal GamePadMapping class

10 years agoImplemented thumbsticks and trigger caps
Stefanos A [Tue, 24 Dec 2013 11:47:09 +0000 (12:47 +0100)]
Implemented thumbsticks and trigger caps

10 years agoAdded IJoystickDevice2 interface
Stefanos A [Tue, 24 Dec 2013 02:16:32 +0000 (03:16 +0100)]
Added IJoystickDevice2 interface

10 years agoImplemented initial XInput IGamePadDriver
Stefanos A [Tue, 24 Dec 2013 00:37:34 +0000 (01:37 +0100)]
Implemented initial XInput IGamePadDriver

10 years agoAdded missing left/right triggers
Stefanos A [Tue, 24 Dec 2013 00:36:44 +0000 (01:36 +0100)]
Added missing left/right triggers

10 years agoRemoved all instances of refresh_text
Stefanos A [Mon, 23 Dec 2013 23:15:43 +0000 (00:15 +0100)]
Removed all instances of refresh_text

10 years agoImplemented GamePad Capabilities and Type
Stefanos A [Mon, 23 Dec 2013 23:15:28 +0000 (00:15 +0100)]
Implemented GamePad Capabilities and Type

10 years agoRefresh text continuously
Stefanos A [Mon, 23 Dec 2013 21:00:10 +0000 (22:00 +0100)]
Refresh text continuously

10 years agoInitial implementation of GamePadTriggers
Stefanos A [Mon, 23 Dec 2013 19:30:58 +0000 (20:30 +0100)]
Initial implementation of GamePadTriggers

10 years agoEnabled HIDInput IGamePadDriver implementation
thefiddler [Mon, 23 Dec 2013 18:19:41 +0000 (19:19 +0100)]
Enabled HIDInput IGamePadDriver implementation

10 years agoImplemented GamePad API (WIP)
Stefanos A [Mon, 23 Dec 2013 00:50:25 +0000 (01:50 +0100)]
Implemented GamePad API (WIP)

10 years agoRemoved unnecessary IsButtonValid method
Stefanos A [Mon, 23 Dec 2013 00:50:13 +0000 (01:50 +0100)]
Removed unnecessary IsButtonValid method

10 years agoDisplay start button in ToString()
Stefanos A [Mon, 23 Dec 2013 00:49:49 +0000 (01:49 +0100)]
Display start button in ToString()

10 years agoFixed rendering of joysticks and gamepads
Stefanos A [Mon, 23 Dec 2013 00:29:12 +0000 (01:29 +0100)]
Fixed rendering of joysticks and gamepads

Joysticks and gamepad states would overlap, causing some lines to be
unreadable. This is now fixed.

10 years agoMore robust handling of device add/remove events
Stefanos A [Sun, 22 Dec 2013 23:17:13 +0000 (00:17 +0100)]
More robust handling of device add/remove events

10 years agoFixed expansion of joysticks collection
Stefanos A [Sun, 22 Dec 2013 22:55:46 +0000 (23:55 +0100)]
Fixed expansion of joysticks collection

10 years agoLog errors in subsystem initialization
Stefanos A [Sun, 22 Dec 2013 22:55:28 +0000 (23:55 +0100)]
Log errors in subsystem initialization

10 years agoReuse Sdl2Factory.InputDriver in Sdl2NativeWindow
Stefanos A [Sun, 22 Dec 2013 22:54:55 +0000 (23:54 +0100)]
Reuse Sdl2Factory.InputDriver in Sdl2NativeWindow

10 years agoDelay joystick initialization until necessary
Stefanos A [Sun, 22 Dec 2013 22:13:21 +0000 (23:13 +0100)]
Delay joystick initialization until necessary

10 years agoAdded SDL_InitSubSystem method
Stefanos A [Sun, 22 Dec 2013 22:12:53 +0000 (23:12 +0100)]
Added SDL_InitSubSystem method

10 years agoFixed x/y axis mixup.
Stefanos A [Sun, 22 Dec 2013 21:47:50 +0000 (22:47 +0100)]
Fixed x/y axis mixup.