Show / Hide Table of Contents

Class GLFWProvider

Singleton providing easy GLFW implementation access.

Inheritance
object
GLFWProvider
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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

HonorOpenTK4UseWayland

Whether or not to honor the OPENTK_4_USE_WAYLAND environment variable. In OpenTK 4.8 OPENTK_4_USE_WAYLAND=1 was used to opt into using wayland when wayland is available. In OpenTK 4.9 OPENTK_4_USE_WAYLAND=0 is used to opt-out of using wayland when wayland is available. Setting OPENTK_4_USE_WAYLAND=1 will not have any effect and will use GLFWs default platform resolution.

Declaration
public static bool HonorOpenTK4UseWayland { 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.

In This Article
Back to top Generated by DocFX