platform/core/csapi/opentk.git
10 years ago[Audio] Don't crash when Alc.GetString() returns null
thefiddler [Sun, 12 Jan 2014 21:05:15 +0000 (22:05 +0100)]
[Audio] Don't crash when Alc.GetString() returns null

Alc.GetString() could crash if the unmanaged code returned null due to
any kind of failure. This is now fixed and better documented.

Additionally, the array overload for Alc.GetString() will now correctly
forward the ‘device’ parameter to unmanaged code.

10 years ago[OpenTK] Fixed Utilities.CreateSdl2WindowInfo
Stefanos A. [Fri, 10 Jan 2014 15:56:26 +0000 (16:56 +0100)]
[OpenTK] Fixed Utilities.CreateSdl2WindowInfo

Utilities.CreateSdl2WindowInfo should store the specified windowHandle
directly instead of trying to call SDL.SDL.CreateWindowFrom.

10 years ago[SDL2] Implemented GetWindowWMInfo
Stefanos A. [Fri, 10 Jan 2014 15:55:20 +0000 (16:55 +0100)]
[SDL2] Implemented GetWindowWMInfo

10 years ago[Win] More robust pixel format selection
Stefanos A. [Fri, 10 Jan 2014 14:41:57 +0000 (15:41 +0100)]
[Win] More robust pixel format selection

This patch adds more robust checks for WGL_ARB_pixel_format and
WGL_ARB_multisample before using the relevant extensions, and adds
checks whether Wgl.Arb.ChoosePixelFormat() returns a valid pixel format
before trying to use it (thanks to Repetier for catching this edge
case.)

Additionally, the ChoosePixelFormatPFD code-path now heavily penalizes
single-buffered modes when the user requests a double-buffered mode.

Affects issues #42 and #45

10 years ago[Win] More robust WGL extension detection
Stefanos A. [Fri, 10 Jan 2014 08:24:59 +0000 (09:24 +0100)]
[Win] More robust WGL extension detection

Affects issue #42 and issue #45

10 years ago[Mac] OpenGL 3.x/4.x require core profile flag
thefiddler [Thu, 9 Jan 2014 22:36:28 +0000 (23:36 +0100)]
[Mac] OpenGL 3.x/4.x require core profile flag

SDL will fail to construct an OpenGL 3.x/4.x context on Mac OS X,
unless ContextProfileFlags.CORE is specified.

Fixes issue #44

Upstream enhancement request at
https://bugzilla.libsdl.org/show_bug.cgi?id=2342

10 years ago[OpenTK] Do not raise *Frame events when time = 0
Stefanos A. [Wed, 8 Jan 2014 23:51:09 +0000 (00:51 +0100)]
[OpenTK] Do not raise *Frame events when time = 0

Affects issue #40

10 years agoMerge branch 'rdp' into develop
thefiddler [Wed, 8 Jan 2014 23:19:42 +0000 (00:19 +0100)]
Merge branch 'rdp' into develop

10 years ago[Win] Fix issue #35 (OpenTK over Remote Desktop)
Stefanos A. [Wed, 8 Jan 2014 23:14:25 +0000 (00:14 +0100)]
[Win] Fix issue #35 (OpenTK over Remote Desktop)

When running over remote desktop without hardware acceleration, there
are no GraphicsModes that support desktop composition. This patch adds
logic to avoid requesting composition-capable modes when running over
RDP.

Additionally, it changes the mode selection logic to consider modes that
support features partially (e.g. 16bpp color instead of 32bpp), albeit
with a heavy penalty over fully supported modes.

10 years ago[Win] Check registry keys before accessing
Stefanos A. [Wed, 8 Jan 2014 23:10:41 +0000 (00:10 +0100)]
[Win] Check registry keys before accessing

Fixes crashes when using OpenTK over the Remote Desktop Client for Mac
(version 2010).

10 years agoMerge pull request #38 from opentk/issue34
thefiddler [Wed, 8 Jan 2014 21:36:32 +0000 (13:36 -0800)]
Merge pull request #38 from opentk/issue34

Fix for issue #33 and issue #34

10 years ago[Win] Fix issue #33; fix issue #34
Stefanos A. [Wed, 8 Jan 2014 21:29:22 +0000 (22:29 +0100)]
[Win] Fix issue #33; fix issue #34

This patch adds a workaround for WM_STYLECHANGED messages that are not
delivered when running on Mono/Windows. If we detect Mono, then we call
HandleStyleChanged() directly in order to update the internal state of
our WinGLNative instance.

10 years ago[Win] Do not overload internal SetWindowLong
Stefanos A. [Wed, 8 Jan 2014 18:22:03 +0000 (19:22 +0100)]
[Win] Do not overload internal SetWindowLong

The internal function is now appended with "Internal".

