Commit graph

7 commits

Author SHA1 Message Date
thefiddler
6a3838757c Fixed NRE when calling Toolkit.Dispose() more than once. 2014-03-11 16:00:25 +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.
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.
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
a85cecdc59 Improved resource disposal
Added IDisposable interface to all classes holding native data that must be freed. OpenTK.Toolkit.Init() now returns an IDisposable instance that can be used to cleanup all native data held by OpenTK. This is useful when re-initializing OpenTK (possibly in a new AppDomain), as is the case in the Example browser.
2013-10-01 22:01:27 +02:00
the_fiddler
e7aef8537c * Toolkit.cs, Configuration.cs:
Made initialization thread-safe.
2010-12-08 08:58:52 +00:00
the_fiddler
907d2bd7e9 Added Toolkit.Init() method that can be used to configure the underlying platform correctly when using OpenTK along with other toolkits (e.g. OpenTK+GTK# on X, where GTK# does not initialize threads). 2009-11-04 09:46:45 +00:00