Class Pal2BindingsContext
An IBindingsContext to use with PAL2.
Implements
Inherited Members
Namespace: OpenTK.Platform
Assembly: OpenTK.Platform.dll
Syntax
public class Pal2BindingsContext : IBindingsContext
Constructors
Pal2BindingsContext(IOpenGLComponent, OpenGLContextHandle)
Initializes a new instance of the Pal2BindingsContext class given an OpenGL conponent and a context handle.
Declaration
public Pal2BindingsContext(IOpenGLComponent openGLComp, OpenGLContextHandle contextHandle)
Parameters
| Type | Name | Description |
|---|---|---|
| IOpenGLComponent | openGLComp | The OpenGL component. |
| OpenGLContextHandle | contextHandle | The OpenGL context handle. |
Properties
ContextHandle
A handle to the context to use to load OpenGL functions.
Declaration
public OpenGLContextHandle ContextHandle { get; }
Property Value
| Type | Description |
|---|---|
| OpenGLContextHandle |
OpenGLComp
The IOpenGLComponent component.
Declaration
public IOpenGLComponent OpenGLComp { get; }
Property Value
| Type | Description |
|---|---|
| IOpenGLComponent |
Methods
GetProcAddress(string)
Retrieves an unmanaged function pointer to the specified function on the specified bindings context.
Declaration
public nint GetProcAddress(string procName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | procName | An ASCII-encoded string that defines the name of the function. |
Returns
| Type | Description |
|---|---|
| nint | A nint that contains the address of procName or IntPtr.Zero, if the function is not supported by the drivers. |
Remarks
Note: some drivers are known to return non-zero values for unsupported functions. Typical values include 1 and 2 - inheritors are advised to check for and ignore these values.