Permalink
Browse files

Toolkit.Init() now returns a concrete class

This gives us room for expansion in the future, if necessary.
  • Loading branch information...
1 parent 1d19a80 commit 486130c01ebefbe150abaa9b3c3817672f1b1c05 @thefiddler thefiddler committed Nov 20, 2013
Showing with 12 additions and 8 deletions.
  1. +12 −8 Source/OpenTK/Toolkit.cs
View
@@ -68,9 +68,11 @@ public sealed class Toolkit : IDisposable
/// <code>
/// static void Main()
/// {
- /// OpenTK.Toolkit.Init();
- /// ...
- /// }
+ /// using (OpenTK.Toolkit.Init())
+ /// {
+ /// ...
+ /// }
+ /// }
/// </code>
/// </para>
/// <para>
@@ -84,7 +86,7 @@ public sealed class Toolkit : IDisposable
/// An IDisposable instance that you can use to dispose of the resources
/// consumed by OpenTK.
/// </returns>
- public static IDisposable Init()
+ public static Toolkit Init()
{
return Init(ToolkitOptions.Default);
}
@@ -101,9 +103,11 @@ public static IDisposable Init()
/// <code>
/// static void Main()
/// {
- /// OpenTK.Toolkit.Init();
- /// ...
- /// }
+ /// using (OpenTK.Toolkit.Init())
+ /// {
+ /// ...
+ /// }
+ /// }
/// </code>
/// </para>
/// <para>
@@ -119,7 +123,7 @@ public static IDisposable Init()
/// An IDisposable instance that you can use to dispose of the resources
/// consumed by OpenTK.
/// </returns>
- public static IDisposable Init(ToolkitOptions options)
+ public static Toolkit Init(ToolkitOptions options)
{
if (options == null)
throw new ArgumentNullException("options");

0 comments on commit 486130c

Please sign in to comment.