platform/core/csapi/opentk.git
10 years ago[Mac] Removed unused CarbonGLNative.cs
thefiddler [Mon, 28 Apr 2014 15:17:34 +0000 (17:17 +0200)]
[Mac] Removed unused CarbonGLNative.cs

10 years ago[Mac] Remove call to NewEventHandlerUPP
thefiddler [Fri, 4 Apr 2014 06:46:32 +0000 (08:46 +0200)]
[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.

10 years ago[Mac] CGDisplayBounds signature now matches Mac ABI
thefiddler [Thu, 3 Apr 2014 21:19:31 +0000 (23:19 +0200)]
[Mac] CGDisplayBounds signature now matches Mac ABI

This resolves a crash in CGDisplayBounds when running through monokick.

10 years agoMerge branch 'pr/105' into develop
thefiddler [Mon, 28 Apr 2014 14:19:17 +0000 (16:19 +0200)]
Merge branch 'pr/105' into develop

10 years ago[Mac] Cmd-Q should raise Closing events
thefiddler [Mon, 28 Apr 2014 14:19:04 +0000 (16:19 +0200)]
[Mac] Cmd-Q should raise Closing events

It should also be cancelable.

10 years agoMerge branch 'thefiddler-cursor' into develop
thefiddler [Mon, 28 Apr 2014 07:38:54 +0000 (09:38 +0200)]
Merge branch 'thefiddler-cursor' into develop

10 years ago[Win] Fixed MouseCursor.Default
thefiddler [Mon, 28 Apr 2014 07:37:16 +0000 (09:37 +0200)]
[Win] Fixed MouseCursor.Default

It is now possible to switch from a custom cursor back to
MouseCursor.Default.

10 years agoMerge branch 'cursor' of https://github.com/thefiddler/opentk into thefiddler-cursor
thefiddler [Mon, 28 Apr 2014 05:07:47 +0000 (07:07 +0200)]
Merge branch 'cursor' of https://github.com/thefiddler/opentk into thefiddler-cursor

10 years ago[X11] Fixed SGI_swap_control query
thefiddler [Sun, 27 Apr 2014 23:29:34 +0000 (01:29 +0200)]
[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.

10 years ago[GL] Added GetPName.Max*ImageUniforms
thefiddler [Sun, 27 Apr 2014 20:47:04 +0000 (22:47 +0200)]
[GL] Added GetPName.Max*ImageUniforms

These tokens were introduced in OpenGL 4.2 and 4.3.

10 years ago[OpenTK] Only init X11 if SDL2 is not used
thefiddler [Sun, 27 Apr 2014 20:41:24 +0000 (22:41 +0200)]
[OpenTK] Only init X11 if SDL2 is not used

10 years ago[X11] Fixed INativeWindow.Cursor getter
thefiddler [Sun, 27 Apr 2014 20:28:10 +0000 (22:28 +0200)]
[X11] Fixed INativeWindow.Cursor getter

10 years ago[Input] Fixed key modifiers in KeyboardDevice events
thefiddler [Sun, 27 Apr 2014 20:27:18 +0000 (22:27 +0200)]
[Input] Fixed key modifiers in KeyboardDevice events

10 years ago[SDL] Fixed cursor support
thefiddler [Sun, 27 Apr 2014 19:09:51 +0000 (21:09 +0200)]
[SDL] Fixed cursor support

SDL.CreateColorCursor takes 3 arguments, not 5.

10 years ago[Mac] Implement INativeWindow.Cursor
thefiddler [Sun, 27 Apr 2014 17:45:20 +0000 (19:45 +0200)]
[Mac] Implement INativeWindow.Cursor

10 years ago[OpenTK] Treat null as MouseCursor.Empty
thefiddler [Sun, 27 Apr 2014 17:45:08 +0000 (19:45 +0200)]
[OpenTK] Treat null as MouseCursor.Empty

10 years ago[OpenTK] Disable custom MouseCursors
thefiddler [Sun, 27 Apr 2014 17:44:45 +0000 (19:44 +0200)]
[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.

10 years ago[Examples] Set a predefined cursor on Key.Space
thefiddler [Sun, 27 Apr 2014 17:43:16 +0000 (19:43 +0200)]
[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.

10 years ago[Mac] Stubbed INativeWindow.Cursor
thefiddler [Sun, 27 Apr 2014 08:56:08 +0000 (10:56 +0200)]
[Mac] Stubbed INativeWindow.Cursor

10 years agoFix a bug in X11 CursorVisble with custom cursors.
Fraser Waters [Mon, 24 Feb 2014 12:58:41 +0000 (12:58 +0000)]
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).

10 years agoChange bool to IntPtr.
Fraser Waters [Sat, 22 Feb 2014 14:08:18 +0000 (14:08 +0000)]
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.

10 years agoCustom cursors on X11.
Fraser Waters [Sat, 22 Feb 2014 14:04:53 +0000 (14:04 +0000)]
Custom cursors on X11.

10 years agoAdd XcursorImageLoadCursor function.
Fraser Waters [Sat, 22 Feb 2014 14:04:01 +0000 (14:04 +0000)]
Add XcursorImageLoadCursor function.

10 years agoMake xcursor fields public.
Fraser Waters [Sat, 22 Feb 2014 14:03:46 +0000 (14:03 +0000)]
Make xcursor fields public.

10 years agoChange xcursor library name.
Fraser Waters [Sat, 22 Feb 2014 13:34:28 +0000 (13:34 +0000)]
Change xcursor library name.

10 years agoCreate and Destroy functions for XcursorImage.
Fraser Waters [Sat, 22 Feb 2014 12:54:34 +0000 (12:54 +0000)]
Create and Destroy functions for XcursorImage.

10 years agoXcursor types.
Fraser Waters [Sat, 22 Feb 2014 12:54:11 +0000 (12:54 +0000)]
Xcursor types.

10 years agoRespond to WM_SETCURSOR messages.
Fraser [Fri, 21 Feb 2014 19:46:13 +0000 (19:46 +0000)]
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.

10 years agoNo need for named variable.
Fraser [Fri, 21 Feb 2014 19:44:51 +0000 (19:44 +0000)]
No need for named variable.

10 years agoCopy to correct offset.
Fraser [Fri, 21 Feb 2014 19:35:34 +0000 (19:35 +0000)]
Copy to correct offset.

Offset into image is y * stride, not y * bpp.

10 years agoDon't hardcode cursor.png path.
Fraser Waters [Fri, 21 Feb 2014 11:35:15 +0000 (11:35 +0000)]
Don't hardcode cursor.png path.

10 years agoCopy cursor.png to output.
Fraser Waters [Fri, 21 Feb 2014 11:27:51 +0000 (11:27 +0000)]
Copy cursor.png to output.

10 years agoPartial implementation of Windows MouseCursor.
Fraser [Fri, 21 Feb 2014 00:24:24 +0000 (00:24 +0000)]
Partial implementation of Windows MouseCursor.

Very buggy, but starting to show results.

10 years agoMouseCursor example.
Fraser [Fri, 21 Feb 2014 00:23:20 +0000 (00:23 +0000)]
MouseCursor example.

Small example to show how the MouseCursor class can be used.

10 years agoDestroyIcon function.
Fraser [Fri, 21 Feb 2014 00:10:57 +0000 (00:10 +0000)]
DestroyIcon function.

10 years agoGetCursor function.
Fraser [Fri, 21 Feb 2014 00:01:27 +0000 (00:01 +0000)]
GetCursor function.

10 years agoSetCursor function.
Fraser [Thu, 20 Feb 2014 23:40:40 +0000 (23:40 +0000)]
SetCursor function.

10 years agoGetIconInfo function.
Fraser [Thu, 20 Feb 2014 23:40:22 +0000 (23:40 +0000)]
GetIconInfo function.

10 years agoCreateIconIndirect function.
Fraser [Thu, 20 Feb 2014 22:26:53 +0000 (22:26 +0000)]
CreateIconIndirect function.

10 years agoIconInfo structure.
Fraser [Thu, 20 Feb 2014 22:20:10 +0000 (22:20 +0000)]
IconInfo structure.

10 years ago[All] Initial implementation of INativeWindow.Cursor property
thefiddler [Tue, 18 Feb 2014 15:44:28 +0000 (16:44 +0100)]
[All] Initial implementation of INativeWindow.Cursor property

Affects issue #9

10 years ago[SDL2] Implemented cursor APIs
thefiddler [Tue, 18 Feb 2014 15:43:47 +0000 (16:43 +0100)]
[SDL2] Implemented cursor APIs

Affects issue #9

10 years ago[Core] Added MouseCursor class
thefiddler [Tue, 18 Feb 2014 15:43:21 +0000 (16:43 +0100)]
[Core] Added MouseCursor class

This branch marks the beginning of hardware cursor support (affects
issue #9)

10 years agoAdded Quit menu item + shortcut (Cmd+Q).
Olle Håkansson [Sun, 27 Apr 2014 08:52:28 +0000 (10:52 +0200)]
Added Quit menu item + shortcut (Cmd+Q).

10 years agoFixed creating contexts without native windows.
Olle Håkansson [Sun, 27 Apr 2014 07:58:05 +0000 (09:58 +0200)]
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).

10 years ago[ES][GL] Synced with April Khronos specification
thefiddler [Sun, 27 Apr 2014 07:53:22 +0000 (09:53 +0200)]
[ES][GL] Synced with April Khronos specification

10 years ago[X11] Set WM_CLASS property
thefiddler [Sat, 26 Apr 2014 18:27:00 +0000 (20:27 +0200)]
[X11] Set WM_CLASS property

This allows Ubuntu Unity and Gnome Shell to detect and display
the correct application name.

10 years agoMerge pull request #103 from thefiddler/memopt
thefiddler [Sat, 26 Apr 2014 17:26:07 +0000 (19:26 +0200)]
Merge pull request #103 from thefiddler/memopt

Memory optimizations. Memory consumption reduced by up to 80% and memory allocations reduced by up to 70%, depending on the platform.

10 years ago[GL] Only print debug info in debug mode
thefiddler [Sat, 26 Apr 2014 17:13:03 +0000 (19:13 +0200)]
[GL] Only print debug info in debug mode

10 years ago[GL] Removed unused code
thefiddler [Sat, 26 Apr 2014 17:12:49 +0000 (19:12 +0200)]
[GL] Removed unused code

10 years ago[OpenTK] Removed reflection binding loading
thefiddler [Sat, 26 Apr 2014 16:28:51 +0000 (18:28 +0200)]
[OpenTK] Removed reflection binding loading

This code is no longer in use.

10 years ago[X11] Implemented new-style bindings for GLX
thefiddler [Sat, 26 Apr 2014 16:24:13 +0000 (18:24 +0200)]
[X11] Implemented new-style bindings for GLX

Replaced delegates with call instructions and completely removed the
old extension loading code.

10 years ago[Win] Fixed warnings
thefiddler [Sat, 26 Apr 2014 16:22:50 +0000 (18:22 +0200)]
[Win] Fixed warnings

Protected object in static class and wrong parameter names in
documentation

10 years ago[GL][ES] Regenerated bindings
thefiddler [Sat, 26 Apr 2014 12:23:52 +0000 (14:23 +0200)]
[GL][ES] Regenerated bindings

10 years ago[GL][ES] Do not break public API
thefiddler [Sat, 26 Apr 2014 12:23:29 +0000 (14:23 +0200)]
[GL][ES] Do not break public API

Even if that API is not meant to be used by applications.

10 years ago[Bind] Do not generate DllImports
thefiddler [Sat, 26 Apr 2014 12:22:37 +0000 (14:22 +0200)]
[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.

10 years ago[Mac] Sped up extension loading
thefiddler [Sat, 26 Apr 2014 12:21:26 +0000 (14:21 +0200)]
[Mac] Sped up extension loading

From ~200ms down to ~65ms on a rMBP with Nvidia 650M and Mac OS X
10.9.2.

10 years ago[Graphics] GetAddress(string) is no longer needed
thefiddler [Sat, 26 Apr 2014 12:20:17 +0000 (14:20 +0200)]
[Graphics] GetAddress(string) is no longer needed

10 years ago[Graphics] Redirect GetAddress(string)
thefiddler [Sat, 26 Apr 2014 12:19:19 +0000 (14:19 +0200)]
[Graphics] Redirect GetAddress(string)

GetAddress(string) now calls GetAddress(IntPtr) internally. This
reduces the number of APIs that must be implemented for each platform.

10 years ago[X11] Optimized XKey translation
thefiddler [Fri, 25 Apr 2014 19:55:00 +0000 (21:55 +0200)]
[X11] Optimized XKey translation

10 years ago[Bind][ES][GL] Output entry points as byte[]
thefiddler [Fri, 25 Apr 2014 15:25:20 +0000 (17:25 +0200)]
[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!)

10 years ago[Win] Wgl no longer inherits GraphicsBindingsBase
thefiddler [Fri, 25 Apr 2014 15:23:06 +0000 (17:23 +0200)]
[Win] Wgl no longer inherits GraphicsBindingsBase

This is a necessary step for the next commit.

10 years ago[ES] ES10 does not require initialization
thefiddler [Fri, 25 Apr 2014 12:50:55 +0000 (14:50 +0200)]
[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.

10 years ago[Input] Use Key.LastKey instead of Enum.GetValues
thefiddler [Fri, 25 Apr 2014 12:15:06 +0000 (14:15 +0200)]
[Input] Use Key.LastKey instead of Enum.GetValues

This avoids unnecessary memory allocations in the KeyboardDevice
constructor.

10 years ago[Win] Replaced KeyMap dictionary with switch
thefiddler [Fri, 25 Apr 2014 12:13:55 +0000 (14:13 +0200)]
[Win] Replaced KeyMap dictionary with switch

This reduces the amount of allocations on the startup path.

10 years ago[OpenTK] Rebased on develop
thefiddler [Fri, 25 Apr 2014 11:38:53 +0000 (13:38 +0200)]
[OpenTK] Rebased on develop

10 years ago[Bind] Do not generate slots for OpenGL <= v1.1
thefiddler [Wed, 2 Apr 2014 11:19:41 +0000 (13:19 +0200)]
[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.

10 years ago[OpenTK] Fixed DllImport library for OpenGL on Mac OS X
thefiddler [Wed, 2 Apr 2014 11:17:07 +0000 (13:17 +0200)]
[OpenTK] Fixed DllImport library for OpenGL on Mac OS X

10 years ago[Examples] Improved ExternalContext test
thefiddler [Wed, 2 Apr 2014 11:16:45 +0000 (13:16 +0200)]
[Examples] Improved ExternalContext test

Also added documentation

10 years ago[SDL2] Optimized Sdl2KeyCode translation
thefiddler [Wed, 2 Apr 2014 09:03:51 +0000 (11:03 +0200)]
[SDL2] Optimized Sdl2KeyCode translation

Also fixed Key.WinLeft, WinRight and Menu translation.

10 years ago[Mac] Optimized MacOSKeyCode translation
thefiddler [Wed, 2 Apr 2014 08:33:06 +0000 (10:33 +0200)]
[Mac] Optimized MacOSKeyCode translation

This also reduces memory allocations on startup by ~10K.

10 years ago[GL] Added missing GetPName.MaxPatchVertices
thefiddler [Fri, 25 Apr 2014 09:11:42 +0000 (11:11 +0200)]
[GL] Added missing GetPName.MaxPatchVertices

10 years ago[Mac] Removed most legacy Carbon code
thefiddler [Thu, 24 Apr 2014 07:22:46 +0000 (09:22 +0200)]
[Mac] Removed most legacy Carbon code

10 years ago[Mac] Removed unused Carbon APIs
thefiddler [Thu, 24 Apr 2014 07:09:11 +0000 (09:09 +0200)]
[Mac] Removed unused Carbon APIs

10 years ago[Mac] Migrated AglContext to OpenTK.GLControl
thefiddler [Wed, 23 Apr 2014 23:14:40 +0000 (01:14 +0200)]
[Mac] Migrated AglContext to OpenTK.GLControl

10 years ago[Mac] Mouse coordinates are reported in pixels
thefiddler [Wed, 23 Apr 2014 20:14:09 +0000 (22:14 +0200)]
[Mac] Mouse coordinates are reported in pixels

10 years ago[Mac] SendFloat should use _fpret on i386
thefiddler [Wed, 23 Apr 2014 20:13:53 +0000 (22:13 +0200)]
[Mac] SendFloat should use _fpret on i386

10 years ago[Mac] Use scrollFactor variable
thefiddler [Wed, 23 Apr 2014 19:20:18 +0000 (21:20 +0200)]
[Mac] Use scrollFactor variable

10 years ago[Mac] Fixed a warning related to volatile UniqueId
thefiddler [Wed, 23 Apr 2014 19:17:58 +0000 (21:17 +0200)]
[Mac] Fixed a warning related to volatile UniqueId

Also changed the class name to OpenTK_GameWindow

10 years ago[Mac] Window should be invisible on startup
thefiddler [Wed, 23 Apr 2014 19:00:24 +0000 (21:00 +0200)]
[Mac] Window should be invisible on startup

Also fixes the initial position of the window.

10 years agoMerge branch 'pr/101' into develop
thefiddler [Thu, 24 Apr 2014 11:45:17 +0000 (13:45 +0200)]
Merge branch 'pr/101' into develop

10 years agoLicensed files under MIT/X11.
Olle Håkansson [Wed, 23 Apr 2014 18:15:09 +0000 (20:15 +0200)]
Licensed files under MIT/X11.

10 years ago[Mac] Avoid class conflicts for multiple windows
thefiddler [Tue, 22 Apr 2014 22:05:34 +0000 (00:05 +0200)]
[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.

10 years ago[Mac] Add CocoaContext.GetGraphicsMode via CGL
thefiddler [Tue, 22 Apr 2014 22:03:07 +0000 (00:03 +0200)]
[Mac] Add CocoaContext.GetGraphicsMode via CGL

Once the context is constructed, we use GetGraphicsMode to retrieve the
exact GraphicsMode that was selected by CocoaContext.

10 years agoFixed too high mouse scrolling speed.
Olle Håkansson [Tue, 22 Apr 2014 19:39:17 +0000 (21:39 +0200)]
Fixed too high mouse scrolling speed.

10 years agoMuch improved handling of window/border states.
Olle Håkansson [Tue, 22 Apr 2014 19:29:03 +0000 (21:29 +0200)]
Much improved handling of window/border states.

10 years agoFixed missing Mode value in CocoaContext.
Olle Håkansson [Tue, 22 Apr 2014 18:02:05 +0000 (20:02 +0200)]
Fixed missing Mode value in CocoaContext.

Crashed E.g. GameWindow States example.

10 years agoFixed the HelloGL3 example for the Mac.
Olle Håkansson [Tue, 22 Apr 2014 18:01:22 +0000 (20:01 +0200)]
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.

10 years agoAdded a helper for creating cocoa window infos.
Olle Håkansson [Mon, 21 Apr 2014 19:14:32 +0000 (21:14 +0200)]
Added a helper for creating cocoa window infos.

10 years agoRegister mouse drag as well as move.
Olle Håkansson [Mon, 21 Apr 2014 18:37:36 +0000 (20:37 +0200)]
Register mouse drag as well as move.

10 years agoClosing should occur in ProcessEvents.
Olle Håkansson [Mon, 21 Apr 2014 18:32:16 +0000 (20:32 +0200)]
Closing should occur in ProcessEvents.

10 years ago Cleanups.
Olle Håkansson [Mon, 21 Apr 2014 17:41:45 +0000 (19:41 +0200)]
 Cleanups.

10 years agoFixed mouse position not being received.
Olle Håkansson [Mon, 21 Apr 2014 17:41:36 +0000 (19:41 +0200)]
Fixed mouse position not being received.

10 years agoFixed crashes from callbacks.
Olle Håkansson [Mon, 21 Apr 2014 17:40:44 +0000 (19:40 +0200)]
Fixed crashes from callbacks.

10 years agoBetter handling of maximized window.
Olle Håkansson [Sun, 20 Apr 2014 21:30:37 +0000 (23:30 +0200)]
Better handling of maximized window.

Used the “zoom” command before, but it has some limitations (e.g. no
event when zoom is done).

10 years agoDisabled capturing when changing resolution.
Olle Håkansson [Sun, 20 Apr 2014 21:15:56 +0000 (23:15 +0200)]
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.

10 years agoBug fixes.
Olle Håkansson [Sun, 20 Apr 2014 20:26:26 +0000 (22:26 +0200)]
Bug fixes.

10 years agoBetter fullscreen handling.
Olle Håkansson [Sun, 20 Apr 2014 17:56:23 +0000 (19:56 +0200)]
Better fullscreen handling.

10 years agoRestored most window functionality.
Olle Håkansson [Sun, 20 Apr 2014 08:08:44 +0000 (10:08 +0200)]
Restored most window functionality.

10 years agoFixed swap interval.
Olle Håkansson [Sat, 19 Apr 2014 11:36:44 +0000 (13:36 +0200)]
Fixed swap interval.