10 years ago[Win] Do not unregister class twice
Stefanos A. [Wed, 8 Jan 2014 18:21:29 +0000 (19:21 +0100)]
[Win] Do not unregister class twice

Only the parent window would register a class, but both the parent and
the child window would unregister it. This is now fixed.

10 years ago[Win] Remove unnecessary #if clauses
Stefanos A. [Tue, 7 Jan 2014 23:45:42 +0000 (00:45 +0100)]
[Win] Remove unnecessary #if clauses

10 years ago[Win] Refactor huge wndproc into functions
Stefanos A. [Tue, 7 Jan 2014 23:02:27 +0000 (00:02 +0100)]
[Win] Refactor huge wndproc into functions

10 years agoMerge branch 'timing' into develop
thefiddler [Tue, 7 Jan 2014 21:19:22 +0000 (22:19 +0100)]
Merge branch 'timing' into develop

10 years ago[Examples] Added keys to modify timing
Stefanos A. [Tue, 7 Jan 2014 21:09:52 +0000 (22:09 +0100)]
[Examples] Added keys to modify timing

Use [ and ] to decrease and increase the UpdateFrame frequency.
Use < and > to decrease and increase the RenderFrame frequency.

10 years ago[OpenTK] Improved timing stability
Stefanos A. [Tue, 7 Jan 2014 21:09:02 +0000 (22:09 +0100)]
[OpenTK] Improved timing stability

OpenTK now directly calculates the elapsed time between UpdateFrame
(RenderFrame) events and compares that directly to TargetUpdatePeriod
(TargetRenderPeriod). This significantly simplifies the implementation
and improves timing stability.

10 years ago[OpenTK] Fixed Update/RenderTime calculation
Stefanos A. [Tue, 7 Jan 2014 14:55:11 +0000 (15:55 +0100)]
[OpenTK] Fixed Update/RenderTime calculation

These values should only be re-calculated when an Update/RenderFrame
event is raised. Otherwise, they should retain their previous values.

10 years ago[Examples] Improve timing information; add vsync toggle
thefiddler [Tue, 7 Jan 2014 08:12:35 +0000 (09:12 +0100)]
[Examples] Improve timing information; add vsync toggle

10 years ago[OpenTK] Corrected GameWindow.Update/RenderFrequency information
thefiddler [Tue, 7 Jan 2014 08:11:55 +0000 (09:11 +0100)]
[OpenTK] Corrected GameWindow.Update/RenderFrequency information

10 years ago[OpenTK] Implemented GameWindow.UpdateTime and RenderTime properties
thefiddler [Tue, 7 Jan 2014 08:09:43 +0000 (09:09 +0100)]
[OpenTK] Implemented GameWindow.UpdateTime and RenderTime properties

10 years ago[OpenTK] More robust timing for UpdateFrame and RenderFrame
thefiddler [Tue, 7 Jan 2014 07:52:02 +0000 (08:52 +0100)]
[OpenTK] More robust timing for UpdateFrame and RenderFrame

FrameEventArgs.Time should no longer drift from clock time measured
outside GameWindow.

10 years ago[Examples] Calculate timing information in GameWindowStates
thefiddler [Tue, 7 Jan 2014 00:01:00 +0000 (01:01 +0100)]
[Examples] Calculate timing information in GameWindowStates

10 years ago[Examples] Cleaned up input device printing in GameWindowStates
thefiddler [Mon, 6 Jan 2014 23:48:09 +0000 (00:48 +0100)]
[Examples] Cleaned up input device printing in GameWindowStates

10 years ago[OpenTK] Simplify and improve timing calculations
Stefanos A. [Mon, 6 Jan 2014 00:57:54 +0000 (01:57 +0100)]
[OpenTK] Simplify and improve timing calculations

This patch modifies GameWindow.Run() to use a single stopwatch instead
of two separate stopwatches for timing UpdateFrame and RenderFrame
events.

It improves timing accuracy for issue #20 (FrameEventArgs.Time
Inconsistencies)

10 years ago[Math] Added MathHelper.Clamp
Stefanos A. [Mon, 6 Jan 2014 00:52:08 +0000 (01:52 +0100)]
[Math] Added MathHelper.Clamp

10 years ago[Mac] Do not store *State structs directly
thefiddler [Sun, 5 Jan 2014 22:58:05 +0000 (23:58 +0100)]
[Mac] Do not store *State structs directly

Storing Mouse/KeyboardState structs directly makes updates more
difficult than they should be. It is simpler to create simple classes
instead.

10 years ago[Input] Added Keyboard/MouseState.SetIsConnected to mirror JoystickState
thefiddler [Sun, 5 Jan 2014 22:50:17 +0000 (23:50 +0100)]
[Input] Added Keyboard/MouseState.SetIsConnected to mirror JoystickState

