Commit graph

334 commits

Author SHA1 Message Date
the_fiddler b92198bccc Avoid accessing OpenTK.Graphics.OpenGL from platform-specific code. Reduces coupling and code-duplication. 2009-10-21 10:16:32 +00:00
the_fiddler 65e9d6d969 * X11GLNative.cs: Added more defensive checks for the existence of the window before issuing XDestroyWindow.
Do not allow multiple calls to XDestroyWindow once the shutdown sequence has been initialized. Fixes issue [#1190]: "GameWindow dispose on linux".
2009-10-19 19:46:37 +00:00
the_fiddler de37859604 * X11GLNative.cs: Correctly set all necessary ClientMessage fields
for XSendEvent call in Close() method.
2009-10-19 19:03:17 +00:00
the_fiddler 4743a9e810 * Functions.cs: Added helper function for XSendEvent, so that we
don't need to cast the EventMask to IntPtr.
2009-10-19 19:02:07 +00:00
the_fiddler 5ba821a09a * X11GLContext.cs: Correctly set GraphicsMode in constructor (resolves issue [#1175]: "Graphics] GraphicsContext.GraphicsMode property returns null on Linux"). 2009-10-19 18:11:32 +00:00
the_fiddler 17feb8d6d0 * X11GLNative.cs: Implemented Icon property for WMs that do not
respect _NET_WM_ICON (e.g. Gnome/Metacity/Compiz).
2009-10-19 10:42:28 +00:00
the_fiddler 5ba2c0258d * Functions.cs: Added a number of missing methods relating to
XWMHints, images, pixmaps and root windows.
Implemented Create[Mask|Pixmap]FromImage methods.

* Structs.cs: Added ImageFormat enum.
2009-10-19 10:41:41 +00:00
the_fiddler 672b3cf774 * Graphics/ES10/Helper.cs:
* Graphics/ES11/Helper.cs:
* Graphics/ES20/Helper.cs:
* Graphics/BindingsBase.cs:
* Platform/X11/GlxHelper.cs:
* Graphics/OpenGL/GLHelper.cs:
* Platform/X11/X11GLContext.cs: Modified BindingsBase to define
  abstract GetAddress method (reason: removes OpenTK.Graphics-specific
  code from BindingsBase and allows it to be used in different
  bindings).
Implemented GraphicsBindingsBase and modified the OpenGL and OpenGL|ES
  bindings to use this.
Modified the GLX bindings to inherit from BindingsBase (reason:
  reduces code duplication for extension loading).
2009-10-07 10:44:45 +00:00
the_fiddler c559de1956 * X11GraphicsMode.cs: Protect the mode queries with XLockDisplay()/XUnlockDisplay(). 2009-09-25 08:28:51 +00:00
the_fiddler 23dce5479d * X11KeyMap.cs: Removed dependency on System.Windows.Forms. 2009-09-13 16:34:03 +00:00
the_fiddler dd383f477a Removed obsolete OnCreate and OnDestroy methods/events. 2009-09-04 23:23:46 +00:00
the_fiddler 45d2638614 Removed unnecessary CLSCompliant attributes. 2009-09-04 23:22:44 +00:00
the_fiddler 8b60cc2018 Made GraphicsMode.Index public, as it is necessary when extending OpenTK.
Removed OpenTK.Platform.Utilities.CreateWindowInfo and made the platform-specific CreateWindowInfo methods public (e.g. CreateX11WindowInfo).
Moved Mono Windows.Forms-specific code into X11GLControl.
Removed OpenTK.Platform.Utilities.IsIdle.
Removed obsolete methods from OpenTK.Platform.Utilities.
Marked OpenTK.Platform.Utilities.CreateGraphicsContext as obsolete (use GraphicsContext constructor instead).
Made IWindowInfo implementations private.
2009-09-04 21:11:25 +00:00
the_fiddler d6c4c801e1 Fixed line endings and set svn:eol-style to native and svn:mime-type to text/plain for .cs files. 2009-09-03 19:01:11 +00:00
the_fiddler 95c88baf3d * Source/OpenTK/Platform/Egl/EglContext.cs:
* Source/OpenTK/Graphics/GraphicsContext.cs:
* Source/OpenTK/Graphics/IGraphicsContext.cs:
* Source/OpenTK/Platform/MacOS/AglContext.cs:
* Source/OpenTK/Platform/X11/X11GLContext.cs:
* Source/OpenTK/Graphics/GraphicsContextBase.cs:
* Source/OpenTK/Platform/Windows/WinGLContext.cs:
* Source/OpenTK/Platform/Dummy/DummyGLContext.cs: Added IsDisposed
  property to IGraphicsContext and implemented in all context classes.
  Removed 'bool disposed' fields from these classes in favor of the
  new property.
2009-09-03 12:23:11 +00:00
the_fiddler 8de1f8b0c8 * X11GLContext.cs: Remove context field in favor of GraphicsContextBase.Handle. Fixes issue 1121: "GraphicsContext fails with KeyNotFoundException on SVN trunk". 2009-08-25 09:03:19 +00:00
the_fiddler d72a75f2fc Moved OpenTK.GLControl to its own project. 2009-08-19 14:17:47 +00:00
the_fiddler 244084c99e Moved GdiPlus wrappers to OpenTK.Compatibility.
Moved TextPrinter to OpenTK.Compatibility.
2009-08-17 10:29:51 +00:00
the_fiddler b1915d8ef3 Removed Destroy event and RegisterForDisposal method from IGraphicsContext.
Added GraphicsContextBase, which acts as the foundation of all IGraphicsContext implementations.
Added DesktopGraphicsContext, which acts as the foundation of all desktop (i.e. not ES) IGraphicsContext implementations.
Modified all IGraphicsContext implementations to inherit from GraphicsContextBase and/or DesktopGraphicsContext.
2009-08-17 10:23:16 +00:00
the_fiddler 5e80a061b8 Implemented INativeWindow.WindowBorderChanged and INativeWindow.WindowStateChanged events. 2009-08-17 09:34:15 +00:00
the_fiddler 0204082308 Modified GraphicsMode.Index to be a nullable property. Modified consuming classes to check Index.HasValue prior to first use. 2009-08-15 16:44:43 +00:00
the_fiddler 0e02f67749 Moved OpenTK.Graphics.GL class to the OpenTK.Graphics.OpenGL namespace (reason: necessary for OpenGL|ES support; necessary for support of different OpenGL profiles). OpenTK.Graphics.GL has been moved to the OpenTK.Compatibility library.
Removed OpenTK.Graphics.Glu class (reason: deprecated upstream; most functionality provided by OpenTK math; not compatible with OpenGL 3.0+.) OpenTK.Graphics.Glu can be accessed through OpenTK.Compatibility.
Added OpenGL|ES-specific ErrorHelper classes.
Moved OpenTK.Graphics.DisplayDevice and OpenTK.Graphics.DisplayResolution to the root OpenTK namespace (reason: their functionality is not specific and does not depend on OpenTK.Graphics).
Split Graphics*Exception classes into different files.
Made GraphicsErrorException public (reason: necessary for OpenTK.Compatibility).
2009-08-14 13:13:28 +00:00
the_fiddler 6e7c2a2e3e Suppressed documentation warnings and ensured public structures follow the class library design guidelines. 2009-08-11 21:11:39 +00:00
the_fiddler 4b9e25af03 Made types used by X11WindowInfo public. 2009-08-11 21:02:52 +00:00
the_fiddler a8f099e035 Added missing license information and removed unused code. 2009-08-11 20:57:54 +00:00
the_fiddler 11027985ad Merged fix for issue [#1074]: " X11XrandrDisplayDevice on Xming ---> Argument is out of range." from 0.9.8 branch. 2009-08-10 11:36:26 +00:00
the_fiddler 87e925f057 Merged improved XRandR handling from 0.9.8 branch. 2009-08-04 09:35:31 +00:00
the_fiddler a3f61f6d65 Marked all IPlatformFactory interface implementations as virtual. 2009-07-24 21:52:01 +00:00
the_fiddler 4847646cc8 Added INativeWindow.CreateKeyboardDriver()
Added INativeWindow.KeyPress event (KeyPressEventArgs).
Removed INativeWindow.Icon property.
2009-07-19 17:49:51 +00:00
the_fiddler f42775f482 Replaced tabs with spaces. 2009-07-19 16:09:46 +00:00
the_fiddler 170568c57d Fixed XML docs and remove unnecessary CLSCompliance attributes. 2009-06-28 10:52:58 +00:00
the_fiddler 77788d19a4 Implemented multisampling on X11. 2009-06-26 20:01:22 +00:00
the_fiddler 8c800d619d Removed obsolete code.
Implemented X11GLNative.IconChanged event.
2009-06-24 14:42:40 +00:00
the_fiddler 783c38446b Marked platform-specific APIs as internal.
Added ObsoleteAttribute to obsolete functionality.
2009-06-04 11:21:33 +00:00
the_fiddler fc5db8a9a6 Made X11 structs, enums and functions internal. OpenTK should not expose platform-specific APIs. 2009-06-04 10:57:26 +00:00
the_fiddler cb661c2dca Merged gw-next2 branch to trunk. 2009-06-02 15:49:39 +00:00
the_fiddler 93f6050fe6 Replaced XAutoRepeatOff by XkbSetDetectableAutoRepeat, because the former must be reset before the program exits (and this is not always possible). 2009-05-30 21:41:45 +00:00
the_fiddler 4334ab38e7 Added XAutoRepeatOn() method. 2009-05-30 21:40:42 +00:00
the_fiddler b7390e11d2 Added GraphicsContext.GetCurrentContextDelegate to IPlatformFactory.
Improved CreateDummyContext logic to detect and use the context handle of the current thread or a specified handle.
Removed GetCurrentContext() methods from platform-specific context implementations (everything now goes through the relevant IPlatformFactories).
2009-05-30 19:27:52 +00:00
the_fiddler 6699b7ea9f Added call to XAutoRepeatOff() to disable keyboard autorepeat on X11Input. 2009-05-30 18:15:13 +00:00
the_fiddler 2f54b29ed8 Added initial support for GameWindow.PointToClient. 2009-05-07 19:48:22 +00:00
the_fiddler eb183f4cfe Added stack traces to automatic error checking.
Added GraphicsContext.ErrorChecking property to temporarily disable error checking if necessary.
Error checking is now added to all functions in debug mode (the generator would miss specific CLS-compliant overloads before).
2009-03-29 21:41:30 +00:00
the_fiddler 9265747541 Fixed all known build warnings, apart from missing xml comments. 2009-03-25 21:53:12 +00:00
the_fiddler c0f573f996 * X11GLNative.cs: Ensure that Width and Height properties return valid values in the OnLoad event. 2009-03-23 11:57:49 +00:00
the_fiddler 93a467a11f Moved GraphicsMode to IGraphicsContext as it is universally useful.
Implemented GraphicsMode property on X11 and Mac OS X.
Replaced tabs with spaces in AglContext.cs.
2009-03-23 11:41:11 +00:00
the_fiddler 7eb149fa7c * Platform/X11/X11GLContext.cs: Added workaround for buggy Amd linux drivers. Added "None" to context attributes, as specified by the specs. 2009-03-20 23:16:52 +00:00
the_fiddler f1e0f2c8de * Platform/X11/X11GLNative.cs: Removed stale comments and unused code. 2009-03-20 23:15:16 +00:00
the_fiddler b61c108a52 * Platform/X11/Bindings/Glx.cs: Added glXIsDirect method and made all enums private. Added ErrorCodes enum. 2009-03-20 23:13:24 +00:00
the_fiddler 6bd0a26e19 * Platform/X11/X11GraphicsMode.cs: Major clean up. Refactored
ChooseFBConfig and ChooseVisual codepaths into different methods.
  Fixed bug [#728].
2009-03-20 19:38:52 +00:00
the_fiddler fc0ca5631f Relaxed checks to allow input devices that do not contain any axes and/or buttons (e.g. tablets or keyboard extensions). 2009-03-08 20:03:33 +00:00
the_fiddler 4e5d758fa1 Added new GLControl constructors that allow you specify the desired GraphicsContext (OpenGL) version and flags. 2009-03-07 11:03:41 +00:00
the_fiddler d43123f219 Added new GameWindow constructors that specify the desired GraphicsContext (OpenGL) version and flags. 2009-03-07 10:49:32 +00:00
the_fiddler a0e0613420 Added the capability to specify the desired OpenGL version and parameters (debug / forward-compatible context).
Added OpenGL 3.0 support for GLX contexts.
Added support for creating dummy contexts (useful if you are creating contexts from an external library).
Cleaned up unused and stale code.
2009-03-07 10:36:51 +00:00
the_fiddler d2376ced1f Use Glx.ChooseFBConfig instead of the deprecated Glx.ChooseVisual, if the first is available. This is necessary for OpenGL 3.0 contexts. 2009-03-07 07:16:46 +00:00
the_fiddler 130d72dcf3 Removed unused types. 2009-03-07 07:14:52 +00:00
the_fiddler d7e387f548 Added support for the glx functions ChooseFBConfig, GetVisualFromFBConfig and CreateContextAttribsARB. 2009-03-07 07:13:48 +00:00
the_fiddler 5f2a4b3d8c * X11/X11Joystick.cs: Flip vertical axes so that +1 points up.
* Windows/WinMMJoystick.cs: Move Z-axis before R-axis.
2009-03-01 09:17:19 +00:00
the_fiddler 912b04f333 Add description to joysticks opened from the legacy path. 2009-03-01 01:26:04 +00:00
the_fiddler f6f196c90b Added JoystickAxis and JoystickButton enumerations, as well as their respective collections.
Implemented necessary Poll() functions.
2009-03-01 01:17:24 +00:00
the_fiddler 9b43e11ff5 Initial joystick support (not public yet). 2009-02-28 23:11:27 +00:00
the_fiddler 8da8023c97 Suppressed a large amount of warnings for unused methods / fields in the platform bindings.
Replaced tab stops with spaces.
2009-02-22 12:10:36 +00:00
the_fiddler a22019d890 Normalize line endings and set the mime-type=text/plain and eol-style=native properties on all files. 2009-02-22 10:43:35 +00:00
kanato 81e09a2066 Merged in macos branch for Mac OS X support. 2009-02-20 18:57:57 +00:00
the_fiddler 7651a7a3bb Merged text branch and updated changelog. 2009-02-13 19:09:38 +00:00
the_fiddler 44240ad598 Make Mono use X11GdiPlusInternals regardless of platform. 2009-02-12 22:48:09 +00:00
the_fiddler 3059d09795 Time should be IntPtr, not uint.
Fixed KeypadEnter detection (was mistakenly mapped to vanilla Enter key).
2009-02-09 15:33:32 +00:00
the_fiddler 057759177b Fixed build warnings. 2008-12-09 10:06:25 +00:00
the_fiddler 820e2af20e Made ContextHandle a struct to reduce GC pressure (ContextHandles are created per frame).
Added xml documentation for the ContextHandle.
Made the casts between ContextHandles and IntPtrs explicit.
Updated all ContextHandle consumers to reflect the explicit cast.
2008-11-23 20:17:50 +00:00
the_fiddler 6dcc5b841d Removed unusued IGLControlHelper interface. 2008-11-23 09:39:52 +00:00
the_fiddler 9619b609a5 Fixed some whitespace and normalized line-endings. 2008-11-18 12:44:18 +00:00
kanato e66d796bdb Added WinFactory.cs and X11Factory.cs 2008-11-04 18:39:45 +00:00
kanato 8b65201145 Initial commit with Mac OS support. 2008-11-04 18:35:17 +00:00
the_fiddler 244de27aa2 Implemented X11GdiPlusInternals.
Added missing license headers.
2008-11-03 23:55:53 +00:00
the_fiddler 6cbe67fa2a Use different implementations for accessing GDI+ internals on .Net and Mono. 2008-11-03 23:34:54 +00:00
the_fiddler 43aaa02745 Make WinWindowInfo public.
Fixed X11WindowInfo line endings.
2008-05-19 20:57:36 +00:00
the_fiddler b48202324b Initial support for external contexts. 2008-05-19 20:54:07 +00:00
the_fiddler d5e047d7bb Fixed mouse motion events on Linux. 2008-05-04 18:23:42 +00:00
the_fiddler e9e9ee5f9c Fixed mouse delta handling. 2008-05-04 17:42:19 +00:00
the_fiddler 1abaa88bbf Fixed line endings. 2008-05-04 17:18:02 +00:00
the_fiddler 6d470e90a8 Fixed regression from conflict resolution. 2008-05-04 16:10:53 +00:00
the_fiddler bf8a11f103 * X11GLNative.cs: Fix behavior of WindowState when WindowBorder is
Fixed.
2008-05-04 16:09:09 +00:00
the_fiddler 98c7ba49af Fixed a WindowState reference that confused the compiler. 2008-05-03 16:42:25 +00:00
the_fiddler df3d5362c3 * Platform/X11/X11GraphicsMode.cs, Platform/X11/X11GLNative.cs,
Platform/X11/Structs.cs, Platform/X11/Functions.cs,
  Platform/X11/API.cs: Working on WindowBorder and WindowState
  support.
2008-05-03 16:33:00 +00:00
the_fiddler 6293fbadc3 * Platform/X11/X11GLNative.cs: Completed support for NET WM WindowState
modes.
2008-04-25 22:09:13 +00:00
the_fiddler c33e34456d * Platform/X11/X11GLNative.cs: Fullscreen toggling support through NET
WM.
2008-04-25 21:49:24 +00:00
the_fiddler 4bc19be5b1 Added support for minimized WindowState. 2008-04-25 21:32:01 +00:00
the_fiddler dc327850b6 Added initial support for maximized window states. 2008-04-25 21:04:46 +00:00
the_fiddler 2807183680 Added two helper functions for sending NET WM and client WM messages.
--This line, and those below, will be ignored--
M    Functions.cs
2008-04-25 21:04:05 +00:00
the_fiddler cb86fa05b3 Moved to Bindings folder. 2008-04-25 09:03:38 +00:00
the_fiddler b5ccab2369 Removed unused code. 2008-04-25 08:45:12 +00:00
the_fiddler f8d445ff70 Initial work on WindowState support. 2008-04-25 08:42:53 +00:00
the_fiddler c0b1f170e8 Moved PlatformException to the OpenTK namespace. Removed an invalid Debug.Unindent() call. 2008-04-21 21:31:21 +00:00
the_fiddler 35b58ffda7 Added WindowState and WindowBorder support on Windows. Removed GameWindow.Fullscreen property. Removed some chunks of unused code. 2008-04-20 17:54:16 +00:00
the_fiddler a567f6604f Added stub for WindowState. 2008-04-13 21:32:04 +00:00
the_fiddler 4b45494433 Removed obsolete GetDisplayModes() function. 2008-04-04 21:08:09 +00:00
the_fiddler 5ff51ba9fe Moved OpenTK.OpenAL to OpenTK.Audio.
Added SoundReader class.
Added OpenTK.Math.Functions.NextPowerOfTwo 
Fixed several AL functions, and added overloads to AL.BufferData.
Added OpenAL wave playback sample.
2008-04-04 19:46:08 +00:00
the_fiddler 63608b1dd7 Updates to GameWindow shutdown and X11 locking behavior. 2008-03-26 19:43:57 +00:00
the_fiddler 7473fe500e Added support for higher mouse buttons under X11.
Use XCheckWindowEvent instead of XNextEvent.
2008-03-24 18:18:26 +00:00
the_fiddler ef16998dca Use one display connection for all X11 communication. Seems to fix (not 100%) the crash problems encountered. 2008-03-24 13:12:02 +00:00
the_fiddler 28ed42406a Fixed multiple GLControls under Mono/X11. 2008-03-10 13:23:09 +00:00