Commit graph

6695 commits

Author SHA1 Message Date
Fraser Waters
271fc3f235 Merge pull request #235 from looperhacks/patch-1
Fix links in Readme
2015-03-20 17:13:46 +00:00
Peter Jeschke
eca035b372 Fix links in Readme 2015-03-20 17:43:42 +01:00
Fraser Waters
95d6779705 Merge pull request #193 from Frassle/threadevents
[Platform] Throw exception if ProcessEvents isn't called on main thread.
2015-03-16 15:37:06 +00:00
Fraser Waters
282f1d1f5b Merge pull request #223 from Frassle/angle
[Math] Fix NaN issue in CalculateAngle
2015-03-16 15:35:51 +00:00
Fraser Waters
3efb4e303d Merge pull request #211 from cra0zy/unixgamepad
I was hoping someone else on the project had OSX access but that's looking unlikely. The changes look fairly benign so I'm just going to merge this in. Move fast and break things right :)
2015-03-16 15:35:16 +00:00
Fraser Waters
53981e3b65 Regenerate bindings 2015-03-01 19:04:43 +00:00
Fraser Waters
8c3a5503af Update License date 2015-03-01 19:00:05 +00:00
Fraser Waters
ab11fa4f6e Remove java/cpp code from binding generator 2015-03-01 18:59:21 +00:00
Fraser Waters
dc372a5bf1 Change url in binding generator help 2015-03-01 18:51:21 +00:00
Fraser Waters
7427f44bbe Ask for web auth if required
Ask for authentication to download private Khronos files.
2015-03-01 14:44:28 +00:00
Fraser Waters
d7c21bd3f5 Remove spec support from converter
Khronos stopped supporting .spec files in 2013. They're now over a year
old without support. As such it's not worth us continuing to support
them either.
2015-03-01 14:25:30 +00:00
Fraser Waters
75961e6895 [Math] Fix NaN issue in CalculateAngle
Clamp dot product between -1 and 1 so acos always has a valid input.
2015-02-21 10:55:39 +00:00
Fraser Waters
79fc848015 [Math] Vector3 Project and Unproject
Add methods to Vector3 to project to and from screen space.
2015-02-14 19:05:59 +00:00
Fraser Waters
7e903d6c0b Merge pull request #218 from roman-yagodin/patch-1
Clarify OpenTK.dll.config use for #217
2015-02-11 11:25:51 +00:00
Roman M. Yagodin
bbbe95a78d Clarify OpenTK.dll.config use for #217 2015-02-11 08:53:12 +03:00
marko
5953907f86 Allowed Mac and Linux to use GamePad. Added Name param to GamePad. Added Xbox 360 Wireless Joystick linux config to GamePadCongifurationDatabase. 2015-01-19 19:04:59 +01:00
Fraser Waters
2de9c0b907 Fix wrap around bug in XInput.
Fixes #209. 
Negating short.MinValue would cause a wrap around back to short.MinValue. 
This resulted in joystick inputs like 0.8, 0.9, -1.00031.
2015-01-09 12:50:50 +00:00
Fraser Waters
1ca084cf8a [Input] Add IsAnyKey/ButtonDown/Pressed to input state.
Adds properties to KeyboardState, MouseState, JoystickState and GamePadState
(GamePadButtons), to see if any key or button is down. This should be faster
than iterating over all the public IsDown properties as we can make use of the
internal bit fields.

GamePadButtons uses IsButtonPressed rather than IsButtonDown like the others as
it more closely matches it's current interface (no down methods).
2014-11-27 22:05:33 +01:00
Fraser Waters
a43181a802 Merge pull request #202 from Frassle/issue201
[Input] Legacy keyboard respects the KeyRepeat field.

Fixes #201.
2014-11-23 18:15:31 +01:00
Fraser Waters
e855d2eb33 [Input] Legacy keyboard respects the KeyRepeat field.
If the legacy keyboard device receives a key down event with IsRepeat set it
will only raise it's own key down event if it's KeyRepeat field is set to true.

This is as documented, regression casused by refactoring. Fixes issue #201.

