Class GLFWGraphicsContext
OpenGL context implemented using GLFW.
Inherited Members
Namespace: OpenTK.Windowing.Desktop
Assembly: OpenTK.Windowing.Desktop.dll
Syntax
public class GLFWGraphicsContext : IGLFWGraphicsContext, IGraphicsContext
Constructors
GLFWGraphicsContext(Window*)
Initializes a new instance of the GLFWGraphicsContext class, a GLFW managed opengl context.
Declaration
public GLFWGraphicsContext(Window* windowPtr)
Parameters
Type | Name | Description |
---|---|---|
Window* | windowPtr | The window pointer that is associated with the context. |
Properties
IsCurrent
Gets a value indicating whether the context is the current active on of the current thread.
Declaration
public bool IsCurrent { get; }
Property Value
Type | Description |
---|---|
bool |
SwapInterval
Gets or sets the swap interval (the number of screen updates to wait between swapping front and back buffers. See SwapBuffers()).
Declaration
public int SwapInterval { get; set; }
Property Value
Type | Description |
---|---|
int | The swap interval. |
WindowPtr
The GLFW Window that represents the context.
Declaration
public IntPtr WindowPtr { get; }
Property Value
Type | Description |
---|---|
IntPtr |
Methods
MakeCurrent()
Makes the GraphicsContext current on the calling thread.
Declaration
public void MakeCurrent()
MakeNoneCurrent()
Makes no GraphicsContext current one on the calling thread.
Declaration
public void MakeNoneCurrent()
SwapBuffers()
Swaps the front and back buffers of the current GraphicsContext, presenting the rendered scene to the user.
Declaration
public void SwapBuffers()