Commit graph

3680 commits

Author SHA1 Message Date
thefiddler 801d6ead04 [Input] Added hat state to JoystickState 2014-01-31 15:03:30 +01:00
thefiddler 0cacdf6ae4 [Input] Do not use a bitfield for hat position
Using a bitfield does not save storage space in this case, and also
stops pattern matching from working (switch() statement in C# or match
… with expressions in F#.)
2014-01-31 15:03:19 +01:00
thefiddler a4ce2182d2 [Input] Added JoystickHatState structure 2014-01-31 15:01:35 +01:00
thefiddler 5fe2d60857 [Input] Added structures for joystick hat input 2014-01-30 17:40:26 +01:00
thefiddler 41a23ca371 [Input] Fixed off-by-one error in internal max axes/buttons 2014-01-30 17:36:59 +01:00
thefiddler 71d6da80de [Win] Faster WinMM GetCapabilities() and GetState()
joyGetDevCaps() is an extremely slow call that allocates memory.
WinMMJoystick is now caching its results for a significant speedup in
Joystick.GetCapabilities() and GetState().

The cache is updated whenever a joystick device is removed. WIP to
handle device added notifications.
2014-01-30 10:18:11 +01:00
thefiddler eeaa3276f1 [Input] Implemented axis-button mappings 2014-01-29 10:39:18 +01:00
thefiddler ef429aff01 [Input] Added support for JoystickButtons 16-31 2014-01-29 10:28:06 +01:00
thefiddler c73e4785cd Merge remote-tracking branch 'cwassall/develop' into develop 2014-01-26 12:19:51 +01:00
thefiddler cd42f92c12 [Input] Corrected GamePadState range to byte [0,255] 2014-01-25 17:05:06 +01:00
Stefanos A. 06a3d7e1a7 [OpenTK] Don't skip AA modes in RelaxGraphicsMode
Previously, specifying an odd AA mode (e.g. 5x) would have been relaxed
to 0x. Now, it will be correctly relaxed to 4x.
2014-01-22 23:25:11 +01:00
thefiddler 417a6bedc1 [SDL2] Use RelaxGraphicsMode to find optimal mode
For SDL2, RelaxGraphicsMode requires us to clear context attributes
between consecutive attempts. This is implemented by calling
ClearGLAttributes().
2014-01-22 11:37:37 +01:00
thefiddler 0575e63a27 [Max] Use RelaxGraphicsMode to find optimal mode 2014-01-22 11:03:40 +01:00
thefiddler 6ba475e23f [Win] Use RelaxGraphicsMode to find optimal mode 2014-01-22 10:49:55 +01:00
thefiddler 615df9201b [OpenTK] Moved RelaxGraphicsMode to Utilities
This functionality is useful for all platform backends and is not
specific to the X11 backend.
2014-01-22 10:49:27 +01:00
thefiddler 6f3951e825 [OpenTK] Allow a GraphicsMode.Buffers value of 0
0 in this case means “don’t care”.
2014-01-22 10:48:40 +01:00
thefiddler ff36f0f35a [OpenTK] Clamp max AA level to 64x
This protects against a potential denial-of-service issue during mode
selection, where the platform backend will try to reduce AA level until
a supported mode is found.
2014-01-22 10:35:08 +01:00
thefiddler 2b6aec3b23 [OpenTK] Removed unused GraphicsMode field 2014-01-22 10:31:01 +01:00
Stefanos A. 770b697583 [Win] Clear extension list on reload 2014-01-21 09:04:27 +01:00
Stefanos A. 88ae446781 [Win] Removed WGL delegates in favor of calli 2014-01-21 09:00:57 +01:00
Stefanos A. 5379deaf63 [Win] Implemented calli-based interop for WGL 2014-01-21 09:00:25 +01:00
cwassall 7b591962e8 Change original_resolution field to a property
As the original_resolution field needs to be accessed from outside the
module, it should be an internal property as opposed to an internal
field
2014-01-20 12:51:55 +00:00
cwassall 5f6c8e654c Remember DisplayDevice original resolutions
When refreshing the AvailableDevices list, it is important to set the
original resolution on any DisplayDevices that were previously available
to allow the RestoreResolution() method to work correctly.
2014-01-19 19:44:12 +00:00
Stefanos A. b87b9e0a27 [Win] Fix X1/X2 mouse buttons (fixes issue #27) 2014-01-16 17:16:03 +01:00
Stefanos A. b9f57ba4d2 [OpenTK] Use ASCII encoding
Most OpenGL versions work with single-byte ASCII strings exclusively.
OpenGL 4.2 adds UTF8 encoded comments to GLSL shaders. Unfortunately,
UTF16 (.Net) to UTF8 conversions will usually modify the length of the
resulting byte array.

This is not currently possible to implement inside OpenTK, since the
binding generator does not know which length parameter corresponds to a
string parameter.

For this reason, and to maintain compatibility with older OpenGL
versions, we perform a destructive UTF16-to-ASCII encoding, which
replaces unsupported characters by '?'. This allows multi-byte post-4.2.
GLSL shaders to work as expected.

If non-destructive round-tripping of strings is required, the user will
have to use the IntPtr overload for string parameters and perform the
UTF16-to-UTF8 encoding/decoding manually. This need is very unlikely to
arise in practice.
2014-01-16 14:32:11 +01:00
Stefanos A 606b4ddcd1 Merge branch 'develop' of https://github.com/opentk/opentk into utf8 2014-01-16 11:44:34 +01:00
Stefanos A 9268b5ed7f Merge branch 'develop' into utf8 2014-01-16 11:39:22 +01:00
thefiddler 44e2576c86 [OpenTK] Protect against invalid axis/button ids 2014-01-15 01:24:20 +01:00
thefiddler e6a9adf494 [OpenTK] Fixed polling 2014-01-15 01:19:45 +01:00
thefiddler e7f037b0a2 [OpenTK] Fixed legacy joystick hotplugging & events 2014-01-15 01:13:39 +01:00
thefiddler df7d7ae8eb [Linux] Implemented joystick guid detection 2014-01-15 00:57:28 +01:00
thefiddler 73e3b66038 [OpenTK] Use LegacyJoystickDriver for IJoystickDriver implementation 2014-01-14 23:53:24 +01:00
thefiddler fb917a6d89 [Linux] Implemented joystick hotplugging 2014-01-14 23:51:31 +01:00
thefiddler 4ca8c78764 [OpenTK] Suggest alternative to obsolete INativeWindow.InputDriver property 2014-01-14 23:40:23 +01:00
Stefanos A. 4473c8373e [X11] Implemented joystick hotplugging
This is a work in progress.
2014-01-14 18:37:16 +01:00
Stefanos A. b004dc7a0a [X11] Added INotify.cs to project files 2014-01-14 18:36:36 +01:00
Stefanos A. 4203c14b22 [X11] Removed IJoystickDriver from X11Joystick
Legacy IJoystickDriver support is now implemented through a
LegacyJoystickDriver instance.
2014-01-14 18:36:19 +01:00
Stefanos A f3036e5f10 Merge branch 'develop' into linux_joystick 2014-01-14 18:26:05 +01:00
Stefanos A cb4e4d5e72 Merge branch 'legacy_joystick' into linux_joystick 2014-01-14 18:17:05 +01:00
Stefanos A. d467629ad8 [Linux] Added INotify bindings
These are not currently used.
2014-01-14 18:15:53 +01:00
Stefanos A 962a9f7733 Merge branch 'issue43_unstablefps' into develop 2014-01-14 14:21:19 +01:00
Stefanos A. 0c9b612bff [OpenTK] Increase max Update/RenderFrame rates
Given the new 144Hz monitors on the market today, it makes sense to
increase the Update/RenderFrame limit from 200Hz to 500Hz.
2014-01-14 14:20:38 +01:00
Stefanos A. 1f44cf27a1 [OpenTK] Do not hang when update rate too high
OpenTK will now detect when an UpdateFrame handler is consistently
taking too long to finish, and stop raising UpdateFrame events. This
gives ProcessEvents() a chance to execute and will protect the
application from hanging up.
2014-01-14 13:55:24 +01:00
Stefanos A. 95d71bc0cc [OpenTK] Respect a TargetUpdatePeriod of zero 2014-01-14 13:33:41 +01:00
Stefanos A. 97e49b76b2 [OpenTK] Fix UpdateFrame quantization error
The UpdateFrame event rate will now match TargetUpdatePeriod even if
vsync is enabled. Previously, it would be quantized to a multiple or
integer fraction of of the vsync rate.
2014-01-14 13:04:30 +01:00
Stefanos A. 3eccb89821 [OpenTK] Remove Thread.Sleep() from loop timing 2014-01-13 11:36:56 +01:00
Stefanos A. b3554bb74c [OpenTK] Simplified update and render loops 2014-01-13 11:22:33 +01:00
thefiddler 7afe48c979 [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.
2014-01-12 22:05:15 +01:00
Stefanos A. fca9f930e4 [OpenTK] Fix UpdateFrame loop condition
Multiple UpdateFrame events should be raised to match the desired
TargetUpdateFrequency, when TargetUpdateFrequency > 0. The loop would
incorrectly check for TargetRenderFrequency instead.

Affects issue #43
2014-01-12 21:37:18 +01:00
Stefanos A. c31f64f7e1 [OpenTK] Frameskip needs TargetUpdateFrequency!=0 2014-01-11 01:46:38 +01:00
Stefanos A. 19eb72b3a9 [OpenTK] Fixed Utilities.CreateSdl2WindowInfo
Utilities.CreateSdl2WindowInfo should store the specified windowHandle
directly instead of trying to call SDL.SDL.CreateWindowFrom.
2014-01-10 16:56:26 +01:00
Stefanos A. aff9719872 [SDL2] Implemented GetWindowWMInfo 2014-01-10 16:55:20 +01:00
Stefanos A. bdfcf43e0b [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
2014-01-10 15:41:57 +01:00
Stefanos A. ef5aedba6f [Win] More robust WGL extension detection
Affects issue #42 and issue #45
2014-01-10 09:24:59 +01:00
thefiddler a4d2a31386 [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
2014-01-09 23:36:28 +01:00
Stefanos A. 7f64945079 [OpenTK] Do not raise *Frame events when time = 0
Affects issue #40
2014-01-09 00:51:09 +01:00
Stefanos A. 28ac3cec0b [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.
2014-01-09 00:14:25 +01:00
Stefanos A. 1b3b510376 [Win] Check registry keys before accessing
Fixes crashes when using OpenTK over the Remote Desktop Client for Mac
(version 2010).
2014-01-09 00:10:41 +01:00
Stefanos A. 4af9d30ccb [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.
2014-01-08 22:29:22 +01:00
Stefanos A. 51ad513dbb [Win] Do not overload internal SetWindowLong
The internal function is now appended with "Internal".
2014-01-08 19:22:03 +01:00
Stefanos A. 7363cfee7b [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.
2014-01-08 19:21:29 +01:00
Stefanos A. 51baed7286 [Win] Remove unnecessary #if clauses 2014-01-08 00:45:42 +01:00
Stefanos A. e260a42954 [Win] Refactor huge wndproc into functions 2014-01-08 00:02:27 +01:00
Stefanos A. b6a806a568 [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.
2014-01-07 22:09:02 +01:00
Stefanos A. 6e03d501ae [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.
2014-01-07 15:55:11 +01:00
thefiddler 99df27b635 [OpenTK] Corrected GameWindow.Update/RenderFrequency information 2014-01-07 09:11:55 +01:00
thefiddler 56a3dd91e5 [OpenTK] Implemented GameWindow.UpdateTime and RenderTime properties 2014-01-07 09:09:43 +01:00
thefiddler 3856fcd48e [OpenTK] More robust timing for UpdateFrame and RenderFrame
FrameEventArgs.Time should no longer drift from clock time measured
outside GameWindow.
2014-01-07 08:52:02 +01:00
thefiddler 94c3c24bfb [OpenTK] Platform backends should inherit from PlatformFactoryBase
This reduces code duplication wrt deprecated interfaces and common
support code between backends.
2014-01-06 14:49:05 +01:00
thefiddler d84be0d594 [OpenTK] Added base IPlatformFactory implementation
PlatformFactoryBase provides a common base interface for platform
backends. Platform backends should inherit from PlatformFactoryBase in
order to reduce code duplication.
2014-01-06 14:47:58 +01:00
thefiddler a94a293732 [Platform] Implemented legacy IJoystickDriver
LegacyJoystickDriver implements the legacy IJoystickDriver interface
(GameWindow.Joysticks) in terms of the new IJoystickDriver2 interface
(OpenTK.Input.Joystick).

This removes a large chunk of code from each platform backend, as they
no longer need to implement IJoystickDriver themselves. Additionally,
it adds support for device hot plugging which was previously missing.
2014-01-06 14:25:05 +01:00
Stefanos A. 83f54f70aa [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)
2014-01-06 01:57:54 +01:00
Stefanos A. 88c57db5b6 [Math] Added MathHelper.Clamp 2014-01-06 01:52:08 +01:00
thefiddler a9ab3650da [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.
2014-01-05 23:58:05 +01:00
thefiddler 4d660fdeba [Input] Added Keyboard/MouseState.SetIsConnected to mirror JoystickState 2014-01-05 23:50:17 +01:00
thefiddler fda2d32d2d [Mac] Map GamePads, MultiAxisControllers and Wheels to joysticks 2014-01-05 22:44:58 +01:00
thefiddler a1123834a0 [Mac] Call DeviceRemoved() in Dispose() event
The necessary cleanup code already exists in DeviceRemoved(). No need
to duplicate this in the Dispose() event.
2014-01-05 22:38:26 +01:00
thefiddler ab85afd5ba [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.
2014-01-05 22:36:01 +01:00
thefiddler 9e223486f6 [Mac] Implement Joystick.GetGuid() 2014-01-05 22:15:55 +01:00
thefiddler 5c5afb3ea3 [Mac] Calculate joystick Guid for USB devices 2014-01-05 22:06:19 +01:00
thefiddler b458b40683 [Mac] Use out/ref parameters instead of unsafe pointers in bindings 2014-01-05 22:05:54 +01:00
thefiddler fa386dc991 [Mac] Connect devices to first available index 2014-01-05 21:53:28 +01:00
thefiddler 05af21e61b [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.
2014-01-05 21:27:34 +01:00
thefiddler 02c9f471ea [Mac] DllImport must be marked as extern 2014-01-05 21:18:20 +01:00
thefiddler 7388bd935d [Mac] Correctly unschedule HIDManager from run loop 2014-01-05 20:17:03 +01:00
thefiddler 4c7f6a92a7 [Mac] Don't let exceptions escape to unmanaged code 2014-01-05 04:20:51 +01:00
thefiddler 892d129e54 [Mac] Fixed DllEntryPointNotFound crash on device unplugging 2014-01-05 04:15:30 +01:00
thefiddler 2ee24efb2f [Mac] Implemented joystick buttons 2014-01-05 04:11:11 +01:00
thefiddler fad42994e1 [Mac] Implemented joystick axis movement 2014-01-05 03:54:53 +01:00
thefiddler 92635b3f35 [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.
2014-01-05 03:54:34 +01:00
thefiddler 59249c2624 [Mac] Implemented joystick device detection 2014-01-05 03:03:46 +01:00
thefiddler 07bcda0f57 [Mac] Retrieve HID joystick name 2014-01-05 02:42:47 +01:00
thefiddler 6dadbd3570 [Mac] Implemented necessary CFString methods 2014-01-05 02:42:33 +01:00
thefiddler 32653d2c64 [Mac] Construct JoystickDevice when joysticks are connected 2014-01-05 00:47:40 +01:00
thefiddler 3757db9978 [Input] Allow extending JoystickDevice<> 2014-01-05 00:46:59 +01:00
thefiddler bf8efea121 [Mac] Only add callbacks for recognized USB HID devices 2014-01-05 00:00:49 +01:00
thefiddler c44b477388 [Mac] Implement device added/removed events for joysticks 2014-01-04 23:58:59 +01:00
thefiddler 9659a1d786 [Mac] Add skeleton HID input implementation for joysticks 2014-01-04 23:55:38 +01:00
thefiddler 3a63496b6d Merge branch 'gamepad' into develop
Conflicts:
	Source/OpenTK/OpenTK.csproj
2014-01-03 02:23:02 +01:00
thefiddler 514390fc9a [Graphics] Added missing documentation comment 2014-01-03 02:18:28 +01:00
thefiddler 53552b0070 [Input] Corrected malformed documentation comments 2014-01-03 02:17:42 +01:00
thefiddler 3095afa18a [Input] Documented all public members 2014-01-03 01:58:16 +01:00
thefiddler b35aad1503 [Input] Removed JoystickState.GetAxis(int) overload 2014-01-03 01:58:08 +01:00
thefiddler 8649e4a044 [Input] Added SetVibration() API skeleton 2014-01-02 19:52:00 +01:00
thefiddler ec43b9ff85 [Input] GamePad and Joystick classes should be sealed 2014-01-02 19:27:04 +01:00
thefiddler b513e35ea8 [SDL2] Implemented PacketNumber property 2014-01-02 19:24:38 +01:00
thefiddler 1ccf7e5ad2 [Input] Added PacketNumber property 2014-01-02 19:24:15 +01:00
thefiddler b5d42b7992 [Input] Implemented GetState() and simplified GetCapabilities() 2014-01-02 18:37:53 +01:00
thefiddler d49af2787f [Input] Simplified configuration parser and added GetEnumerator() 2014-01-02 18:37:20 +01:00
thefiddler 8f00bbc9f2 [Input] Added internal Joystick.GetAxisRaw() method 2014-01-02 18:36:27 +01:00
thefiddler 0593ea62e6 [Input] Added Source and Target to GamePadConfigurationItem 2014-01-02 18:36:09 +01:00
thefiddler bf5d2a738d [Input] Made configuration database non-static 2014-01-02 02:42:51 +01:00
thefiddler 9e4827bf67 [SDL2] Fixed SDL_JoystickGetGUID capitalization 2014-01-02 02:20:51 +01:00
thefiddler a8fb977017 [Input] Initialize JoystickDevice.Details in constructor 2014-01-02 02:20:25 +01:00
thefiddler fb57a9062d [Input] Renamed GamePadMap to GamePadConfiguration 2014-01-02 01:38:12 +01:00
thefiddler dc1ffab78d [Input] Implemented IGamePadDriver.GetName() 2014-01-02 01:34:21 +01:00
thefiddler c2c76f2ab2 [Input] Made the Name property public
We can use the name property to implement a hypothetical
GamePad.GetName() method in the future.
2014-01-02 01:33:57 +01:00
thefiddler b056a50e73 [Input] Added xml documentation for GamePadCapabilities 2014-01-02 01:33:08 +01:00
thefiddler a0dad7f698 [Input] Implemented MappedGamePadDriver.GetCapabilities() 2014-01-02 01:13:20 +01:00
thefiddler f0fbb26efe [Input] Added ability to parse SDL configuration db strings 2014-01-02 01:07:21 +01:00
thefiddler 5e75fac056 [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
2014-01-02 01:06:47 +01:00
thefiddler b9a8e365de [Input] Added IJoystickDriver2.GetGuid() API 2013-12-31 14:09:17 +01:00
thefiddler cd143af60a [SDL2] Added JoystickGetGUID method 2013-12-31 14:08:28 +01:00
thefiddler 1687518ef5 [SDL2] Add compile-time check for SDL2 GameController vs MappedGamePadDriver 2013-12-31 11:46:40 +01:00
thefiddler ef7f31099d [Input] Removed unnecessary #region 2013-12-31 01:02:07 +01:00
thefiddler 7d4d116ce9 [Input] Renamed GamePadMapping to GamePadMap 2013-12-31 01:01:52 +01:00
thefiddler d4348c5083 [SDL2] Fixed joystick/controller hotplugging support 2013-12-30 17:22:45 +01:00
thefiddler 9c8a5f5028 [SDL2] Fixed GameControllerButton to Buttons translation 2013-12-30 17:15:49 +01:00
thefiddler 43ef78f222 [SDL2] Fix issue where changes to mutable struct were lost 2013-12-30 17:09:20 +01:00
thefiddler 9beb396c9e [SDL2] Explicitly enable joystick and gamepad events 2013-12-30 17:08:42 +01:00
thefiddler 2d303a6884 [Input] Buttons should have [Flags] attribute 2013-12-30 16:07:06 +01:00
Stefanos A. 6faa58aac3 [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.
2013-12-30 15:24:48 +01:00
thefiddler 52b8762593 [SDL2] Fixed mapping of instance ids to device ids 2013-12-30 14:57:28 +01:00
thefiddler a4366e52f5 [Input] Added missing closing brace in ToString() message 2013-12-30 14:56:22 +01:00
thefiddler 064a45e4a7 [Input] Fixed incorrect variable name 2013-12-30 13:49:26 +01:00
thefiddler 1b0a72472e [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.
2013-12-30 13:42:37 +01:00
thefiddler e997ddf9c6 [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.
2013-12-30 13:39:43 +01:00
thefiddler 0b8db7c40b [X11] Removed unused variable 2013-12-30 10:25:17 +01:00
thefiddler 4005710b99 [X11] Fixed current resolution detection. 2013-12-30 09:23:33 +01:00
thefiddler 3dbf575765 [Build] Added new files to the relevant csproj scripts 2013-12-28 01:23:39 +01:00
thefiddler 04e6d9335a [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.
2013-12-28 01:14:59 +01:00
thefiddler 5cebaccfca [Dummy] Improved thread-safety; added entry-point loader
DummyGLContext will now attempt to load OpenGL and OpenGL ES entry
points when a suitable OpenGL context is current on the calling thread.
This allows OpenTK to be used on contexts created through third-party
toolkits.
2013-12-28 01:09:59 +01:00
thefiddler 8bcbb06f8e [Platform] Added internal CreateGetAddress() function
CreateGetAddress() constructs a GraphicsContext.GetAddressDelegate that
is suitable for the current platform. This can be used when combining
OpenTK with an OpenGL context created through a third-party toolkit.
2013-12-28 01:08:24 +01:00
thefiddler cf76aa6085 [Mac] Moved GetAddress implementation to its own class
The functions defined in libdl.dylib are useful in more places than
just AglContext. Moving them to their own class ensures we can access
these from wherever we might need them.
2013-12-28 01:06:33 +01:00
thefiddler 9171977079 [SDL2] Added missing [SuppressUnamangedCodeSecurity] attribute 2013-12-28 01:04:46 +01:00
thefiddler b79d951e62 [Mac] Use Cgl.GetCurrentContext instead of Agl
CGL appears to work with both AGL and NSOpenGL contexts, whereas AGL is
limited to AGL contexts. This allows us to be more flexible in terms of
implementation (i.e. we can use Cgl.GetCurrentContext to retrieve a
handle to a context created through SDL, which uses NSOpenGL
internally.)
2013-12-28 01:04:22 +01:00
thefiddler 0d1df41393 [X11] Improve GraphicsMode fallback (fixes issue #23)
When the user requests a GraphicsMode that is not directly supported
by the GPU/drivers, we should relax the requested parameters until
we find a supported mode. An exception should only be thrown when
there is no usable mode.

This makes the X11 backend match the behavior of Windows. The SDL/X11
backend works a little bit differently, in that it falls back to the
a default mode directly if the requested mode is not available. There
is nothing we can do about that.
2013-12-27 14:01:21 +02:00
thefiddler 88f7cd68f5 [X11] Fixed border size on Gnome 3
The _NET_FRAME_EXTENTS atom is implemented differently by
different window managers, when window decorations are hidden
with Motif. Unity returns a 0 size, while Gnome 3 returns the
previous size.

This patch removes that ambiguity: when decorations are hidden,
border size becomes zero. This should work everywhere, unless
some window manager decides to troll us by decorating the window
when we explicitly request no decorations. Sigh...
2013-12-27 13:31:51 +02:00
thefiddler ab8796c942 [Input] Do not crash with scancodes > 255 2013-12-27 11:10:41 +01:00
thefiddler 6c6e09aae6 [X11] Allow resizing with fixed borders
Windows can now be resized programmatically, even when they have
WindowBorder.Fixed. All resizing logic is now consolidated in the
Bounds property, and ConfigureNotify messages are now handled
correctly depending on their source (StructureNotify or
SubStructureNotify.)
2013-12-27 11:07:38 +01:00
thefiddler 4d27b6ee55 Implemented X11 KeyDown/KeyUp events and reduced code duplication 2013-12-25 11:46:02 +01:00
thefiddler ffdf881cea Do not raise KeyPress for control characters 2013-12-25 11:14:30 +01:00
thefiddler f7fbf38c43 IsButtonBind should check for buttons, not axes 2013-12-25 01:47:27 +01:00
thefiddler b4b8bc1665 Implemented SDL IJoystickDriver2 and IGamePadDriver 2013-12-24 19:15:23 +01:00
thefiddler c51c4934df Added GameControllerGetBind APIs 2013-12-24 19:14:54 +01:00
thefiddler 6fc679c4ba Removed duplicate button types 2013-12-24 19:14:35 +01:00
thefiddler 1eb807bb64 Use IGamePadDriver through MappedGamePadDriver 2013-12-24 17:18:05 +01:00
Stefanos A 7fd7b8c7a2 Improved ToString implementation 2013-12-24 17:18:05 +01:00
Stefanos A 9a90772cef Fixed WinMM offsets for IJoystickDevice2 2013-12-24 17:18:05 +01:00
Stefanos A f3cb578587 Improved WinMMJoystickDriver hotplugging behavior 2013-12-24 17:18:05 +01:00
Stefanos A 82a2c9113c Implemented structural equality 2013-12-24 17:18:04 +01:00
Stefanos A 890d56ae63 Connected XInput driver 2013-12-24 17:18:04 +01:00
Stefanos A 15c01d0d5c WinMMJoystick implements IJoystickDriver2
WinMM is optimized for general joystick use, not for the canonical
GamePad layout. Instead of exposing IGamePadDriver directly, it should
expose IJoystickDriver2 and use a mapping driver to get GamePad support.
2013-12-24 17:18:04 +01:00
Stefanos A 165aa5bde6 Added MappedGamePadDriver skeleton implementation 2013-12-24 17:18:04 +01:00
Stefanos A 02fb6bf2f9 Implements JoystickState and Capabilities setters 2013-12-24 17:18:04 +01:00
Stefanos A 91b54cfbf3 No reason to comment out #region License 2013-12-24 17:18:04 +01:00
Stefanos A 52daef4b0d Added internal GamePadMapping class 2013-12-24 17:18:04 +01:00
Stefanos A 2839db587e Implemented thumbsticks and trigger caps 2013-12-24 17:18:04 +01:00
Stefanos A 7e5307bd4a Added IJoystickDevice2 interface 2013-12-24 17:18:03 +01:00
Stefanos A e2d86fdf52 Implemented initial XInput IGamePadDriver 2013-12-24 17:18:03 +01:00
Stefanos A b62f5993d4 Added missing left/right triggers 2013-12-24 17:18:03 +01:00
Stefanos A ddc52ce135 Implemented GamePad Capabilities and Type 2013-12-24 17:18:03 +01:00
Stefanos A dd648a8362 Initial implementation of GamePadTriggers 2013-12-24 17:18:03 +01:00
thefiddler 8f7eebb58d Enabled HIDInput IGamePadDriver implementation 2013-12-24 17:18:02 +01:00
Stefanos A 5d88a8daf4 Implemented GamePad API (WIP) 2013-12-24 17:18:02 +01:00
Stefanos A 0875cbd928 Removed unnecessary IsButtonValid method 2013-12-24 17:18:02 +01:00
Stefanos A 1adc3f7733 Display start button in ToString() 2013-12-24 17:18:02 +01:00
Stefanos A 44351a03c4 More robust handling of device add/remove events 2013-12-24 17:18:02 +01:00
Stefanos A 31ce400a7e Fixed expansion of joysticks collection 2013-12-24 17:18:02 +01:00
Stefanos A 2f1a81da2c Log errors in subsystem initialization 2013-12-24 17:18:02 +01:00
Stefanos A 1d61bd9dd2 Reuse Sdl2Factory.InputDriver in Sdl2NativeWindow 2013-12-24 17:18:01 +01:00
Stefanos A a72d70c3d0 Delay joystick initialization until necessary 2013-12-24 17:18:01 +01:00
Stefanos A 3660509dee Added SDL_InitSubSystem method 2013-12-24 17:18:01 +01:00
Stefanos A 4a13415fc6 Fixed x/y axis mixup. 2013-12-24 17:18:01 +01:00
Stefanos A 1ba5fd4380 Cleaned up using directives 2013-12-24 17:18:01 +01:00
Stefanos A 76a35c0b91 Added missing newline 2013-12-24 17:18:01 +01:00
Stefanos A 91d248ad29 Implemented GamePadThumbSticks 2013-12-24 17:18:01 +01:00
Stefanos A 0c10f29bd8 More compact string representation 2013-12-24 17:18:00 +01:00
Stefanos A 1acf8a807b Implemented IEquatable<> interface 2013-12-24 17:18:00 +01:00
thefiddler 2bf024a912 Implemented new GamePad interface (WIP) 2013-12-24 17:18:00 +01:00
thefiddler ecd04a3cad Implemented GamePadButtons 2013-12-24 17:18:00 +01:00
thefiddler 484af18673 Updated internal IGamePadDriver interface 2013-12-24 17:18:00 +01:00
thefiddler ee65f81f56 Implemented GameController API bindings 2013-12-24 17:18:00 +01:00
thefiddler d9985fc571 Use SDL2 event API for joystick devices 2013-12-24 17:18:00 +01:00
thefiddler 022e5c845c Implemented SDL2 Joystick and GameController events 2013-12-24 17:17:59 +01:00
thefiddler d7fefe495e Removed unused constructors 2013-12-23 21:43:17 +01:00
thefiddler 95270c877d Added Compositing and FrameworkScaled flags 2013-12-23 21:42:16 +01:00
thefiddler 1189b33ed5 Fixed OpenTK/Carbon key repeat behavior to match the other backends 2013-12-23 20:40:27 +01:00
thefiddler c13d80d6d8 Fixed GameWindow.{Bounds, Location, Size, X, Y} setters on OpenTK/Carbon 2013-12-23 20:21:02 +01:00
thefiddler c6a21a2239 Implemented KeyDown & KeyUp events on OpenTK/Carbon 2013-12-23 19:32:16 +01:00
Stefanos A. 30cd9cb7f8 Fixed crash in MakeCurrent(null)
MakeCurrent(null) should set the bound device context to zero.
2013-12-22 11:10:05 +01:00
Stefanos A. 0a46e20029 Added WGL_DRAW_TO_WINDOW_ARB flag
Without this flag, OpenGL rendering does not work as expected.

Additionally, all WGL_ARB_pixel_format attributes are expected to be
specified in key-value pairs. Fixed double-buffering and stereoscoping
rendering attributes.
2013-12-22 10:35:05 +01:00
Stefanos A. a2744719d5 Improved WGL mode selection
Fixed WGL_ARB_pixel_format attribute selection for doublebuffering,
stereoscopic rendering and hardware acceleration. Implemented
minimization strategy to select the optimal PixelFormatDescriptor in the
fallback path.
2013-12-22 09:20:40 +01:00
Stefanos A. 956bbe6491 Fixed DescribePixelFormatPFD
When using the PFD codepath, we now call DescribePixelFormat to retrieve
an exact interpretation of the pixel format selected by the driver.
2013-12-21 23:35:55 +01:00
Stefanos A. 1723be8a8b Prioritize accelerated formats first
Instead of creating a list of all available formats and iterating
through that, we let the driver decide which is the best accelerated
format to use for the user parameters. If no such format exists, we fall
back to generic acceleration or software acceleration, in turn.

This affects issue #21
2013-12-21 22:43:35 +01:00
Stefanos A. a7ae4bb038 Turn 1-element array to ref/out param 2013-12-21 22:41:35 +01:00
Stefanos A fd0c086e3d Marshal strings as UTF8 (affects #18)
Starting with OpenGL 4.2, strings passed to GL.ShaderSource are allowed
to contain multi-byte characters in comments (issue #18). This patch
modifies the marshaling code to use UTF8.GetBytes in order to marshal
strings, instead of Marshal.StringToHGlobalAnsi().
2013-12-21 00:51:34 +01:00
Stefanos A. 0c990583a3 Implemented KeyDown and KeyUp messages 2013-12-21 00:50:25 +01:00
Stefanos A. 42ce028bbf Clean fix issue #19
Isolate and commit fix for issue #19 without potential for regressions.
2013-12-21 00:43:05 +01:00
Stefanos A e1619a8ad3 Revert "Fix issue #19"
This reverts commit 2c14ec5f80.
2013-12-21 00:41:55 +01:00
Stefanos A. 2c14ec5f80 Fix issue #19
Don't filter window messages passed to our window (see
http://blogs.msdn.com/b/oldnewthing/archive/2005/02/09/369804.aspx).
Additionally, return the correct values for all messages we are actually
handling and clean up unmanaged memory after we are done with the
window.
2013-12-20 23:31:42 +01:00
Stefanos A. b941a8f06b Explicitly set WindowProcedure calling convention 2013-12-20 23:29:47 +01:00
Stefanos A. 2ddd555aaf Simplify ProcessEvents implementation
Instead of combining PeekMessage+GetMessage, we can simply call
PeekMessage(Remove) to achieve the same effect. This also allows us to
remove the IsIdle property, which is no longer used anywhere.
2013-12-20 08:42:36 +01:00
Stefanos A. a251617e9b Threads with message pump require STA comparment
May affect issue #19
2013-12-19 10:39:36 +01:00
Stefanos A. 93e7b896c2 Replace Wgl.GetCurrentDC with cached dc
with
2013-12-18 14:51:00 +01:00
Stefanos A. d8a4ca1162 Cleaned up temporary context construction
The temporary context is now retained until the actual context has been
constructed. If we don't do this, then WGL_ARB_create_context may fail
to work correctly on specific GPUs (e.g. Intel). This may affect issue
#19.
2013-12-18 14:29:06 +01:00
Stefanos A. a57b4c4270 Fixed GetModesARB implementation
The correct way to query number of available pixel formats is to use
Wgl.Arb.GetPixelFormatAttrib(NumberPixelFormatsArb), not
Wgl.Arb.ChoosePixelFormats. This fixes an issue where Intel drivers
would fail to report any pixel formats in GetModesARB, even when
WGL_ARB_pixel_format is supported.
2013-12-18 14:16:49 +01:00
Stefanos A. fb93f2af93 Minor code cleanup 2013-12-17 23:31:04 +01:00
Stefanos A. 44b8a9dbdc Use gdi32 implementations of functions
Several functions are defined in both gdi32 and opengl32. Using the
opengl32/wgl versions did not appear to help with issue #19. Let's use
the gdi32 version instead, as suggested here:
https://www.opengl.org/wiki/Platform_specifics:_Windows#The_WGL_functions
2013-12-17 22:35:30 +01:00
Stefanos A. dd31b41f08 Load opengl32.dll before gdi32.dll
According to
http://stackoverflow.com/questions/199016/wglcreatecontext-in-c-sharp-failing-but-not-in-managed-c,
opengl32.dll must be loaded before gdi32.dll. Affect issue #19.
2013-12-17 21:24:25 +01:00
Stefanos A. f4f793a5d3 Minor code cleanup
No need to wrap Wgl.DescribePixelFormat, just call it directly.
2013-12-17 16:40:15 +01:00
Stefanos A. 9129e62343 Use opengl32 instead of gdi32 throughout
Since we are dynamically loading opengl32.dll, we are supposed to use
the wgl version of functions that exist in both opengl32 and gdi32 dlls.
2013-12-17 16:39:45 +01:00
Stefanos A. 9c2db338e9 Corrected the entrypoint for wglChoosePixelFormat 2013-12-17 16:38:56 +01:00
Stefanos A. f4360beb74 Use 16bit depth in GraphicsMode.Default
16bits appear to be better supported than 24bits on virtual machines.
2013-12-16 10:44:37 +01:00
Stefanos A. 3c6682e080 GraphicsContext cannot be released by finalizer
On many/most platforms, GraphicsContexts can only be released by the
thread where they are current. This means that the user must call
GraphicsContext.Dispose() or risk a resource leak.

Since we cannot release contexts on the finalizer thread, we should keep
strong references, instead of weak references, until the user explicitly
calls Dispose().

This patch fixes issues with SDL2 crashing when running the MonoGame
WindowsGL test suite.
2013-12-16 10:43:56 +01:00
Stefanos A. 498f16c2bd Improved diagnostics
This helps when tracking down GraphicsContext-related issues in SDL2.
2013-12-16 10:39:54 +01:00
Stefanos A. 6ad91dcc5b Added hack for MonoGame compatibility
MonoGame uses reflection to access internal APIs. We need to keep these
available until this is fixed downstream.
2013-12-16 10:39:11 +01:00
Stefanos A. 1392d48ec0 Protect against recursion in Closing event
Misbehaving clients that shall not be named here may call
GameWindow.Close() inside the GameWindow.Closing event. This causes
recursion in SDL2, crashing the application.

This patch adds a guard to protect against recursion when calling
GameWindow.Close().
2013-12-16 10:37:59 +01:00
Stefanos A 39a216f1ac Added overloads for compatibility with svn r3127
Several projects are still using the last svn revision from the
sourceforge repository (r3127). These overloads provide an upgrade path
from r3127 to OpenTK 1.1.
2013-12-16 01:55:05 +01:00
Stefanos A 6e110cb820 Normalized xml doc file paths 2013-12-15 23:24:17 +01:00
Stefanos A a46f895cda Fixed build in Nsis configuration 2013-12-15 22:33:28 +01:00
Stefanos A 78acd27c4c Updated OpenGL documentation to Khronos r24522 2013-12-15 22:32:32 +01:00
Stefanos A 14d815dc8b Fixed deprecation warning 2013-12-15 22:02:32 +01:00
Stefanos A 0db58e36bc Eliminated cls-compliance warnings in BlittableValueType 2013-12-15 22:02:21 +01:00
Stefanos A f579d0fd81 Eliminated cls-compliance warnings in the math library 2013-12-15 22:02:08 +01:00
Stefanos A aeb7a72d79 Eliminated CLS-compliance warnings in the bindings 2013-12-15 22:01:45 +01:00
Stefanos A e9f54dc61e Fixed memory corruption on string return type marshaling 2013-12-15 20:57:25 +01:00
parallels b31e0e8474 Compatibility fixes for Mono 2.10
The Mono 2.10 compiler fails when compiling extern methods that are not
marked as DllImport. We fix that by adding a method body that throws a
NotImplementedException instead.

Additionally, MonoDevelop 2.8 cannot open sln files with ToolsVersion 12.
The fix is to change ToolsVersion to 11.
2013-12-15 18:27:24 +01:00
Stefanos A d0e52f6de7 Maintain backwards compatibility with 1.1 2013-12-15 16:58:33 +01:00
Stefanos A dfd683ef49 Merge master into no-reflect 2013-12-15 16:36:37 +01:00
Stefanos A 5b48564ec2 Ignore missing comments warning
The OpenGL manpages do not include extension methods. Ignore this
warning to let more important ones shine through.
2013-12-06 19:33:03 +01:00
Stefanos A 1d26917758 Updated license information 2013-12-06 09:23:56 +01:00
Stefanos A f1e93005b9 Added methods for 1.0 compatibility 2013-12-06 09:23:43 +01:00
Stefanos A. a4f59f7384 Split binaries for library and supporting tools
Tools now go to the Binaries/Tools/[Debug|Release] directory. OpenTK
remains at BInaries/OpenTK/[Debug|Release].

Mono.Cecil and IKVM now reside under the Dependencies/managed/
directory.
2013-12-05 18:43:47 +01:00
Stefanos A 0bdb871e90 Merge remote-tracking branch 'origin/master' into no-reflect 2013-12-05 14:53:37 +01:00
Stefanos A ca5a5b4d16 Reduce temporary string allocations
Instead of modifying the name of an OpenGL symbol on the managed side,
before copying it to the unmanaged side, we perform the modification
directly on the unmanaged side. This reduces the total amount of
allocations in OpenTK by ~30% (673496 bytes in 10750 objects compared
to 930272 bytes in 15243 objects before this modification.)
2013-12-05 11:20:58 +01:00
Stefanos A. 455a02299e Updated project files
Generate debug symbols on release builds. Remove unused resx file that
referenced WinForms.
2013-12-05 09:03:12 +01:00
Stefanos A e59405dab3 Implemented manual marshaling of string parameters 2013-12-04 22:32:56 +01:00
Stefanos A e2801c8c6c Convert string[] callsites to IntPtr
This fixes the signature mismatch between the new marshaling code and
the callsites.
2013-12-04 21:22:33 +01:00
Stefanos A f15c9ecb95 Implemented marshaling for string arrays
This allows functions such as GL.ShaderSource to run on Mono without
crashing.
2013-12-04 20:33:19 +01:00
Stefanos A 406de0b846 Regenerated bindings 2013-12-03 09:10:45 +01:00
Stefanos A. 58ab194ba8 Fixed centering for non DPI-aware applications 2013-12-02 23:37:22 +01:00
Stefanos A. c480911843 DPI-scaling should affect resolution
The correct resolution will now be reported depending on whether the
application is DPI-aware.
2013-12-02 23:37:00 +01:00
Stefanos A. d215075bff High-resolution mode is enabled by default 2013-12-02 22:34:39 +01:00
Stefanos A. 1475b3d427 Made DPI-awareness configurable (issue #6)
It is now possible to indicate that an application is not DPI-aware. In
that case, OpenTK will let the operating system handle DPI scaling. This
results in worse visuals (pixel doubling) but allows non DPI-aware
applications to continue working.
2013-12-02 22:18:16 +01:00
Stefanos A 48efbed1e3 Added MonoDevelop project policy 2013-12-02 12:00:11 +01:00
Stefanos A 45cdc2c1cd Added manual marshaling for StringBuilder
Mono fails to marshal StringBuilder arguments in unmanaged callsites
invoked through calli. We need to implement the marshaling code
ourselves.
2013-12-02 11:58:41 +01:00
Stefanos A 438f83c8d9 Mark slots with [DllImport]; remove "core" and "delegates" generation
We should be able to use static pinvokes on platforms that do not
provide or require extensions and calli instructions on platforms with
extension APIs. This dinstiction will be implemented as a parameter in
the rewriter.
2013-12-01 21:17:15 +01:00
Stefanos A d6bf7c0d78 Regenerated bindings 2013-12-01 18:28:25 +01:00
Stefanos A. c6d59b1f29 Removed deleted file from project 2013-11-28 23:23:03 +01:00
Stefanos A. 0a39143b3e Removed unused WGL methods
WGL was autogenerated a few years ago but never touched after that.
Since we use a tiny fraction of all available methods, it makes sense to
remove the unused ones. This reduces dll size and improves startup
times.
2013-11-28 23:22:35 +01:00
Stefanos A. c53c0bc66f Added GetProcAddress(IntPtr) overloads
This might allow us to improve startup performance, by avoiding string
marshaling during extension loading.
2013-11-28 23:21:19 +01:00
Stefanos A. 8b8ea714ee Fixed wglGetProcAddress entry point
A typo would cause extension loading to fail. This is now fixed.
2013-11-28 09:04:08 +01:00
Stefanos A. 7775fa64aa Removed unused WGL bindings
Our WGL bindings contained dozens of methods that OpenTK did not use.
Removing these reduces the dll size and improves startup times.
2013-11-27 19:37:59 +01:00
Stefanos A. 9c7e5201db Fixed entry point validity check 2013-11-27 19:36:42 +01:00
Stefanos A. c369bfc75e Use [AutoGenerated] only for generated methods
The rewriter will patch the body of methods marked with [AutoGenerated].
Methods that are implemented manually (e.g. various math helper
overloads) should avoid this attribute.
2013-11-27 08:27:52 +01:00
Stefanos A ac65eb7b09 Added MonoDevelop artifacts 2013-11-27 00:05:26 +01:00
Stefanos A da4de365e8 Regenerated bindings 2013-11-27 00:03:21 +01:00
Stefanos A bb7980b6a9 Update to latest version from git 2013-11-26 19:07:01 +01:00
Stefanos A 4149cdfa88 Do not emit method bodies. 2013-11-26 01:31:29 +01:00
Stefanos A 40f992b5bd Rewrite support for [Slot] attribute 2013-11-26 01:31:10 +01:00
Stefanos A. 84a1e5a739 Initial work on Pin<> statements (WIP) 2013-11-25 20:00:22 +01:00
Stefanos A 997f390ec1 Corrected keyfile path 2013-11-25 08:53:44 +01:00
Stefanos A. 442f8b6131 Added rewrite postbuild event 2013-11-25 00:58:39 +01:00
Stefanos A. e65f206554 Fixed core loading on Windows
On Windows, entry points for OpenGL 1.0 and 1.1 are not exposed by
wglGetProcAddress. We fall back to LoadLibrary+GetProcAddress when
wglProcAddress fails.
2013-11-25 00:26:20 +01:00
Stefanos A. 0434f623e1 Added InteropHelper file 2013-11-25 00:20:22 +01:00
Stefanos A. 74159da199 Regenerated bindings 2013-11-25 00:19:18 +01:00
Stefanos A. 1e6a819b07 Removed GLObsolete.cs helper
This file must be recreated using the new loading mechanism.
2013-11-24 13:59:15 +01:00
Stefanos A. 811b04e880 Regenerated bindings with new loading mechanism 2013-11-24 13:58:54 +01:00
Stefanos A. fec958c8dc Hooked up new loading mechanism 2013-11-24 13:58:30 +01:00
Stefanos A. 657c447737 Hooked up new loading mechanism 2013-11-24 13:58:12 +01:00
Stefanos A. 825ed3621f Implemented new loading mechanism 2013-11-24 13:57:43 +01:00
Stefanos A. 7a57c9c3d2 Clarified GetAddress documentation 2013-11-24 13:57:23 +01:00
Stefanos A. 475e7ea797 Allow overriding of loading methods 2013-11-24 13:57:08 +01:00
Stefanos A. 1e71ca9122 Removed delegates and DllImports 2013-11-24 13:56:35 +01:00
Stefanos A 8ee2152709 Moved delegate loaders to the Delegates class 2013-11-23 17:23:26 +01:00
Stefanos A 03a26ed12f Regenerated bindings with lazy loading 2013-11-22 20:07:01 +01:00
Stefanos A 5d0e7a4acf Moved GetExtensionDelegate to the correct position 2013-11-22 20:06:28 +01:00
Stefanos A ffe934fa5d Added static GetExtensionDelegate implementation 2013-11-22 20:06:04 +01:00
Elias Holzer 6ee04b2ff9 Implemented KeyPress event for Sdl2NativeWindow. 2013-11-22 18:05:11 +01:00
Elias Holzer f851d8887c Implemented KeyDown and KeyUp events for Sdl2NativeWindow. 2013-11-22 18:04:53 +01:00
Elias Holzer 38532804ec Enabled KeyDown and KeyUp events in NativeWindow. 2013-11-22 18:03:17 +01:00
Stefanos A 2ace001203 Implemented direct binding loading
OpenTK normally uses reflection to load bindings, instead of generating
huge constructors. Although reflection is faster on first load (thanks
to reduced JIT overhead), it fails to work correctly with monolinker.
This branch explores the performance of a direct binding.
2013-11-22 17:32:17 +01:00
Stefanos A. e2404d2cfc Fix "CursorVisible bugs"
When we enter the modal resize loop on Windows with ClipCursor set, we
cause a feedback loop where every resize causes the cursor to move and
every move causes a new resize. To fix this, we need to ungrab the
cursor when we are enter the modal loop.
2013-11-22 14:10:21 +01:00
Stefanos A. b7af883cff Fix exceptions on reused OpenGL context handles
Implementations may reuse OpenGL context handles that have been
destroyed. If a context is finalized but not Disposed, then OpenTK may
keep a reference to the old context handle, causing a crash when the
same handle is returned for a new context. To fix that, new context
handles will now replace old handles in case of a clash.
2013-11-21 09:34:06 +01:00
Stefanos A. 08701d318c Destroy SDL window when finalized
SDL_DestroyWindow must be called on the main thread. If the window is
finalized, the finalizer will push a CLOSE event to the event loop
(thread-safe) and the window will be destroyed on the main thread.
2013-11-21 09:31:32 +01:00
Stefanos A. 75d4f3d07c Fixed #5
We need to release the cursor before closing a GameWindow, otherwise
subsequent GameWindows may fail to receive mouse events.
2013-11-20 18:05:45 +01:00
Stefanos A. 486130c01e Toolkit.Init() now returns a concrete class
This gives us room for expansion in the future, if necessary.
2013-11-20 13:12:42 +01:00
Stefanos A. 1d19a80b53 Removed incorrect comment 2013-11-20 13:05:49 +01:00
Stefanos A. 48803bb4d6 Fixed #4
Sdl2InputDriver.Dispose() would call SDL_DelEventWatch with a different
"user_data" parameter than SDL_AdEventWatch. This caused the EventFilter
to remain registered and subsequently crash when closing and reopening a
window.
2013-11-20 09:10:12 +01:00
Stefanos A 255f4e9083 Completed compatibility overloads for OpenTK 1.0 2013-11-20 08:16:07 +01:00
Stefanos A 02120f429f Do not trim 's' from Groups 2013-11-20 08:16:06 +01:00
Stefanos A. 8c5887e996 Aligned GL core and compat enums 2013-11-18 18:51:38 +01:00
Stefanos A. 32828ecd8a Do not call SDL.GetVersion unless requested 2013-11-18 18:35:23 +01:00
Stefanos A ac0fab7760 More compatibility overloads for OpenGL 2013-11-18 18:32:36 +01:00
Stefanos A. e7f70330b2 Implemented IEquatable<ColorFormat>
This eliminates memory allocations when storing and comparing
ColorFormat structures.
2013-11-18 13:49:06 +01:00
Stefanos A 3d50554903 Added OpenGL overloads for OpenTK-1.0 compatibility 2013-11-18 13:28:44 +01:00
Stefanos A e572f418af Added compatibility overloads for ES 2.0 2013-11-18 01:10:01 +01:00
Stefanos A 01d40c551a Aligned FBO API with desktop OpenGL 2013-11-17 23:57:38 +01:00
Stefanos A 358bcd4f88 Regenerated bindings 2013-11-17 01:49:10 +01:00
Stefanos A f9deeaead7 Improved compatibility with OpenTK 1.0
Added overloads for enumerations with name changes. Reduced differences
between ES and GL APIs.
2013-11-15 01:59:50 +01:00
Stefanos A 431202d830 Corrected convenience wrappers for Get* and Delete*
GetBoolean, GetInteger6, GetFixedvOES and Delete* are now matched in
the convenience wrapper generator. Methods returning vectors of fixed
size (e.g. 4 ints) are no longer matched.
2013-11-14 17:40:06 +01:00
Stefanos A. 0ee72856e4 Added workaround for wglMakeCurrent error 6
On some drivers and virtual machines, wglMakeCurrent may fail with a
code 6 when first called. The suggested workaround is to call it in a
loop until it succeeds. See
https://www.opengl.org/discussion_boards/showthread.php/171058-nVidia-wglMakeCurrent()-multiple-threads
2013-11-14 17:37:39 +01:00
Stefanos A 4fd6347de7 Mark untyped overloads as obsolete 2013-11-14 14:10:19 +01:00
Stefanos A b975eccd45 Regenerated bindings 2013-11-14 11:35:32 +01:00
Stefanos A. 21069ee34c Do not scale in normal-dpi modes 2013-11-14 09:25:53 +01:00
Stefanos A. 7c8cc5f746 Scale window size on hi-dpi mode
Follow high-dpi guidelines for scaling a window on high-dpi modes.
2013-11-14 09:02:47 +01:00
Stefanos A. 94e2649704 Cleaned up context profile selection
Added support for WGL_create_context profiles and added methods for the
selection of context flags and profile.
2013-11-14 08:30:11 +01:00
Stefanos A. 803c575201 Corrected core profile selection
According to GLX_create_context, the correct flag for a core profile is
GLX_CONTEXT_CORE_PROFILE_BIT_ARB.
2013-11-14 08:29:06 +01:00
Stefanos A. f142dbdfc3 Improved WinGLContext initialization
Cleaned up and added debugging information to the temporary context
construction in WinGLContext. Simplified WinGraphicsMode constructor.
2013-11-14 08:05:08 +01:00
Stefanos A. 5d6ca5c7da Added GetDeviceCaps (windows platform)
We will use this method to read out the logical DPI of the monitor and
scale window elements accordingly.
2013-11-14 01:43:40 +01:00
Stefanos A. f9fdddea64 Re-added WindowHandle property
There are projects that use reflection to access
*WindowInfo.WindowHandle directly. This change ensures we don't break
them.
2013-11-13 18:25:49 +01:00
thefiddler 1792f7bf29 Added Version20 overload to StencilFuncSeparate
Compatibility fix for OpenTK 1.0
2013-11-12 23:39:43 +01:00
Stefanos A. b9fcf7c3c3 Cleaner startup sequence
OpenTK.Toolkit will now initialize OpenTK.Configuration and
OpenTK.Platform.Factory explicitly. It can also receive an optional
ToolkitOptions parameter to influence the OpenTK.Platform implementation
that will be chosen. Finally, it explicitly implements IDisposable to
clean up after itself.
2013-11-12 20:34:53 +01:00
Stefanos A. 663864f083 Refactored environment config detection
This significantly cleans up the startup sequence on all platforms:
- X11 is not detected on non-Linux platforms unless the user explicitly
requests it
- Supports selection of platform abstractions (SDL) vs native
implementations.
- Returns correct flags on Android and iOS.

This contains a semantic change: OpenTK.Configuration will not return
correct values until OpenTK.Toolkit.Init() has been called, either
directly or indirectly (e.g. by creating a window.)
2013-11-12 20:32:31 +01:00
Stefanos A. 7503a87b3f Added ToolkitOptions class
ToolkitOptions allows the user to influence the implementation of
OpenTK.Platform at runtime.
2013-11-12 20:22:08 +01:00
Stefanos A 25f3305f3e Merge branch 'modes' 2013-11-11 11:45:15 +01:00
Stefanos A. 0d0f578788 Enabled SAMPLE_BUFFERS EGL attribute
This attribute is required for multisampling support.
2013-11-11 11:42:30 +01:00
thefiddler 8360b7a2ba Generate overloads without strong enums for 1.0 compat
OpenTK 1.0 and Xamarin Android/iOS do not use strongly-typed enums for
OpenGL ES. Generate overloads with the "All" enum in order to maintain
compatibility.
2013-11-11 10:03:24 +01:00
thefiddler 2c9d574b08 Merge branch 'modes' of https://github.com/thefiddler/opentk 2013-11-10 19:11:05 +01:00
Stefanos A. c66b22a1f3 Updated convenience overloads 2013-11-10 19:04:18 +01:00
Stefanos A. 8003d06315 Move convenience overloads to generator
The generator now handles the creation of convenience overloads. These
must be removed from the helper classes to avoid redefinition errors.
2013-11-10 15:36:53 +01:00
Stefanos A. 11c1071625 Corrected declarations in convenience overloads 2013-11-10 10:08:04 +01:00
Stefanos A. 089c108ea0 Corrected indentation 2013-11-10 09:20:54 +01:00
Stefanos A. 5aad11f6ee Generate bindings for testing (WIP2) 2013-11-10 09:18:15 +01:00
Stefanos A. 06ad3bf1dc Generate bindings for testing (WIP) 2013-11-10 09:14:30 +01:00
Stefanos A dc093f8fa9 Added mapping for libXi
On Debian-based distributions, libXi.so does not exist. We have to lookup libXi.so.6 instead.
2013-11-09 18:55:35 +01:00
Stefanos A b08e59e861 Allow non-realized GraphicsMode
It is now possible to pass a non-realized GraphicsMode to the X11GLContext and X11GLNative constructors. A non-realized GraphicsMode is a GraphicsMode with a null Index (i.e. which has not passed through SelectGraphicsMode()).
2013-11-09 18:55:17 +01:00
parallels 62d6791736 Use glXGetProcAddressARB
According to the Linux OpenGL ABI, glXGetProcAddressARB must be statically exported by libGL. This does *not* hold true for glXGetProcAddress. We must used the ARB version instead.
Furthermore, glx entry points, unlike wgl, do not depend on any specific OpenGL context. This means we can load them in the constructor of the Glx class.
2013-11-09 18:50:53 +01:00
parallels 7f921dae47 Merge branch 'master' of https://github.com/thefiddler/opentk into modes 2013-11-09 17:15:05 +01:00
parallels da684d233e Swallow DllNotFoundException in Sdl2 constructor 2013-11-09 17:13:24 +01:00
Stefanos A 95316829ec Updated WGL init sequence
WinGraphicsMode no longer creates a temporary context in order to create
the list of available modes. Instead, it requires to be passed an
existing context in its constructor.

WinGLContext now creates one temporary context in its static constructor
and hands that to WinGraphicsMode.

WinFactory no longer supports the CreateGraphicsMode API. This API will
be removed in the future, because the link because contexts and modes
cannot be separated in the general case.
2013-11-09 15:07:19 +01:00
Stefanos A 0f01a6d128 Stronger check for ES support
It is not enough to check for EGL, we also need to check that
ContextProfileFlags.ES is set.
2013-11-09 15:07:18 +01:00
Stefanos A ec2c64ee15 Remove static init of GetCurrentContext
The static initializer of GetCurrentContext would always default to the
desktop PlatformFactory, which caused problems when trying to run OpenGL
ES code on the desktop. The initializer is now removed and
GetCurrentContext is set in the context constructor, before creating any
contexts.
2013-11-09 15:07:17 +01:00
Stefanos A 440e3fe248 Load ES30 and OpenGL4 entry points 2013-11-09 15:07:16 +01:00
Stefanos A 2725b3cd08 Fix support for 3.2+ contexts (issue 3111)
glXGetProcAddress may return a non-null value even if a function is not
supported by the server. We need to check the extension string using
any GLX extensions. Fixes issue http://www.opentk.com/node/3111 "GLX
extension support is not checked correctly".

Furthermore, mode selection is now performed explicitly by the
X11GLContext constructor.
2013-11-09 11:16:14 +01:00
Stefanos A 3c71634667 Temp context not necessary for GLX
GLX entry points are not bound to a specific context. This means that, unlike WGL, GLX does not require a temporary context in order to load its entry points!
2013-11-09 11:07:37 +01:00
Stefanos A 6edaf8c3cf Deduplicate MacOSGraphicsMode and AglContext
The IGraphicsMode interface is gradually being removed and the
MacOSFactory will now throw an exception if an instance is requested.
AglContext no longer duplicates MacOSGraphicsMode functionality.
2013-11-08 18:44:02 +01:00
Stefanos A f77a6b11c3 SDL_GL_GetAttribute requires a valid context
Calling SDL_GL_GetAttribute when context construction has failed leads
to erroneous behavior. This call should only be made when a context has
been constructed correctly.
2013-11-08 17:31:54 +01:00
Stefanos A 5b5a395bbd Merge branch 'master' of https://github.com/thefiddler/opentk into modes 2013-11-08 16:41:20 +01:00
Stefanos A 49df5ff453 Do not generate delegates for overloads
We should only generate delegates for actual OpenGL entry points, not
for overloaded functions that resolve to the same entry point. This
improves loading speeds and reduces the size of the compiled dll.
2013-11-08 16:40:43 +01:00
Stefanos A 5a2fc1e411 Added missing doc comment 2013-11-08 15:33:41 +01:00
Stefanos A e0ffd9b42d More sane Sdl2Factory.CreateGetCurrentContext() implementation 2013-11-08 15:26:52 +01:00
Stefanos A 29fe1052de Added SDL_GL_GetCurrentContext method and TouchMouseID constant.
SDL_GL_GetCurrentContext will allow us to replace the weird
implementation in Sdl2Factory.CreateGetCurrentGraphicsContext()
and the latter to disable mouse emulation if we wish to.
Conflicts:
	Source/OpenTK/Platform/SDL2/Sdl2.cs
2013-11-08 15:25:42 +01:00
Stefanos A eba7e59253 Fixed ES rendering. 2013-11-08 10:56:45 +01:00
Stefanos A 28fa768257 Fixed platform detection for Android
Conflicts:
	Source/OpenTK/Configuration.cs
2013-11-08 10:54:50 +01:00
Stefanos A. a51540e8d9 Updated WGL init sequence
WinGraphicsMode no longer creates a temporary context in order to create
the list of available modes. Instead, it requires to be passed an
existing context in its constructor.

WinGLContext now creates one temporary context in its static constructor
and hands that to WinGraphicsMode.

WinFactory no longer supports the CreateGraphicsMode API. This API will
be removed in the future, because the link because contexts and modes
cannot be separated in the general case.
2013-11-08 10:46:27 +01:00
Stefanos A. c9b905d235 Stronger check for ES support
It is not enough to check for EGL, we also need to check that
ContextProfileFlags.ES is set.
2013-11-08 10:42:48 +01:00
Stefanos A. 2cd91bd0a0 Remove static init of GetCurrentContext
The static initializer of GetCurrentContext would always default to the
desktop PlatformFactory, which caused problems when trying to run OpenGL
ES code on the desktop. The initializer is now removed and
GetCurrentContext is set in the context constructor, before creating any
contexts.
2013-11-08 10:41:58 +01:00
Stefanos A. a12b394607 Load ES30 and OpenGL4 entry points 2013-11-08 10:39:08 +01:00
Stefanos A. 03c04fd308 Workaround for issues #4 and #6
GraphicsMode.Default used to be set to
(DisplayDevice.Default.BitsPerPixel, 16, 0, 0, 0, 2, false) for improved
compatibility with older systems. However, this appears to be causing
issues with specific modern GPUs. Switch the default mode to (32, 24, 8)
until a more proper solution can be found.
2013-11-07 18:42:17 +01:00
Stefanos A b6610001ea Merged ES 2.0 extension tokens to ES 3.0
By adding ES 2.0 extensions tokens to ES 3.0, we have a very
straightforward update path to move an application from the older API
to the newer.
2013-11-07 16:54:39 +01:00
Stefanos A be8f7c6311 Corrected ES 2.0 enums
After the previous commit, several ES 2.0 functions would refer to
enums found in ES 3.0. These enums have been copied to ES 2.0, either
as core enums or as extensions.
2013-11-07 16:25:19 +01:00
Stefanos A 735d05e496 Merged ES2.0 and ES3.0 replacements
ES 3.0 includes ES 2.0 verbatim. We can significantly reduce
duplication by using the same <replace> node for both APIs. Note that
the enumerations must remain separate, as ES 2.0 and 3.0 support
different tokens.
2013-11-07 11:37:51 +01:00
Stefanos A 7c54a19708 ES 3.0 fixed enums for GetIntegeri_v and GetInteger64i_v
These functions have a first parameter named "target", not "pname".
Fixed now.
2013-11-07 10:58:02 +01:00
Stefanos A e59c95f2f9 ES 3.0 fixed enums for GetInteger64*
GetInteger64v should accept GetPName, while GetInteger64i_v should
accept GetIndexedPName.
2013-11-07 10:39:20 +01:00
Stefanos A 8de24c97fb ES 3.0 strong enums for DrawBuffersEXT and NV
Relax the extension constraint in DrawBuffers, in order to add strong
enums to the extension varieties of this function.
2013-11-07 10:33:02 +01:00
Stefanos A 2d1df46d98 ES 3.0 strong enums for DrawArrays*() and Draw*Elements*()
The strongly-typed enums include core and extension varieties.
2013-11-07 10:17:33 +01:00
Stefanos A 0002b2e23e Fixed typo in ES3Generator.cs
The DllImports file should be named ES30Core.cs, not ES3Core.cs. Fixed
now.
2013-11-07 10:09:17 +01:00
Stefanos A 0f98f0e00b Fixed misspelled and missing enums 2013-11-07 09:47:27 +01:00
Stefanos A 93b8d4b86e Fixed enums for (Get)ObjectLabel
ObjectLabel and GetObjectLabel are part of KHR_debug.
2013-11-07 09:34:48 +01:00
Stefanos A 0598e02140 Fixed enums for GetDebugMessageLog
GetDebugMessageLog was misspelled as GetMessageDebugLog. This is now
fixed.
2013-11-07 08:39:57 +01:00
Stefanos A de38df8820 Fixed strong-enums for GetDebugMessageLog
GetDebugMessageLog is part of KHR_debug.
2013-11-07 08:36:23 +01:00
Stefanos A a2f2ab29ea Fixes for ES 3.0 strongly-typed enums
Fixed parameter mismatches in CopyBufferSubData and BlendFuncSeparate.
Implemented KHR_debug extension.
2013-11-07 08:33:17 +01:00
Stefanos A 2f3d79d464 Merge branch 'master' of https://github.com/thefiddler/opentk 2013-11-07 08:15:18 +01:00
Stefanos A 2b4d10ffd7 Strongly-typed enums for ES 3.0 (complete)
Implemented sectiosn: Pixel Rectangles. Binding & Managing Framebuffer
Objects, Renderbuffer Objects, Attaching Renderbuffer Images to
Framebuffer, Attaching Texture Images to Framebuffer, Framebuffer
Completeness, Invaildating Framebuffer Contents, Renderbuffer Object
Queries, Simple Queries, String Queries.
2013-11-07 08:14:49 +01:00
Stefanos A. 62c9793a6e Fixed number of buffers
ContextAttribute.DOUBLEBUFFER is a boolean in SDL (false->single
buffering, true->double buffering). We need to adjust the number of
buffers accordingly (single buffering->1 buffer, double buffering->2
buffers).
2013-11-06 01:04:59 +01:00
Stefanos A 21a1ca8895 Switch to EnumDisplayModesEx
Use EnumDisplayModesEx instead of EnumDisplayModes. This might help
with issue #6.
2013-11-05 23:41:42 +01:00
Stefanos A a4f125f16e Added workaround for issue #6
The issue is that some display devices report a BitsPerPel value of 0.
It is not clear whether this is a bug in WinDisplayDevice.cs or some
strange windows issue. The implemented workaround adds an entry to the
debug log and hardcodes BitsPerPel to 32 whenever this condition is
encountered. More investigation required.
2013-11-05 23:21:49 +01:00
Stefanos A 1a02457ddc Strongly-typed enums for ES 3.0 (WIP8)
Implemented sections: Hints and Sync Object Quries.
Renamed SyncParameter to SyncParameterName, as per the OpenGL naming
conventions.
2013-11-05 10:23:25 +01:00
Stefanos A 167c97dd84 Strongly-typed enums for ES 3.0 (WIP7)
Implemented section: Sync Objects and Fences [5.2].
Fixed desktop OpenGL wrapper for ClientWaitSync and FenceSync.
2013-11-05 09:53:34 +01:00
Stefanos A ad1755f58e Moved overload to overrides.xml
Overloads for backwards compatibility should now be placed in an
<overload> element inside overrides.xml.
2013-11-05 09:44:20 +01:00
Stefanos A 2511cb1086 Implemented support for <overload> element
The <overload> element simplifies the addition of overloads for
backwards compatibility. It is defined similar to the <replace>
element, but instead of replacing the parameters of a function
in-place, it adds a new overload and modifies the overload instead.
2013-11-05 08:55:52 +01:00
Stefanos A 25b9939263 Strongly-typed enums for ES 3.0 (WIP6)
Implemented strongly-typed enums for sections: Selecting a Buffer for
Writing, Fine Control of Buffer Updates, Clearing the Buffers.
2013-11-04 23:25:02 +01:00
Stefanos A 372dac9c48 Strongly-typed enums for ES 3.0 (WIP5)
Implemented sections: Stencil Test, Depth Buffer Test, Blending.
2013-11-04 23:01:25 +01:00
Stefanos A dcd2d03e59 Strongly-typed enums for ES 3.0 (WIP4)
Implemented sections: Texture Image Specification, Alternative Texture
Image Specification, Compressed Texture Images, Texture Parameters,
Manual Mipmap Generation and Enumerated Queries.
2013-11-04 22:27:06 +01:00
Stefanos A 20e70062f8 Strongly-typed enums for ES 3.0 (WIP3)
Implemented sections: Texturing, Sampler Objects, Sampler Queries,
Texture Image Specification.
2013-11-04 19:49:25 +01:00
Stefanos A 9b5be9300b Strongly-typed enums for ES 3.0 (WIP2)
Added strongly-typed enums for sections: Vertices, Shaders and
Programs. Added a number of missing enums for ES 2.0. Normalized
several APIs between OpenGL and OpenGL ES.
2013-11-04 00:04:09 +01:00
Stefanos A af78a01643 Strongly-typed enums for ES 3.0 (WIP)
Implemented strongly-typed enums for sections: Buffer Objects,
Asynchronous Queries, Transform Feedback, ReadingandCopying Pixels and
Rasterization.
2013-11-03 21:30:25 +01:00
Stefanos A 7978627ad4 Merge Delegate.Version
When a Delegate is defined multiple times in the spec, we should check
if any of these definitions contains a proper Delegate.Version and
store that. This improves the self-documentation aspect of the bindings.
2013-11-03 20:41:29 +01:00
Stefanos A 7322828304 Regenerated the bindings using the latest specs 2013-11-03 20:36:22 +01:00
Stefanos A. 6f08995963 Added PrimitiveType <=> BeginMode overloads
Khronos renamed BeginMode to PrimitiveType starting with GL 4.4.
OpenTK now has overloads for both flavors.
2013-11-03 16:11:39 +01:00
Stefanos A 60f971ffed Updated to the latest gl4 specs and docs
Large code-drop from Khronos upstream.
2013-11-03 12:43:50 +01:00
Stefanos A 7c3e29012f Bindings for GL4.4, ES1.1, ES2.0 and ES3.0
The new bindings are based on the fresh gl.xml registry by the Khronos
group.
2013-11-03 12:34:19 +01:00
Stefanos A f835c63444 Added DebugProc for KHR_debug 2013-11-03 12:33:17 +01:00
Stefanos A. 6c16835d8c Added doc comment on ColorFormat.Empty. 2013-11-03 01:44:31 +01:00
Stefanos A. 0746334ab3 Regenerated bindings with the latest generator
The new bindings have improved enum documentation and fix an issue with
incorrect overloads in wrappers with generic parameters.
2013-11-01 09:29:42 +01:00
Stefanos A. 97ca64121c Made IsFlagsCollection read-write
The decision whether an Enum is a flags collection is now made either by
the spec reader or the enum processor (not the Enum class itself.)
2013-10-27 17:35:36 +01:00
Stefanos A. 2444ccf082 Improve override lookup for extension functions.
Function overrides are now looked up in the following order: specific
name (e.g. ProgramParameteriARB), extensionless name (e.g.
ProgramParameteri) and generic mame (e.g. ProgramParameter). This
improves the override resolution for functions with multiple extension
forms (core, ext, arb, etc).
2013-10-27 02:35:53 +02:00
Stefanos A. 816f1e5c7f Fixed the DebugProc signatures.
The various DebugProc* delegates now conform to their specifications.
2013-10-27 01:32:08 +02:00