Class Toolkit
Provides static methods to manage an OpenTK application.
Inheritance
Implements
Inherited Members
Namespace: OpenTK
Assembly: cs.temp.dll.dll
Syntax
public sealed class Toolkit : IDisposable
Methods
Dispose()
Disposes of the resources consumed by this instance.
Declaration
public void Dispose()
Init()
Initializes OpenTK with default options.
Declaration
public static Toolkit Init()
Returns
Type | Description |
---|---|
Toolkit | An IDisposable instance that you can use to dispose of the resources consumed by OpenTK. |
Remarks
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.
Init(ToolkitOptions)
Initializes OpenTK with the specified options. Use this method to influence the OpenTK.Platform implementation that will be used.
Declaration
public static Toolkit Init(ToolkitOptions options)
Parameters
Type | Name | Description |
---|---|---|
ToolkitOptions | options | A |
Returns
Type | Description |
---|---|
Toolkit | An IDisposable instance that you can use to dispose of the resources consumed by OpenTK. |
Remarks
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.