Commit graph

4848 commits

Author SHA1 Message Date
Stefanos A.
b57e58dc47 Implemented Sdl2GLControl
SDL2 still fails with "not an OpenGL window".
2013-09-30 20:47:29 +02:00
Stefanos A
5bb23585b9 Merge remote-tracking branch 'origin/master' into sdl2 2013-09-30 18:29:55 +02:00
Stefanos A.
ddd070579a Workaround for NRE on WinRawMouse driver
On some systems, the Windows Raw Input driver fails to find the name of
a mouse device, causing a NRE. Since the name is not vital information,
a dummy name is generated as a workaround.
2013-09-30 18:27:13 +02:00
thefiddler
071daff564 Merge branch 'sdl2' of https://github.com/thefiddler/opentk into sdl2 2013-09-30 14:43:06 +02:00
Stefanos A.
ea0c845eb0 Attempted to fix key modifier state
SDL2 does not report keydown and keyup events on modifiers keys until
you release them. Attempted to fix this using SDL_GetModifierState, but
this does not appear to work. Should hit upstream.
2013-09-30 14:20:33 +02:00
Stefanos A.
7fe73253a7 Renamed Sdl2InputBase 2013-09-30 14:19:10 +02:00
Stefanos A.
c53773f4ec Use scancodes for KeyboardDevice states
This resolves the issue where different layouts would return different
keys when pressing the same physical key. A new API must be introduced
for text input.
2013-09-30 13:51:31 +02:00
Stefanos A.
5e35411dd1 Fixed return values of keyboard functions
SDL_GetKeyFromScancode and SDL_GetScancodeFromKey should return a
SDL_Keycode or SDL_Scancode respectively, instead of void.
2013-09-30 13:49:53 +02:00
Stefanos A.
fc8b3810e9 Fixed documentation comment 2013-09-30 13:48:12 +02:00
Stefanos A.
2d19edf3fe Renamed Sdl2InputBase to Sdl2InputDriver
Sdl2InputDriver describes the role and function of this class more
accurately.
2013-09-30 13:13:02 +02:00
Stefanos A.
7cb3965e25 Made internal SDL2 API private 2013-09-30 12:22:51 +02:00
Stefanos A.
5a55cb5cca Implemented SDL2 mouse and keyboard drivers 2013-09-30 12:22:25 +02:00
thefiddler
778087fe3a Reduced icon resolution to 128x128 in order to avoid "out of memory" errors when building with Mono. 2013-09-30 11:09:14 +02:00
Stefanos A.
fcc9049d18 Added high-res icons to Example Browser
The Example Browser should now look better on high resolution screens.
2013-09-29 23:58:10 +02:00
Stefanos A.
cfdb5bc95a Free SDL surface after updating the window icon
The SDL surface is no longer needed and will cause a memory leak if not
freed. Additionally, the decoded BitmapData should not be unlocked until
after updating the window icon, as it may be moved by the GC otherwise.
2013-09-29 23:36:28 +02:00
Stefanos A.
420ec232f3 Fixed decoding of Icons
The rgba mask for decoding icon surfaces was incorrect. Icons should
appear as expected now.
2013-09-29 23:08:51 +02:00
Stefanos A.
6245ffe3ef Updated license information 2013-09-27 23:07:23 +02:00
Stefanos A.
2666125b24 Implemented WindowState, WindowBorder and Icon
SDL2 suffers many of the issues we encountered when implementing
OpenTK.Platform.Windows. Workarounds are now in place to make
WindowState changes behave reasonably.
2013-09-27 23:01:46 +02:00
Stefanos A.
b3ce99a086 Increased the text surface size
This is necessary for high-dpi monitors which render text at double
resolution.
2013-09-27 22:59:56 +02:00
Stefanos A.
56d7e4e564 Use OpenGL window flag and switch to "fake" fullscreen mode
The OpenGL flag is required when using SDL2 on Windows. Fake fullscreen
works much better on modern monitors and systems with multiple monitors.
2013-09-27 18:57:05 +02:00
Stefanos A.
5df5447ff9 Add debug message when context creation fails 2013-09-27 18:55:58 +02:00
Stefanos A.
3398902940 Use Wgl.Import.GetCurrentContext DllImport directly
Wgl is implemented using the regular DllImport + delegate approach, in
order to support extensions. The delegates have not been armed at this
point, so we need to use the DllImport directly.

The whole wgl API should be revisited (we are using only a tiny
portion.)
2013-09-27 18:55:38 +02:00
Stefanos A
0fdef8eb23 Merge remote-tracking branch 'origin/master' into sdl2 2013-09-27 15:20:45 +02:00
Stefanos A.
cf703aca62 Added app.manifest to OpenTK.Examples project
The file had been added to the source tree, but was missing from the
OpenTK.Examples project configuration, causing hi-dpi mode to fail on
the examples window.
2013-09-27 15:19:21 +02:00
thefiddler
ac64ba3586 Merge branch 'master' of https://github.com/thefiddler/opentk into sdl2 2013-09-27 15:12:15 +02:00
Stefanos A.
4a4fbbd2c9 Updated .gitignore
Documentation/Source contains hundreds of intermediate files generated
by doxygen.
2013-09-27 14:51:05 +02:00
thefiddler
6d0b5eb49f Implemented SDL2 platform using sdl2-cs
This is a new platform that can be used then sdl2 is installed on the target system. SDL2 is commercially supported by Valve and provides better support for MacOS compared to our current implementation (Cocoa vs Carbon). It will also help us introduce faster support for new platforms. Existing platforms remain as a fallback and will be automatically used if sdl2 is not installed.