10 years agoMerge branch 'mac_joystick' into develop
thefiddler [Sun, 5 Jan 2014 21:50:27 +0000 (22:50 +0100)]
Merge branch 'mac_joystick' into develop

10 years ago[Mac] Map GamePads, MultiAxisControllers and Wheels to joysticks
thefiddler [Sun, 5 Jan 2014 21:44:58 +0000 (22:44 +0100)]
[Mac] Map GamePads, MultiAxisControllers and Wheels to joysticks

10 years ago[Mac] Call DeviceRemoved() in Dispose() event
thefiddler [Sun, 5 Jan 2014 21:38:26 +0000 (22:38 +0100)]
[Mac] Call DeviceRemoved() in Dispose() event

The necessary cleanup code already exists in DeviceRemoved(). No need
to duplicate this in the Dispose() event.

10 years ago[Mac] Avoid IOHIDDeviceConformsTo call in DeviceRemoved handler
thefiddler [Sun, 5 Jan 2014 21:36:01 +0000 (22:36 +0100)]
[Mac] Avoid IOHIDDeviceConformsTo call in DeviceRemoved handler

DeviceAdded already checks that devices conform to the desired usage
pages. Checking again in DeviceRemoved is unnecessary - if a device
exists, then it has already passed muster.

10 years ago[Mac] Implement Joystick.GetGuid()
thefiddler [Sun, 5 Jan 2014 21:15:55 +0000 (22:15 +0100)]
[Mac] Implement Joystick.GetGuid()

10 years ago[Mac] Calculate joystick Guid for USB devices
thefiddler [Sun, 5 Jan 2014 21:06:19 +0000 (22:06 +0100)]
[Mac] Calculate joystick Guid for USB devices

10 years ago[Mac] Use out/ref parameters instead of unsafe pointers in bindings
thefiddler [Sun, 5 Jan 2014 21:05:54 +0000 (22:05 +0100)]
[Mac] Use out/ref parameters instead of unsafe pointers in bindings

10 years ago[Mac] Connect devices to first available index
thefiddler [Sun, 5 Jan 2014 20:53:28 +0000 (21:53 +0100)]
[Mac] Connect devices to first available index

10 years ago[Examples] Draw device index for Joysticks and GamePads
thefiddler [Sun, 5 Jan 2014 20:32:24 +0000 (21:32 +0100)]
[Examples] Draw device index for Joysticks and GamePads

10 years ago[Mac] Do not call CFRelease on HID properties
thefiddler [Sun, 5 Jan 2014 20:27:34 +0000 (21:27 +0100)]
[Mac] Do not call CFRelease on HID properties

HID properties are callee-owned and should not be released by the
caller. Fixes crash (memory corruption) on device hot plugging.

10 years ago[Mac] DllImport must be marked as extern
thefiddler [Sun, 5 Jan 2014 20:18:20 +0000 (21:18 +0100)]
[Mac] DllImport must be marked as extern

10 years ago[Mac] Correctly unschedule HIDManager from run loop
thefiddler [Sun, 5 Jan 2014 19:17:03 +0000 (20:17 +0100)]
[Mac] Correctly unschedule HIDManager from run loop

10 years ago[Mac] Don't let exceptions escape to unmanaged code
thefiddler [Sun, 5 Jan 2014 03:20:51 +0000 (04:20 +0100)]
[Mac] Don't let exceptions escape to unmanaged code

10 years ago[Mac] Fixed DllEntryPointNotFound crash on device unplugging
thefiddler [Sun, 5 Jan 2014 03:15:30 +0000 (04:15 +0100)]
[Mac] Fixed DllEntryPointNotFound crash on device unplugging

10 years ago[Mac] Implemented joystick buttons
thefiddler [Sun, 5 Jan 2014 03:11:11 +0000 (04:11 +0100)]
[Mac] Implemented joystick buttons

10 years ago[Mac] Implemented joystick axis movement
thefiddler [Sun, 5 Jan 2014 02:54:53 +0000 (03:54 +0100)]
[Mac] Implemented joystick axis movement

10 years ago[Input] Added JoystickAxis/Button.Last; added JoystickAxis.Axis10.
thefiddler [Sun, 5 Jan 2014 02:54:34 +0000 (03:54 +0100)]
[Input] Added JoystickAxis/Button.Last; added JoystickAxis.Axis10.

JoystickAxis/Button.Last is used internally to allocate the correct
amount of storage for joystick axes and buttons. JoystickAxis.Axis10 is
required to support the maximum number of axes available on Mac OS X.

10 years ago[Mac] Implemented joystick device detection
thefiddler [Sun, 5 Jan 2014 02:03:46 +0000 (03:03 +0100)]
[Mac] Implemented joystick device detection

10 years ago[Mac] Retrieve HID joystick name
thefiddler [Sun, 5 Jan 2014 01:42:47 +0000 (02:42 +0100)]
[Mac] Retrieve HID joystick name

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.