Also change the GameWindowState example to show setting of KeyRepeat to true
and false and how that changes the event counts for the legacy and new keyboard
devices.
2014-11-23 14:40:36 +01:00
thefiddler
6deec73fc9 Merge pull request #197 from Frassle/color
Colorspace conversion functions.
2014-11-13 11:38:51 +01:00
Fraser Waters
c442a18d13 Add To/From HCY methods to Color4. 2014-11-12 19:52:15 +01:00
Fraser Waters
edcb0664b1 Add To/From YUV methods to Color4. 2014-11-12 19:52:15 +01:00
Fraser Waters
679419bb67 Add To/From XYZ methods to Color4. 2014-11-12 19:52:14 +01:00
Fraser Waters
072263f29d Add To/From HSV methods to Color4. 2014-11-12 19:52:14 +01:00
Fraser Waters
d09b32474b Add To/From HSL methods to Color4. 2014-11-12 19:52:14 +01:00
Fraser Waters
af924afef4 Add To/From sRGB methods to Color4. 2014-11-12 19:52:14 +01:00
thefiddler
d59ee5920e Merge pull request #194 from Frassle/getentryassembly
[X11] GetEntryAssembly may be null.
2014-11-12 17:59:07 +01:00
Fraser Waters
b9cc6fa861 [X11] GetEntryAssembly may be null.
When running under NUnit GetEntryAssembly returns null. In this case we instead
search through the AppDomain for an assembly that matches the AppDomain name.
2014-11-04 23:00:05 +01:00
Fraser Waters
516bcca8f3 Throw exception if ProcessEvents isn't called on main thread. 2014-11-03 23:41:19 +01:00
Fraser
f8af961d54 Merge pull request #190 from Frassle/warnings
[Issue #61] Fix warnings.
2014-11-03 14:58:35 +01:00
Fraser Waters
fe3a0df56a Add #pragma warning disable for unused field warnings.
Fixes warnings [#61] by disabling unused field warnings for two structures in
HidProtocol. These fields aren't currently used by OpenTK but the stuctures are
used in native marshalling so must match the documented structures perfectly.
2014-11-03 01:39:45 +01:00
Fraser Waters
41b684491d Remove unused fields/variables.
Fixes warnings [#61] by removing some unused variables and an unused field.
Field was private so no inheritance concerns.
2014-11-03 01:36:36 +01:00
Fraser Waters
2c178d54fd Remove unused field.
Fixes warnings [#61] by removing an unused field.
2014-11-03 01:35:49 +01:00
Fraser Waters
1002d4e33a Add XML documentation to matrix Add methods.
Fixes warnings [#61] about missing documentation on public members.
2014-11-03 01:33:27 +01:00
thefiddler
e520ef6175 Merge pull request #187 from Lazzu/develop
Added support for Euler angles in Quaternion structs
2014-10-13 18:24:14 +02:00
thefiddler
1f96bc87f4 Merge pull request #188 from xThaWolfx/patch-1
Update MouseEventArgs.cs
2014-10-13 18:19:11 +02:00
xThaWolfx
077bf0d65e Update MouseEventArgs.cs
The IsPressed field was never updated as the pressed parameter was never used.
2014-10-13 17:58:47 +02:00
Lasse Numminen
6c53ab6623 Added support for Euler angles in Quaternion and Quaterniond by adding proper vec3 and pitch-yaw-roll constructors, and also added similar static helper functions. I unit tested them locally and the results match to the calculator found from the bottom of this web page: http://www.euclideanspace.com/maths/geometry/rotations/conversions/eulerToQuaternion/index.htm 2014-10-12 21:37:26 +03:00
thefiddler
9a37b72002 Merge pull request #186 from thefiddler/al_notfound_fix
[AL] Fix runtime crash when OpenAL not available
2014-09-30 13:53:11 +02:00
thefiddler
9851a3bab9 [AL] Fix runtime crash when OpenAL not available
Issue reported at http://www.opentk.com/node/3805

We must not throw exceptions from a finalizer, as this leads to the
runtime forcibly taking down the application.
2014-09-29 23:37:40 +02:00
thefiddler
e06fc9fb0a Merge pull request #182 from thefiddler/win_inputcrash_fix
[Win] Avoid NRE in WinFactory.Dispose()
2014-09-23 10:21:25 +02:00
thefiddler
e621b21c88 [Win] Avoid NRE in WinFactory.Dispose()
WinFactory.Dispose() could crash with a NRE when the joystick driver has
not been initialized. Fixed by checking for null before disposing the
input driver.
2014-09-23 08:55:02 +02:00
thefiddler
7829fa66b7 [Examples] Removed test code committed by mistake 2014-09-22 13:52:20 +02:00
thefiddler
383cea7e82 [Mac] Fixed exception in HIDInput.Dispose()
HIDInput.Dispose() would remove elements from a DeviceCollection during
iteration. This results in an exception.

We are now using a plain for-loop instead.
2014-09-20 17:11:18 +02:00
thefiddler
747d86bafb [Common] Avoid GC in DeviceCollection
`DeviceCollection.GetEnumerator()` now returns a struct IEnumerable<T>
directly to avoid boxing.

Additionally, we can now use `DeviceCollection[int]` as a shortcut to
`FromIndex(int)`.
2014-09-20 17:10:05 +02:00
thefiddler
2b3a4c578a Merge pull request #181 from thefiddler/evdev
[Linux] Implement evdev joystick driver
2014-09-20 13:53:12 +02:00
thefiddler
a1c3950b8a Merge pull request #180 from thefiddler/mac_joystick
[Mac] Improve joystick driver
2014-09-20 13:53:08 +02:00
thefiddler
179c82387c [Linux] Fixed byteswapping in joystick Guid calculation 2014-09-18 01:20:21 +02:00
thefiddler
3bf29b074c [Input] Fixed debug display of Back gamepad button 2014-09-18 01:20:21 +02:00