Please note that this is still a work in progress. The new mouse and keyboard API is not supported yet. Due to limitations of sdl2, multiple mice/keyboards are also not supported.
2013-09-27 14:41:37 +02:00
thefiddler
89845d5ff9 Integrated sdl2-cs bindings for sdl2
This is using the sdl2/pure branch of https://github.com/thefiddler/SDL2-CS.git which contains the SDL2 bindings without MiniTK.
2013-09-27 14:33:52 +02:00
thefiddler
3989b94e68 Merge commit 'ed45dddb98c8250a33505c953b6c60bf7a854ffb' as 'Source/OpenTK/Platform/SDL2/sdl2-cs' 2013-09-27 14:26:50 +02:00
thefiddler
ed45dddb98 Squashed 'Source/OpenTK/Platform/SDL2/sdl2-cs/' content from commit b434bac
git-subtree-dir: Source/OpenTK/Platform/SDL2/sdl2-cs
git-subtree-split: b434bacba859a036b11ec3ac76c3baa058764769
2013-09-27 14:26:50 +02:00
thefiddler
77d124d7e8 Made OpenTK.Examples high-dpi aware
Added application manifest with the necessary key to mark
OpenTK.Examples as high-dpi aware. This improves application
appearance when DPI scaling is enabled.
2013-09-26 01:38:27 +02:00
thefiddler
2e1bcaf280 Added support for high-dpi mode on Windows.
The platform factory for windows now calls SetProcessDPIAware
in order to enable support for high-dpi modes. The relevant
DllImport has been added to API.cs
2013-09-26 01:35:59 +02:00
thefiddler
c7e04c6097 Merge remote-tracking branch 'andy/master' 2013-09-26 01:28:58 +02:00
Andy Korth
23362a0d73 Merge pull request #20 from NeilWhite/MatrixRangeFix
Fix for setting Matrix/Vector values by Index
2013-09-24 08:07:37 -07:00
Neil White
fc1a8e022b Fix for setting Matrix/Vector values by Index
Many Matrix*/Vector* implementations were throwing
IndexOutOfBoundsException when you tried to set their values via their
indexer due to a missing else statement.
2013-09-24 15:46:34 +01:00
Andy Korth
7961997abe Merge pull request #19 from jeske/fix
fix MacOS bug mapping modifier keys to the scancode array
2013-08-11 20:45:11 -07:00
David Jeske
cce40d60b0 fix MacOS bug mapping modifier keys to the scancode array 2013-08-10 19:50:05 -07:00
Andy Korth
2b7d02bb61 Merge pull request #17 from jeske/master
added support for smooth trackpad scrolling on macos
2013-08-09 23:45:56 -07:00
David Jeske
2c29df6296 added support for smooth trackpad scrolling on macos 2013-08-09 23:20:49 -07:00
Andy Korth
5037836c08 Merge pull request #15 from GoldBlockGames/master
Implemented Quaternion.FromMatrix
2013-07-18 14:06:45 -07:00
Robert Rouhani
5c66266933 Added Quaterniond version of FromMatrix 2013-07-18 13:14:30 -07:00
Robert Rouhani
d479e3768b Added Quaternion.FromMatrix
Added a Diagonal and Trace property to all matrices
Added missing doc comments in the matrix classes to reduce the number of compiler warnings
2013-07-18 12:58:43 -07:00
Andy Korth
f38e717601 Fix for github issue 13, terrible crash on Keyboard GetState 2013-06-04 16:02:37 -05:00
Andy Korth
cd66bfaf37 Merge pull request #12 from zastrowm/patch-1
Remove lambdas from WinRawMouse.ProcessMouseEvents
2013-04-26 22:17:26 -07:00
zastrowm
e7ba5e789f Update whitespace issues to conform to the rest of the document 2013-04-26 21:09:12 -05:00
zastrowm
5f336dd9f9 Change WinRawMouse.ProcessMouseEvents to call code directly instead of using lambdas
Change WinRawMouse.ProcessMouseEvents to call code directly instead of using lambdas.  The lambdas caused memory allocations and were unneeded
2013-04-26 21:06:08 -05:00
Andy Korth
29c7d96420 Merge pull request #10 from Artfunkel/master
Matrix ExtractScale() bug fix and "Clear" methods
2013-04-15 07:52:49 -07:00
Tom Edwards
b38c81a458 Added Matrix clearing methods
- Added ClearTranslation(), ClearScale(), ClearRotation() and
ClearProjection()
- Added ExtractProjection() to Matrix4
- Fixed ExtractScale() giving incorrect results if a Matrix4 contained
projection data
- Added setters to Matrix4d's Column properties
2013-04-11 22:23:43 +01:00
Andy Korth
2185ba4744 Readme cleanup, add some resources and links 2013-03-22 16:48:13 -05:00
Dean Ellis
9a39949249 Merge pull request #1 from elisee/fix-client-rectangle-setter
Fix ClientRectangle setter on Windows (WinGL) & Linux (X11)
2013-03-22 16:29:36 -05:00