Commit graph

27 commits

Author SHA1 Message Date
thefiddler
e81d8da068 [OpenTK] Reduce duplication in GraphicsContextBase
Inheritors now take advantage of base class functionality to avoid
duplicating finalizers and warning messages.
2014-07-23 10:08:57 +02:00
thefiddler
433fa35f7e [Graphics] GetAddress(string) is no longer needed 2014-04-26 14:20:17 +02:00
thefiddler
e433aad4b4 [ES] ES10 does not require initialization
It consists solely of DllImports that will be initialized on first use,
regardless of the existence of an OpenGL context.
2014-04-25 14:50:55 +02:00
Fraser Waters
b80bb86c5b Remove unused fields and variables. 2014-02-25 10:31:17 +00: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
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.
b57e58dc47 Implemented Sdl2GLControl
SDL2 still fails with "not an OpenGL window".
2013-09-30 20:47:29 +02:00
the_fiddler
21645ac634 GraphicsMode was not set when initializing a DummyGLContext with an explicit handle. Corrected now. 2011-12-06 21:54:20 +00:00
the_fiddler
b3f846dbc6 Implemented IGraphicsContext.SwapInterval property that supersedes IGraphicsContext.VSync. Fixes issue [#2671]: "Expose SwapInterval to GameWindow". 2011-09-06 12:06:30 +00:00
the_fiddler
88e6aceae0 Synced trunk with 1.0 branch. 2010-10-02 18:52:34 +00:00
the_fiddler
bca3751e8b Synced with 1.0 branch. 2010-03-11 22:53:11 +00:00
the_fiddler
2d4b962d2c Renamed internal BindingsBase.LoadAll/Load methods to LoadEntryPoints/LoadEntryPoint, in order to avoid name clashes with the static GL.LoadAll() method.
Added GraphicsContext() constructor that takes an existing, valid OpenGL context. This can be used for interop with third-party toolkits which create the OpenGL context themselves.
2009-11-04 16:49:56 +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
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
d72a75f2fc Moved OpenTK.GLControl to its own project. 2009-08-19 14:17:47 +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
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
9c0a472ba7 Ensure Wgl core entry points are loaded prior to first use, even without a Wgl context.
Do not query actual GraphicsMode.Default in DummyGLContext constructor. Doing so creates a temporary context, which should not be done when creating a dummy context.
Fixed issue [#993]: "Possible bug in GraphicsContext.CreateDummyContext()".
2009-08-11 21:45:32 +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
190e9cc7c0 Use GraphicsMode.Default for DummyGLContext. 2009-05-31 16:02:15 +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
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
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
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
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
2ce6227e64 Moved DummyGLContext and DummyGLControl to the OpenTK/Platform/Dummy directory and namespace.
Fixed a regression where the GLControl would try to instantiate a normal context inside the VS designer, instead of a dummy one.
2008-12-09 10:09:03 +00:00