Class X11OpenGLComponent
Inherited Members
Namespace: OpenTK.Platform.Native.X11
Assembly: OpenTK.Platform.dll
Syntax
public class X11OpenGLComponent : IOpenGLComponent, IPalComponent
Properties
CanCreateFromSurface
True if the component driver can create a context from surfaces using CreateFromSurface().
Declaration
public bool CanCreateFromSurface { get; }
Property Value
Type | Description |
---|---|
bool |
CanCreateFromWindow
True if the component driver can create a context from windows using CreateFromWindow(WindowHandle).
Declaration
public bool CanCreateFromWindow { get; }
Property Value
Type | Description |
---|---|
bool |
See Also
CanShareContexts
True if the component driver has the capability to share display lists between OpenGL contexts.
Declaration
public bool CanShareContexts { get; }
Property Value
Type | Description |
---|---|
bool |
GLXClientExtensions
Declaration
public HashSet<string> GLXClientExtensions { get; }
Property Value
Type | Description |
---|---|
HashSet<string> |
GLXClientVendor
Declaration
public string GLXClientVendor { get; }
Property Value
Type | Description |
---|---|
string |
GLXClientVersion
Declaration
public Version? GLXClientVersion { get; }
Property Value
Type | Description |
---|---|
Version |
GLXExtensions
Declaration
public HashSet<string> GLXExtensions { get; }
Property Value
Type | Description |
---|---|
HashSet<string> |
GLXServerExtensions
Declaration
public HashSet<string> GLXServerExtensions { get; }
Property Value
Type | Description |
---|---|
HashSet<string> |
GLXServerVendor
Declaration
public string GLXServerVendor { get; }
Property Value
Type | Description |
---|---|
string |
GLXServerVersion
Declaration
public Version? GLXServerVersion { get; }
Property Value
Type | Description |
---|---|
Version |
GLXVersion
Declaration
public Version GLXVersion { get; }
Property Value
Type | Description |
---|---|
Version |
Logger
The logger that this component uses to log diagnostic messages.
Declaration
public ILogger? Logger { get; set; }
Property Value
Type | Description |
---|---|
ILogger |
See Also
Name
Name of the abstraction layer component.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string |
Provides
Specifies which PAL components this object provides.
Declaration
public PalComponents Provides { get; }
Property Value
Type | Description |
---|---|
PalComponents |
Methods
CreateFromSurface()
Create and OpenGL context for a surface.
Declaration
public OpenGLContextHandle CreateFromSurface()
Returns
Type | Description |
---|---|
OpenGLContextHandle | An OpenGL context handle. |
CreateFromWindow(WindowHandle)
Create an OpenGL context for a window.
Declaration
public OpenGLContextHandle CreateFromWindow(WindowHandle handle)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | The window for which the OpenGL context should be created. |
Returns
Type | Description |
---|---|
OpenGLContextHandle | An OpenGL context handle. |
See Also
DestroyContext(OpenGLContextHandle)
Destroy an OpenGL context.
Declaration
public void DestroyContext(OpenGLContextHandle handle)
Parameters
Type | Name | Description |
---|---|---|
OpenGLContextHandle | handle | Handle to the OpenGL context to destroy. |
See Also
EXT_swap_control_GetMaxSwapInterval()
Queries EXT_swap_control for the max supported swap interval.
This function returns null
if EXT_swap_control is not supported.
Declaration
public int? EXT_swap_control_GetMaxSwapInterval()
Returns
Type | Description |
---|---|
int? |
GetBindingsContext(OpenGLContextHandle)
Gets a IBindingsContext from an OpenGLContextHandle. Pass this to LoadBindings(IBindingsContext) to load the OpenGL bindings.
Declaration
public IBindingsContext GetBindingsContext(OpenGLContextHandle handle)
Parameters
Type | Name | Description |
---|---|---|
OpenGLContextHandle | handle | The handle to get a bindings context for. |
Returns
Type | Description |
---|---|
IBindingsContext | The created bindings context. |
See Also
GetCurrentContext()
Get the current OpenGL context for this thread.
Declaration
public OpenGLContextHandle? GetCurrentContext()
Returns
Type | Description |
---|---|
OpenGLContextHandle | Handle to the current OpenGL context, null if no context is current. |
See Also
GetGLXContext(OpenGLContextHandle)
Gets the GLXContext
associated with this OpenGL context.
Declaration
public nint GetGLXContext(OpenGLContextHandle handle)
Parameters
Type | Name | Description |
---|---|---|
OpenGLContextHandle | handle | A handle to the OpenGL context to get the |
Returns
Type | Description |
---|---|
nint | The |
GetGLXWindow(OpenGLContextHandle)
Gets the GLXWindow
associated with this OpenGL context.
Declaration
public nint GetGLXWindow(OpenGLContextHandle handle)
Parameters
Type | Name | Description |
---|---|---|
OpenGLContextHandle | handle | A handle to the OpenGL context to get the |
Returns
Type | Description |
---|---|
nint | The |
GetProcedureAddress(OpenGLContextHandle, string)
Get the procedure address for an OpenGL command.
Declaration
public nint GetProcedureAddress(OpenGLContextHandle handle, string procedureName)
Parameters
Type | Name | Description |
---|---|---|
OpenGLContextHandle | handle | Handle to an OpenGL context. |
string | procedureName | Name of the OpenGL command. |
Returns
Type | Description |
---|---|
nint | The procedure address to the OpenGL command. |
GetSharedContext(OpenGLContextHandle)
Gets the context which the given context shares display lists with.
Declaration
public OpenGLContextHandle? GetSharedContext(OpenGLContextHandle handle)
Parameters
Type | Name | Description |
---|---|---|
OpenGLContextHandle | handle | Handle to the OpenGL context. |
Returns
Type | Description |
---|---|
OpenGLContextHandle | Handle to the OpenGL context the given context shares display lists with. |
See Also
GetSwapInterval()
Gets the swap interval of the current OpenGL context, or -1
if no context is current.
Declaration
public int GetSwapInterval()
Returns
Type | Description |
---|---|
int | The current swap interval, or |
Initialize(ToolkitOptions)
Initialize the component.
Declaration
public void Initialize(ToolkitOptions options)
Parameters
Type | Name | Description |
---|---|---|
ToolkitOptions | options | The options to initialize the component with. |
See Also
SetCurrentContext(OpenGLContextHandle?)
Set the current OpenGL context for this thread.
Declaration
public bool SetCurrentContext(OpenGLContextHandle? handle)
Parameters
Type | Name | Description |
---|---|---|
OpenGLContextHandle | handle | Handle to the OpenGL context to make current, or null to make no context current. |
Returns
Type | Description |
---|---|
bool | true when the OpenGL context is successfully made current. |
See Also
SetSwapInterval(int)
Sets the swap interval of the current OpenGL context.
Declaration
public void SetSwapInterval(int interval)
Parameters
Type | Name | Description |
---|---|---|
int | interval | The new swap interval. |
SwapBuffers(OpenGLContextHandle)
Swaps the buffer of the specified context.
Declaration
public void SwapBuffers(OpenGLContextHandle handle)
Parameters
Type | Name | Description |
---|---|---|
OpenGLContextHandle | handle | Handle to the context. |
See Also
Uninitialize()
Uninitialize the component. Frees any native resources used by the component.
Declaration
public void Uninitialize()