The Open Toolkit library  1.1
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Static Public Member Functions | List of all members
OpenTK.Toolkit Class Reference

Provides static methods to manage an OpenTK application. More...

Inherits IDisposable.

Public Member Functions

void Dispose ()
 Disposes of the resources consumed by this instance. More...
 

Static Public Member Functions

static Toolkit Init ()
 Initializes OpenTK with default options. More...
 
static Toolkit Init (ToolkitOptions options)
 Initializes OpenTK with the specified options. Use this method to influence the OpenTK.Platform implementation that will be used. More...
 

Detailed Description

Provides static methods to manage an OpenTK application.

Member Function Documentation

void OpenTK.Toolkit.Dispose ( )

Disposes of the resources consumed by this instance.

static Toolkit OpenTK.Toolkit.Init ( )
static

Initializes OpenTK with default options.

You must call this method if you are combining OpenTK with a third-party windowing toolkit (e.g. GTK#). In this case, this should be the first method called by your application:

static void Main()
{
using (OpenTK.Toolkit.Init())
{
...
}
}

The reason is that some toolkits do not configure the underlying platform correctly or configure it in a way that is incompatible with OpenTK. Calling this method first ensures that OpenTK is given the chance to initialize itself and configure the platform correctly.

Returns
An IDisposable instance that you can use to dispose of the resources consumed by OpenTK.
static Toolkit OpenTK.Toolkit.Init ( ToolkitOptions  options)
static

Initializes OpenTK with the specified options. Use this method to influence the OpenTK.Platform implementation that will be used.

You must call this method if you are combining OpenTK with a third-party windowing toolkit (e.g. GTK#). In this case, this should be the first method called by your application:

static void Main()
{
using (OpenTK.Toolkit.Init())
{
...
}
}

The reason is that some toolkits do not configure the underlying platform correctly or configure it in a way that is incompatible with OpenTK. Calling this method first ensures that OpenTK is given the chance to initialize itself and configure the platform correctly.

Parameters
optionsA ToolkitOptions instance containing the desired options.
Returns
An IDisposable instance that you can use to dispose of the resources consumed by OpenTK.