Class GLFWProvider
Singleton providing easy GLFW implementation access.
Inherited Members
Namespace: OpenTK.Windowing.Desktop
Assembly: OpenTK.Windowing.Desktop.dll
Syntax
public static class GLFWProvider
Properties
CheckForMainThread
Whether or not to check that GLFW is initialzed on the main thread.
Declaration
public static bool CheckForMainThread { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsOnMainThread
Gets a value indicating whether the CurrentThread is the same as the GLFW main thread. If CheckForMainThread is false this function will always return true.
Declaration
public static bool IsOnMainThread { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
EnsureInitialized()
Makes sure GLFW is intialized.
Declaration
public static void EnsureInitialized()
Exceptions
Type | Condition |
---|---|
GLFWException | If this function is not called from the main thread and CheckForMainThread is true. |
SetErrorCallback(ErrorCallback)
Sets the error handler callback that GLFW errors get reported to.
Declaration
public static void SetErrorCallback(GLFWCallbacks.ErrorCallback errorCallback)
Parameters
Type | Name | Description |
---|---|---|
GLFWCallbacks.ErrorCallback | errorCallback | The error callback delegate to set as the error callback. |