thefiddler
5b529647c9
[Mac] Fixed NRE and initial position on 64bit
2014-05-20 01:00:54 +02:00
thefiddler
c65e2a4d9e
[Mac] Added NSFloat implementation
2014-05-20 00:14:57 +02:00
thefiddler
ea0ab3243e
Merge pull request #123 from thefiddler/eglfix
...
[EGL] Fix initialization and extension loading
2014-05-19 23:14:41 +02:00
thefiddler
a6bdd2840c
[Graphics] Synced with May 2014 Khronos spec
2014-05-19 23:03:39 +02:00
thefiddler
ec31675fc8
[X11] Fixed BadWindow error on shutdown
...
This was caused by calling XDestroyWindow inside Dispose(), or
by processing events after calling XDestroyWindow. Pending events
are now discarded when Close() is called and not cancelled, and
XDestroyWindow is only called if the window exists.
2014-05-19 22:02:46 +02:00
thefiddler
fd3ac1e4cc
Removed file committed by mistake
2014-05-19 12:34:09 +02:00
thefiddler
ade8e61625
Merge branch 'xkeyfix' of https://github.com/thefiddler/opentk into develop
2014-05-19 10:52:37 +02:00
thefiddler
cfb2d45b8b
[X11] Improved WindowBorder.Fixed detection
...
This now works even without having to map the window first.
2014-05-19 09:22:27 +02:00
thefiddler
d6426f20bd
Merge branch 'develop' of git://github.com/Goz3rr/opentk into pr/122
2014-05-19 08:43:45 +02:00
thefiddler
d483b01de0
[EGL] Fixed display connection
...
We now use the display connection specified in EglWindowInfo
throughout the EGL backend, instead of opening new connections
in EglGraphicsMode. This fixes EGL errors in
Egl.CreateWindowSurface.
As part of this fix, all instances of
IPlatformFactory.CreateGraphicsMode() have been removed. This
API is no longer used in OpenTK 1.1
2014-05-19 08:31:38 +02:00
thefiddler
97b211a101
[EGL] Egl.GetProcAddress only returns extensions
...
We have to load statically exported entry points using the regular OS
symbol loading facilities, and only use eglGetProcAddress for
extensions.
Fixes crash in https://github.com/mono/MonoGame/pull/2377
2014-05-18 22:04:52 +02:00
Goz3rr
0c348d2429
Made NativeWindow set WindowBorder to Fixed when created with FixedWindow flag like SDL windows
2014-05-17 00:27:38 +02:00
Goz3rr
399e08ee33
Changed TranslateFlags to actually translate flags instead of using switch
2014-05-15 11:52:55 +02:00
thefiddler
4ede3ad2d0
[X11] Renamed XI2Mouse
...
This file now implements both mouse and keyboard input, so its name
has been updated to reflect that.
2014-05-15 10:24:03 +02:00
thefiddler
b4f4be7ece
[X11] Split X11 and XI2 input drivers
2014-05-15 10:22:01 +02:00
thefiddler
7d1bec58cc
[X11] Implemented XI2 keyboard input
2014-05-15 10:21:06 +02:00
thefiddler
2eb88d9788
[X11] Added XIDeviceType enumeration
2014-05-15 10:20:23 +02:00
thefiddler
692c4c64ff
[X11] Rebased on develop branch
2014-05-15 01:16:28 +02:00
thefiddler
7cce215a4b
[X11] Use XKB for layout-independent input
...
The code will fall back to core X11 if XKB is not available.
2014-05-15 01:13:12 +02:00
thefiddler
e8176ef7cf
[X11] Added XKB bindings
2014-05-15 01:12:06 +02:00
thefiddler
687fc90c95
Merge pull request #120 from thefiddler/xcursorfix
...
[X11] Improve mouse input
2014-05-15 00:43:38 +02:00
Goz3rr
4414886832
Added GameWindowFlags.FixedWindow to allow for fixed border SDL Windows
2014-05-15 00:38:06 +02:00
thefiddler
1419c1e3a0
[Mac] Explicitly retain/release CocoaWindowInfo instances
2014-05-14 18:01:08 +02:00
thefiddler
1690cf859e
[X11] Removed unused SetCursor() function
2014-05-14 00:42:05 +02:00
thefiddler
a062d4c0a7
[X11] Removed stale comment
2014-05-14 00:00:13 +02:00
thefiddler
30d7780f1e
[X11] Removed unused warp detection code
2014-05-13 23:51:55 +02:00
thefiddler
dd16142a3a
[X11] Fixed GetCursorState() after SetPosition()
...
The new position is now immediately reflected in GetCursorPos().
2014-05-13 23:50:39 +02:00
thefiddler
452d61bc60
[X11] Warn when XI2Mouse is not supported.
...
Without the XI2 extension, mouse support will suffer significantly.
More specifically, low-level mouse events will not be available.
2014-05-13 23:34:27 +02:00
thefiddler
3febb4dda0
[Input] Renamed MouseScrollWheel to MouseScroll
...
This better describes the functionality of this structure.
2014-05-13 23:25:56 +02:00
thefiddler
c6dafbccba
[X11] Implemented high-resolution scroll events
2014-05-13 23:23:51 +02:00
thefiddler
9255fdcdb4
[Platform] Fixed OnMouseDown/Up events for secondary buttons
2014-05-13 22:53:47 +02:00
thefiddler
a30af547f9
[X11] Improved CursorVisible = false behavior
...
We now use an XGrabPointer to confine the cursor to the window,
instead of the XWarpPointer hack. Fixes issue #28 and #36 .
2014-05-13 22:31:45 +02:00
thefiddler
7e3b99c636
[X11] Fixed cursor position when CursorVisible becomes true
2014-05-13 13:23:20 +02:00
thefiddler
fc718026fd
[X11] Fixed Cursor when CursorVisible = false
...
Setting Cursor will no longer override CursorVisible.
2014-05-13 09:27:21 +02:00
thefiddler
290cc91275
Merge branch 'nulldisplay' into develop
2014-05-12 17:01:01 +02:00
thefiddler
c2bd8624b5
Merge branch 'nvidiafix' into develop
2014-05-12 17:00:42 +02:00
thefiddler
50b611ec5f
Merge branch 'arrayfix' into develop
2014-05-12 17:00:16 +02:00
thefiddler
bb01f35de9
[Rewrite] Removed unused conditional.
2014-05-12 16:35:48 +02:00
thefiddler
c0b0990687
[OpenTK] Do not crash when no monitor connected
...
NativeWindow now checks for a non-null device before attempting to
access its properties. Affects
https://github.com/mono/MonoGame/issues/2416
2014-05-12 16:27:39 +02:00
thefiddler
4e8786f123
[X11] Correct Glx.*.SwapInterval definitions
...
Improved error checking means we are no longer crashing when
SwapInterval is not available.
2014-05-12 14:50:03 +02:00
thefiddler
88905cb6aa
[X11] Fixed GLX extension loading
...
GLX is now using the new extension loading mechanism,
and the entry point names now much the available slots.
2014-05-12 13:59:48 +02:00
thefiddler
3a94d8147f
[Rewrite] Fixed 2d/3d arrays on .Net
...
Mono can use ldlen and ldelema on both 1d arrays (vectors) and 2d/3d
arrays. However, .Net can only use these instructions on 1d arrays -
higher rank arrays must use get_Length and Address explicitly.
2014-05-12 13:03:27 +02:00
thefiddler
bd712e4775
[X11] Flush XSendEvent on exit
2014-05-12 02:20:53 +02:00
thefiddler
1cf7386748
[X11] Fixed XI2Mouse smooth scrolling
...
The scrolling valuator offsets are now calculated correctly, based on
the number of set bits in the valuator mask.
Additionally XI2Mouse now runs on a background thread, using blocking
XIfEvent. This should improve resonsiveness and reduce CPU usage, due
to reduced polling.
2014-05-12 02:20:53 +02:00
thefiddler
bba9c8c26f
[X11] Improved XI2Mouse implementation
...
Horizontal and vertical smooth scrolling is now supported.
Movement axes are now correctly identified. Device hotplugging
has been improved.
2014-05-12 02:20:53 +02:00
thefiddler
2b16a641f0
[Examples] Improved Mouse.GetState output
2014-05-12 02:20:53 +02:00
thefiddler
96aaef9b37
[Mac] Implemented Mouse.GetCursorState()
2014-05-12 02:20:53 +02:00
thefiddler
b89c920f32
[Examples] Test Mouse.SetPosition
2014-05-12 02:20:52 +02:00
thefiddler
7eefb3e3ff
[SDL] Use h-wheel events
2014-05-12 02:20:52 +02:00
thefiddler
bb8dfe4304
[Input] Improve SDL2 and Windows GetCursorState
2014-05-12 02:20:52 +02:00
thefiddler
f4a3cab0e0
[Input] Added Mouse.GetCursorPos() (WIP)
2014-05-12 02:20:52 +02:00
thefiddler
cd7342b688
Merge pull request #114 from thefiddler/nativewindow
...
INativeWindow cleanup and consolidation
2014-05-12 02:20:29 +02:00
thefiddler
0e48ad30d0
[Examples] Fixed Scroll.X/Y misreporting
...
Scroll.X and Y are no longer swapped.
2014-05-10 01:52:06 +02:00
thefiddler
d7e0373852
[Platform] Fixed keys getting stuck on focus loss
...
NativeWindowBase will now clear all keyboard keys when losing focus.
This prevents keys from getting stuck when refocusing the window.
[Win] Also fixed WindowState.Maximized when WindowBorder is Hidden and
the window is minimized.
2014-05-09 16:45:45 +02:00
thefiddler
4556e54405
[Win] Fixed infinite recursion
2014-05-09 16:14:13 +02:00
thefiddler
fb034de00d
[Graphics] Made entry points internal
...
Internal protected means internal *or* protected, not internal *and*
protected.
2014-05-09 15:24:12 +02:00
thefiddler
c98b4ea178
[Input] Do not hook FocusedChanged
...
This is handled by NativeWindowBase now.
2014-05-09 15:23:39 +02:00
thefiddler
8eae337d93
[Win] Cleaned up window size/pos properties
2014-05-09 15:22:33 +02:00
thefiddler
f0d0f6e53a
[X11] Fixed WindowBorder and WindowState setters
...
After many hours of fighting with xlib, the monster is slain and
WindowBorder/WindowState changes now take effect without messing
up the window size or position on the desktop.
Phew!
2014-05-09 13:10:23 +02:00
thefiddler
ab29797079
[Platform] Raise KeyUp events on focus lost
...
This ensures that no keys are stuck in pressed state when the user
switches away from the application window.
2014-05-09 01:50:48 +02:00
thefiddler
86146f54d5
[X11] Fixed key repeat
2014-05-09 00:26:51 +02:00
thefiddler
8195800ee7
[X11] Improved vsync support
...
OpenTK will now check for GLX_EXT_swap_control, GLX_MESA_swap_control
and GLX_SGI_swap_control. This allows us to control vsync on more
systems.
2014-05-09 00:13:23 +02:00
thefiddler
d430b462fe
[X11] Corrected size events
2014-05-08 20:58:11 +02:00
Dave Leaver
81bf3e6f7f
Correct spelling in INativeWindow
2014-05-08 10:21:27 +12:00
thefiddler
bfaff0bd66
[GL] Added generic RenderbufferStorage depth-stencil formats
...
According to the OpenGL 4.4 specification, RenderbufferStorage accepts
both generic and sized depth-stencil formats (DepthComponent and
DepthStencil). See sections 9.2.4, 9.2.5 and 9.4.
2014-05-07 23:21:24 +02:00
thefiddler
e3fd9e1374
[SDL] Avoid CursorVisible = true cursor jump
2014-05-06 09:36:30 +02:00
thefiddler
a270b9328e
[SDL] Report mouse in client coordinates
2014-05-06 09:31:35 +02:00
thefiddler
7e86d349d2
[Examples] Test MouseCursor in GameWindowStates
2014-05-06 09:12:08 +02:00
thefiddler
b1f627893b
[Mac] Fixed PointTo* calculations
...
On HiDPI displays, the client rectangle is using a pixel-based
coordinate system, while the screen is using a point-based coordinate
system. PointToClient/PointToScreen now correctly accounts for that.
2014-05-06 09:03:13 +02:00
thefiddler
cd315a3bd6
[Platform] Forward PointToScreen to backend
2014-05-06 09:02:09 +02:00
thefiddler
637a8bee66
[Platform] More selective mouse events
...
We should not raise mouse events when the cursor state hasn’t changed.
2014-05-06 09:01:23 +02:00
thefiddler
3408523e27
[Examples] Added PointToClient test
2014-05-06 09:00:42 +02:00
thefiddler
52efa3b629
[SDL] Improved documentation of Event size hack
2014-05-05 15:11:01 +02:00
Stefanos A
dffabcb94a
[SDL] Fixed a stack corruption issue on win32
2014-05-05 12:46:48 +02:00
thefiddler
41276361fb
[Mac] Report KeyDown/Up events for modifier flags
2014-05-05 09:14:14 +02:00
thefiddler
2e9ff4d8b9
[Examples] Print KeyboardState
2014-05-05 00:56:19 +02:00
thefiddler
b53d4a6554
[Examples] Test key events for consistency
2014-05-05 00:43:58 +02:00
thefiddler
8b7d5bc7e4
[Input] Implement key repeat
2014-05-05 00:43:45 +02:00
thefiddler
d968281a1b
[OpenTK] Refactor keyboard and mouse handling
...
A lot of duplicated code is now moved to NativeWindowBase and
LegacyInputDriver.
2014-05-04 17:05:08 +02:00
thefiddler
e155d647de
[X11] Added X11KeyMap.TranslateButton()
...
This code was duplicated on four different places before.
2014-05-04 17:04:03 +02:00
thefiddler
28a1849a72
[Mac] Moved MacOSKeys to MacOS namespace
...
They are used by both Carbon and Cocoa, so there is little reason to
keep them in MacOS.Carbon
2014-05-04 17:02:37 +02:00
thefiddler
2d5afcf0e8
[Input] Update state through HandleKey* events
2014-05-04 17:02:00 +02:00
thefiddler
268e8fccde
[Input] Removed pointless unsafe region
2014-05-04 17:01:34 +02:00
thefiddler
1096a8802a
[Input] Removed pointless ValuePrecise setter
2014-05-04 16:58:59 +02:00
thefiddler
7af710f4dd
[Input] Removed pointless MouseDevice.SetState
...
MouseDevice state should only be modified through its HandleMouse*
methods, not directly.
2014-05-04 16:58:24 +02:00
thefiddler
4b115c443b
[Mac] Add horizontal scrolling
2014-05-04 15:24:02 +02:00
thefiddler
30c73e8ead
[OpenTK] Raise NativeWindow.Mouse* events
2014-05-04 15:23:40 +02:00
thefiddler
9dab96c5c1
[Mac] Disable momentum scrolling and key pop-ups
...
We might wish to add an option to re-enable momentum scrolling, as this
might be useful to some applications for a more native feel.
2014-05-04 15:23:24 +02:00
thefiddler
15f5abe1e1
[Platform] Remove lambdas
2014-05-04 08:34:13 +02:00
thefiddler
1457e44309
[Examples] Hook both MouseDevice and Mouse events
...
They should give identical results.
2014-05-04 08:33:51 +02:00
thefiddler
67359a5d90
[Input] MouseDevice is now based on MouseState
...
This way we have a single state representation (MouseState), shared by
all mouse APIs and events.
2014-05-04 08:33:20 +02:00
thefiddler
e093fd23f6
[Mac] Avoid calling into LegacyInputDriver
2014-05-04 08:32:26 +02:00
thefiddler
ff46455e56
[X11] Removed legacy X11Input driver
...
Its functionality has been moved directly into X11GLNative and
X11KeyMap.
2014-05-04 08:32:08 +02:00
thefiddler
39eb3b1892
[Input] Improved MouseState.ToString()
2014-05-04 08:31:11 +02:00
thefiddler
94fdf1881c
[Platform] Improved mouse interface
...
- The complete mouse state is now available in mouse events
- Horizontal wheels are now supported
- MouseState now takes up less memory and has a simpler internal
implementation.
2014-05-04 01:29:55 +02:00
thefiddler
e85377c350
[Platform] Added support for horizontal wheel
2014-05-03 16:47:03 +02:00
thefiddler
842c0499b9
[SDL] Corrected SDL_Mouse* event structs
2014-05-02 17:39:00 +02:00
thefiddler
3e33ac9280
[Platform] Refactored INativeWindow backends
...
All INativeWindow implementations are now derived from
NativeWindowBase. They no longer implement legacy IInputDriver
themselves, but rather rely on LegacyInputDriver provided by
NativeWindowBase for compatibility. They also implement the new Mouse*
events.
2014-05-02 16:52:11 +02:00
thefiddler
674cd54c29
[Mac] Fixed initial window position
...
Cocoa sets the desktop origin at the bottom-left of the main screen,
with +y going up. OpenTK is setting the origin at the top-left of the
main screen, so we need to invert the y-axis.
2014-05-02 15:13:38 +02:00
thefiddler
3824f55f18
[Mac] Fixed cursor coords when CursorVisible=false
2014-05-02 14:21:32 +02:00
thefiddler
89fc36bde1
[Platform] Added INativeWindow.Mouse* events
2014-05-02 14:18:52 +02:00
thefiddler
612652910f
[Platform] Inherit NativeWindowBase
2014-05-02 14:18:40 +02:00
thefiddler
300203f73b
[Mac] Use On* methods from base class
2014-05-02 09:41:27 +02:00
thefiddler
10939fcaec
[OpenTK] Add On* methods to raise events
2014-05-02 09:37:25 +02:00
thefiddler
24b19d2487
[Input] Added internal MouseDevice.Position getter
2014-05-02 09:37:25 +02:00
thefiddler
f2eca2924f
[Mac] Inherit from NativeWindowBase
...
This reduces code duplication significantly.
2014-05-02 09:37:25 +02:00
thefiddler
5ba1bf89f1
[OpenTK] Added NativeWindowBase
...
This acts as a common base class to INativeWindow implementations and
can be used to reduce code duplication.
2014-05-02 09:34:14 +02:00
thefiddler
495ded54d8
[Examples] Use Key.Enter to capture mouse
2014-05-01 23:56:25 +02:00
thefiddler
60f58c2ffd
[Examples] Fixed cursor hotspot
2014-05-01 22:17:06 +02:00
thefiddler
9bd94c1f13
[Examples] Improved MouseCursor example
2014-05-01 17:03:47 +02:00
thefiddler
9ee728d4fc
[Win] Only set MouseCursor in client area
...
This is required according to the windows documentation.
2014-05-01 16:49:23 +02:00
thefiddler
9988a2ba9c
[SDL][Win] Destroy custom cursor on Close()
...
X11 destroys the cursor after setting it and Cocoa uses an autorelease
pool, so that should not be necessary there.
2014-05-01 14:27:20 +02:00
thefiddler
c8c0d32fcc
[OpenTK] Rearranged MouseCursor parameters
...
MouseCursor and WindowIcon now match GL.TexImage2D in the way they
arrange their parameters. The expected values of each parameter are now
documented.
2014-04-30 20:04:31 +02:00
thefiddler
8568e6dc70
[SDL] Fixed MouseCursor getting stuck after multiple changes
2014-04-30 13:46:44 +02:00
thefiddler
a5ddc530c2
[SDL] Fixed custom MouseCursor
2014-04-30 13:36:16 +02:00
thefiddler
bee833e712
[Example] Test custom cursor
2014-04-30 09:06:30 +02:00
thefiddler
e63970e2be
[Mac] Fixed cursor byte order
2014-04-30 09:06:18 +02:00
thefiddler
2632661d8a
[OpenTK] Fixed compilation error
2014-04-30 08:45:27 +02:00
thefiddler
965c8baa7f
[OpenTK] Renamed x/y to hotx/hoty
...
The new name matches their functionality closer.
2014-04-30 08:44:48 +02:00
thefiddler
890805f2ae
[Platform] Renamed MouseCursor.Rgba to Argb
...
This matches the default format of System.Drawing.Bitmap.
2014-04-30 08:38:57 +02:00
thefiddler
7d8f14baa7
[Mac] Implement NSCursor rectangles
2014-04-30 08:38:19 +02:00
thefiddler
d013ef1868
[Platform] Make MouseCursor actor public
2014-04-30 08:37:34 +02:00
thefiddler
0ed1e8b6d8
[Win] Log wglSwapIntervalEXT errors
...
Note that we cannot use Marshal.GetLastWin32Error because we are not
using regular DllImports for WGL extensions.
2014-04-29 08:48:49 +02:00
thefiddler
f2dc40abdd
[OpenTK] Query the driver for VSyncMode getter
...
Otherwise, the user could call Context.SwapInterval directly, causing
the vsync property to fall out of sync.
2014-04-29 08:31:47 +02:00
thefiddler
3da459b316
[All] Fixed checks for EXT_swap_control_tear
...
EGL and NSOpenGL do not offer an EXT_swap_control_tear equivalent so
use regular vsync for now. The relevant extension string is now
correctly checked on WGL and GLX.
2014-04-29 08:10:18 +02:00
thefiddler
ab6b3c211c
[Mac] Removed unused CarbonGLNative.cs
2014-04-28 17:17:34 +02:00
thefiddler
88a60b14c5
[Mac] Remove call to NewEventHandlerUPP
...
NewEventHandlerUPP fails to load when running through MonoKickstart. It
appears that this function is only used for old PPC systems that had
trouble with function pointers - sample code online indicates that we
do not need to call this.
2014-04-28 16:25:23 +02:00
thefiddler
cf3a30d024
[Mac] CGDisplayBounds signature now matches Mac ABI
...
This resolves a crash in CGDisplayBounds when running through monokick.
2014-04-28 16:25:10 +02:00
thefiddler
ffb7bd8a4c
Merge branch 'pr/105' into develop
2014-04-28 16:19:17 +02:00
thefiddler
53d2c8d1e8
[Mac] Cmd-Q should raise Closing events
...
It should also be cancelable.
2014-04-28 16:19:04 +02:00
thefiddler
509f356ed4
[Win] Fixed MouseCursor.Default
...
It is now possible to switch from a custom cursor back to
MouseCursor.Default.
2014-04-28 09:37:16 +02:00
thefiddler
4f9a2f78d6
Merge branch 'cursor' of https://github.com/thefiddler/opentk into thefiddler-cursor
2014-04-28 07:07:47 +02:00
thefiddler
0f920fb205
[X11] Fixed SGI_swap_control query
...
GLX can return valid function pointer to unsupported functions.
We need to check for extension support in addition to the
function pointer.
Fixes crash on OpenSUSE 13.1 in VirtualBox.
2014-04-28 01:29:34 +02:00
thefiddler
168713aecf
[GL] Added GetPName.Max*ImageUniforms
...
These tokens were introduced in OpenGL 4.2 and 4.3.
2014-04-27 22:47:04 +02:00
thefiddler
c40115e223
[OpenTK] Only init X11 if SDL2 is not used
2014-04-27 22:41:24 +02:00
thefiddler
96b7419d83
[X11] Fixed INativeWindow.Cursor getter
2014-04-27 22:28:10 +02:00
thefiddler
d03e9d82dc
[Input] Fixed key modifiers in KeyboardDevice events
2014-04-27 22:27:18 +02:00
thefiddler
d787656328
[SDL] Fixed cursor support
...
SDL.CreateColorCursor takes 3 arguments, not 5.
2014-04-27 21:09:51 +02:00
thefiddler
48e21328c5
[Mac] Implement INativeWindow.Cursor
2014-04-27 19:45:20 +02:00
thefiddler
283a785703
[OpenTK] Treat null as MouseCursor.Empty
2014-04-27 19:45:08 +02:00
thefiddler
1d8ef7165f
[OpenTK] Disable custom MouseCursors
...
They require further development, due to byte-order differences between
platforms.
MouseCursor is now derived from WindowIcon, which we will use for
INativeWindow.Icon support in the future, in order to remove the
dependency to System.Drawing.
2014-04-27 19:44:45 +02:00
thefiddler
51567e610c
[Examples] Set a predefined cursor on Key.Space
...
Custom cursor are not enabled for OpenTK 1.1.2. They will be part of
OpenTK 1.1.3.
2014-04-27 19:43:16 +02:00
thefiddler
a61d20d2eb
[Mac] Stubbed INativeWindow.Cursor
2014-04-27 10:56:08 +02:00
Fraser Waters
2207144aec
Fix a bug in X11 CursorVisble with custom cursors.
...
CursorVisible reset to the default cursor when showing the cursor, it
should instead show the custom cursor if it's defined (else the default
cursor).
2014-04-27 10:53:34 +02:00
Fraser Waters
9ed32e4445
Change bool to IntPtr.
...
WindowProc returns an IntPtr not a bool, so let Handle* functions return
IntPtr?. If they return a value we return that, if they return null we
call DefWindowProc and return the result from that.
2014-04-27 10:53:34 +02:00
Fraser Waters
9239fd08e3
Custom cursors on X11.
2014-04-27 10:53:33 +02:00
Fraser Waters
6e23a55f35
Add XcursorImageLoadCursor function.
2014-04-27 10:53:33 +02:00
Fraser Waters
4f2658ab79
Make xcursor fields public.
2014-04-27 10:53:33 +02:00
Fraser Waters
cb5f354ddc
Change xcursor library name.
2014-04-27 10:53:33 +02:00
Fraser Waters
cf43b6003c
Create and Destroy functions for XcursorImage.
2014-04-27 10:53:33 +02:00
Fraser Waters
52043d5f74
Xcursor types.
2014-04-27 10:53:33 +02:00
Fraser
10112da976
Respond to WM_SETCURSOR messages.
...
Calling SetCursor on mouse moves is not enough, we need to respond to
SETCURSOR messages. If we have a custom cursor we need to call SetCursor
and then NOT call DefWindowProc, otherwise we just call DefWindowProc
for the forms default cursor.
2014-04-27 10:53:33 +02:00
Fraser
251a6e813e
No need for named variable.
2014-04-27 10:53:33 +02:00
Fraser
2bb0f945f9
Copy to correct offset.
...
Offset into image is y * stride, not y * bpp.
2014-04-27 10:53:33 +02:00
Fraser Waters
5b4f75ab68
Don't hardcode cursor.png path.
2014-04-27 10:53:32 +02:00
Fraser Waters
eab7e1ec0d
Copy cursor.png to output.
2014-04-27 10:53:32 +02:00
Fraser
8f9311ec8d
Partial implementation of Windows MouseCursor.
...
Very buggy, but starting to show results.
2014-04-27 10:53:32 +02:00
Fraser
0dd82e1485
MouseCursor example.
...
Small example to show how the MouseCursor class can be used.
2014-04-27 10:53:32 +02:00
Fraser
b005b6e542
DestroyIcon function.
2014-04-27 10:53:32 +02:00
Fraser
4fb7a2d5c2
GetCursor function.
2014-04-27 10:53:32 +02:00
Fraser
acf47f1ff4
SetCursor function.
2014-04-27 10:53:32 +02:00
Fraser
dd75466239
GetIconInfo function.
2014-04-27 10:52:53 +02:00
Fraser
f10d8568cb
CreateIconIndirect function.
2014-04-27 10:52:53 +02:00
Fraser
6c65e2cdd3
IconInfo structure.
2014-04-27 10:52:53 +02:00
thefiddler
dd55cea489
[All] Initial implementation of INativeWindow.Cursor property
...
Affects issue #9
2014-04-27 10:52:53 +02:00
thefiddler
f545bd512b
[SDL2] Implemented cursor APIs
...
Affects issue #9
2014-04-27 10:52:53 +02:00
thefiddler
a6f610dd0c
[Core] Added MouseCursor class
...
This branch marks the beginning of hardware cursor support (affects
issue #9 )
2014-04-27 10:52:53 +02:00
Olle Håkansson
160e6ecb31
Added Quit menu item + shortcut (Cmd+Q).
2014-04-27 10:52:28 +02:00
Olle Håkansson
a24ce9ba11
Fixed creating contexts without native windows.
...
To create a context for the GTK GLWidget, you need to be able to
specify the exact NSView you want the OpenGL context to apply to. Also,
you don’t want to initialise the NSApplication in this situation, which
the CocoaContext did before (unintentionally).
2014-04-27 09:58:05 +02:00
thefiddler
6186373df1
[ES][GL] Synced with April Khronos specification
2014-04-27 09:53:22 +02:00
thefiddler
a79086bb20
[X11] Set WM_CLASS property
...
This allows Ubuntu Unity and Gnome Shell to detect and display
the correct application name.
2014-04-26 20:27:00 +02:00
thefiddler
78a6993cec
[GL] Only print debug info in debug mode
2014-04-26 19:13:03 +02:00
thefiddler
7c4bdab110
[GL] Removed unused code
2014-04-26 19:12:49 +02:00
thefiddler
cd25d5f307
[OpenTK] Removed reflection binding loading
...
This code is no longer in use.
2014-04-26 18:28:51 +02:00
thefiddler
95f73310d8
[X11] Implemented new-style bindings for GLX
...
Replaced delegates with call instructions and completely removed the
old extension loading code.
2014-04-26 18:24:13 +02:00
thefiddler
44526229be
[Win] Fixed warnings
...
Protected object in static class and wrong parameter names in
documentation
2014-04-26 18:22:50 +02:00
thefiddler
8558509379
[GL][ES] Regenerated bindings
2014-04-26 14:23:52 +02:00
thefiddler
1666eb670c
[GL][ES] Do not break public API
...
Even if that API is not meant to be used by applications.
2014-04-26 14:23:29 +02:00
thefiddler
bd339523ab
[Bind] Do not generate DllImports
...
These break dynamic loading of OpenGL ES and bloat OpenTK.dll with
duplicated strings. The new extension loading mechanism is now fast
enough to make DllImports unnecessary.
2014-04-26 14:22:37 +02:00
thefiddler
b732e377c9
[Mac] Sped up extension loading
...
From ~200ms down to ~65ms on a rMBP with Nvidia 650M and Mac OS X
10.9.2.
2014-04-26 14:21:26 +02:00
thefiddler
433fa35f7e
[Graphics] GetAddress(string) is no longer needed
2014-04-26 14:20:17 +02:00
thefiddler
fbeac9c323
[Graphics] Redirect GetAddress(string)
...
GetAddress(string) now calls GetAddress(IntPtr) internally. This
reduces the number of APIs that must be implemented for each platform.
2014-04-26 14:19:19 +02:00
thefiddler
9605940661
[X11] Optimized XKey translation
2014-04-25 21:55:00 +02:00
thefiddler
6257858d54
[Bind][ES][GL] Output entry points as byte[]
...
Moving from string[] to byte[] reduces startup memory allocations
tremendously (up to 70% lower memory use on Windows!)
2014-04-25 17:25:20 +02:00
thefiddler
c1f284f101
[Win] Wgl no longer inherits GraphicsBindingsBase
...
This is a necessary step for the next commit.
2014-04-25 17:23:06 +02:00
thefiddler
e433aad4b4
[ES] ES10 does not require initialization
...
It consists solely of DllImports that will be initialized on first use,
regardless of the existence of an OpenGL context.
2014-04-25 14:50:55 +02:00
thefiddler
3658fac263
[Input] Use Key.LastKey instead of Enum.GetValues
...
This avoids unnecessary memory allocations in the KeyboardDevice
constructor.
2014-04-25 14:15:06 +02:00
thefiddler
58e41a2b97
[Win] Replaced KeyMap dictionary with switch
...
This reduces the amount of allocations on the startup path.
2014-04-25 14:13:55 +02:00
thefiddler
e36a0d0fbc
[OpenTK] Rebased on develop
2014-04-25 13:38:53 +02:00
thefiddler
774ebd1df7
[Bind] Do not generate slots for OpenGL <= v1.1
...
We can use DllImports for OpenGL functions <= v1.1 on all platforms,
including Windows. This allows us to reduce the number of required
GetProcAddress calls by 474, reducing startup time and memory
consumption.
This setting can be turned off through Settings.Legacy.UseDllImports
and UseWindowsCompatibleGL.
2014-04-25 12:14:28 +02:00
thefiddler
6994a13770
[OpenTK] Fixed DllImport library for OpenGL on Mac OS X
2014-04-25 12:14:28 +02:00
thefiddler
66e78ad3f6
[Examples] Improved ExternalContext test
...
Also added documentation
2014-04-25 12:14:27 +02:00
thefiddler
03a8a6da0e
[SDL2] Optimized Sdl2KeyCode translation
...
Also fixed Key.WinLeft, WinRight and Menu translation.
2014-04-25 12:14:27 +02:00
thefiddler
9f39aa1b88
[Mac] Optimized MacOSKeyCode translation
...
This also reduces memory allocations on startup by ~10K.
2014-04-25 12:14:26 +02:00
thefiddler
4ae65c86ff
[GL] Added missing GetPName.MaxPatchVertices
2014-04-25 11:11:42 +02:00
thefiddler
824f238973
[Mac] Removed most legacy Carbon code
2014-04-24 13:48:26 +02:00
thefiddler
5f44f3d491
[Mac] Removed unused Carbon APIs
2014-04-24 13:48:26 +02:00
thefiddler
cdd88e6f7e
[Mac] Migrated AglContext to OpenTK.GLControl
2014-04-24 13:48:26 +02:00
thefiddler
3475582c30
[Mac] Mouse coordinates are reported in pixels
2014-04-24 13:47:30 +02:00
thefiddler
e0848f9d6d
[Mac] SendFloat should use _fpret on i386
2014-04-24 13:47:30 +02:00
thefiddler
3250cbbc91
[Mac] Use scrollFactor variable
2014-04-24 13:47:30 +02:00
thefiddler
a2212f0184
[Mac] Fixed a warning related to volatile UniqueId
...
Also changed the class name to OpenTK_GameWindow
2014-04-24 13:47:30 +02:00
thefiddler
acb7dd27a7
[Mac] Window should be invisible on startup
...
Also fixes the initial position of the window.
2014-04-24 13:47:30 +02:00
Olle Håkansson
64fb043b77
Licensed files under MIT/X11.
2014-04-24 13:45:06 +02:00
thefiddler
b0eedc122d
[Mac] Avoid class conflicts for multiple windows
...
When creating multiple windows, their classes must have different class
names or they will fail to construct.
This commit ensures their names are unique. It also fixes a potential
memory leak in the Icon setter.
2014-04-24 13:45:06 +02:00
thefiddler
287c2b3415
[Mac] Add CocoaContext.GetGraphicsMode via CGL
...
Once the context is constructed, we use GetGraphicsMode to retrieve the
exact GraphicsMode that was selected by CocoaContext.
2014-04-24 13:45:06 +02:00
Olle Håkansson
2943bdfecb
Fixed too high mouse scrolling speed.
2014-04-24 13:45:06 +02:00
Olle Håkansson
4573db2ceb
Much improved handling of window/border states.
2014-04-24 13:45:06 +02:00
Olle Håkansson
df6caa3cbb
Fixed missing Mode value in CocoaContext.
...
Crashed E.g. GameWindow States example.
2014-04-24 13:45:06 +02:00
Olle Håkansson
ddcc8df5ec
Fixed the HelloGL3 example for the Mac.
...
Upped versions to make it work on Mac; think this should not be a
problem for most other machines.
2014-04-24 13:45:05 +02:00
Olle Håkansson
374ce26186
Added a helper for creating cocoa window infos.
2014-04-24 13:45:05 +02:00
Olle Håkansson
86a5399534
Register mouse drag as well as move.
2014-04-24 13:45:05 +02:00
Olle Håkansson
46856dc21d
Closing should occur in ProcessEvents.
2014-04-24 13:45:05 +02:00
Olle Håkansson
ed87814a7f
Cleanups.
2014-04-24 13:45:05 +02:00
Olle Håkansson
3798d268dc
Fixed mouse position not being received.
2014-04-24 13:45:05 +02:00
Olle Håkansson
9183e3ae0d
Fixed crashes from callbacks.
2014-04-24 13:45:05 +02:00
Olle Håkansson
d1fb2597bb
Better handling of maximized window.
...
Used the “zoom” command before, but it has some limitations (e.g. no
event when zoom is done).
2014-04-24 13:45:05 +02:00
Olle Håkansson
7c3872531e
Disabled capturing when changing resolution.
...
Might be off here, but without capturing it seems like we get a
behaviour closer to that of the PC.
2014-04-24 13:45:05 +02:00
Olle Håkansson
50ed0ee9da
Bug fixes.
2014-04-24 13:45:05 +02:00
Olle Håkansson
63d0d057c5
Better fullscreen handling.
2014-04-24 13:45:05 +02:00
Olle Håkansson
59d7889ce0
Restored most window functionality.
2014-04-24 13:45:05 +02:00
Olle Håkansson
5457651676
Fixed swap interval.
2014-04-24 13:45:04 +02:00
Olle Håkansson
6c6beae4fc
Setup listening for window events.
2014-04-24 13:45:04 +02:00
Olle Håkansson
5e1b7c82ab
Cocoa bindings through libobjc.dylib
2014-04-24 13:45:04 +02:00
thefiddler
4ce1289d85
Merge branch 'es_docs' into develop
2014-04-02 09:27:23 +02:00
thefiddler
985aca3752
[Examples] Test mouse input under heavy load
2014-04-01 09:49:56 +02:00
thefiddler
74cff79d64
Merge remote-tracking branch 'frassle/issue76' into develop
2014-04-01 09:39:48 +02:00
thefiddler
d292d44b90
[Math] Replaced tab characters with spaces
2014-03-31 18:20:08 +02:00
thefiddler
e4fd62c0ff
Merge branch 'pr/84' into develop
2014-03-31 18:19:18 +02:00
thefiddler
bd920a15f2
[Bind] Corrected CSharpSpecWriter output and warning messages
...
CSharpSpecWriter now correctly outputs doc summaries on ARB_imaging
functions that do not have a version/deprecation string. Additionally,
it no longer warns about documentation parameter mismatches for
parameters matching C# keywords.
2014-03-31 17:40:15 +02:00
thefiddler
d68c31a561
[Bind] Move documentation generation to DocProcessor class
...
This de-duplicates a large amount of code that is shared between the
various ISpecWriter implementations.
2014-03-31 17:09:30 +02:00
thefiddler
8001d62599
[Bind] Make documentation output closer to previous xslt implementation
2014-03-31 10:10:56 +02:00
thefiddler
9012101e8c
[Bind] Propagate ComputeSize attribute in cloned Parameters
2014-03-31 10:09:33 +02:00
thefiddler
e11b7ca993
[Bind] More aggressive trimming of documentation strings
2014-03-31 09:51:15 +02:00
thefiddler
570d08fff1
[Bind] Add NoIndent option to BindStreamWriter
2014-03-31 09:50:51 +02:00
thefiddler
61791c91db
[Bind] Do not skip parameters in documentation
...
Multiple parameters may share a single description. The DocProcessor
will now correctly generate DocumentationParameters for each of them.
2014-03-30 19:16:30 +02:00
thefiddler
d1b99219ba
[Compatibility] Don't generate xml documentation
2014-03-30 11:01:30 +02:00
thefiddler
21b328992a
[Bind] Remove xmlns to simplify xpath processing
2014-03-30 11:01:03 +02:00
thefiddler
243f41b83f
[Bind] Use DocumentationParameter instead of KeyValuePair
2014-03-30 10:43:30 +02:00
thefiddler
bd9f760f4b
[Bind] Merge GL2 and GL4 documentation into one
2014-03-30 10:29:50 +02:00
thefiddler
033e0b7155
[Bind] Concatenate multiline documentation
2014-03-30 10:29:11 +02:00
thefiddler
67b0ead68b
[Bind] Process documentation from subdirectories
...
Instead of using xslt, we now process the documentation in code. This
allows us to fix mismatches from e.g. invalid parameter names that
sometimes creep in the specs.
2014-03-28 20:08:38 +01:00
thefiddler
22a706e44f
[Bind] Added documentation files for OpenGL ES
2014-03-28 20:06:55 +01:00
Fraser Waters
fbe6cc0a31
Use Marshal.GetLastWin32Error instead of GetLastError.
...
Also removes magic number 1171 and replaces with constant.
2014-03-23 22:31:32 +00:00
Fraser Waters
095d3f26c0
Use GetMouseMovePointsEx to smooth mouse input.
...
Uses GetMouseMovePointsEx to get mouse move history so mouse events aren't dropped even with low framerates.
Fixes #76 .
2014-03-23 16:26:24 +00:00
thefiddler
2a97192ef8
[Build] Updated copyright information
2014-03-18 14:29:41 +01:00
thefiddler
a24e1edeae
[Build] Set revision to 0 outside source control
...
This ensures that properly built packages take precedence to incorrectly
built packages.
2014-03-18 14:28:52 +01:00
thefiddler
db913ca3f4
[GL] Added missing [Rgba]16Snorm texture formats
...
See https://www.opengl.org/sdk/docs/man4/html/glTexImage2D.xhtml or the
4.4 spec, section 8.5, table "Sized internal color formats".
2014-03-18 12:08:02 +01:00
csantos
c48f6399e4
Centering the cursor at (width/2, height/2), effectively fixing
...
the issue described in https://github.com/mono/MonoGame/issues/2283
2014-03-18 01:44:52 -03:00
Phyyl
617131066a
Added multiplication operator to all vectors
2014-03-17 16:59:09 -04:00