The Open Toolkit library  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
OpenTK.BindingsBase Class Referenceabstract

Provides a common foundation for all flat API bindings and implements the extension loading interface. More...

+ Inheritance diagram for OpenTK.BindingsBase:

Public Member Functions

 BindingsBase ()
 Constructs a new BindingsBase instance. More...
 

Protected Member Functions

abstract IntPtr GetAddress (string funcname)
 Retrieves an unmanaged function pointer to the specified function. More...
 

Protected Attributes

readonly Type DelegatesClass
 A reflection handle to the nested type that contains the function delegates. More...
 
readonly Type CoreClass
 A refection handle to the nested type that contains core functions (i.e. not extensions). More...
 
readonly SortedList< string,
MethodInfo > 
CoreFunctionMap = new SortedList<string, MethodInfo>()
 A mapping of core function names to MethodInfo handles. More...
 

Properties

bool RebuildExtensionList [get, set]
 Gets or sets a System.Boolean that indicates whether the list of supported extensions may have changed. More...
 
abstract object SyncRoot [get]
 Gets an object that can be used to synchronize access to the bindings implementation. More...
 

Detailed Description

Provides a common foundation for all flat API bindings and implements the extension loading interface.

Constructor & Destructor Documentation

OpenTK.BindingsBase.BindingsBase ( )

Constructs a new BindingsBase instance.

Member Function Documentation

abstract IntPtr OpenTK.BindingsBase.GetAddress ( string  funcname)
protectedpure virtual

Retrieves an unmanaged function pointer to the specified function.

Parameters
funcnameA System.String that defines the name of the function.
Returns
A IntPtr that contains the address of funcname or IntPtr.Zero, if the function is not supported by the drivers.

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.

Implemented in OpenTK.Graphics.GraphicsBindingsBase.

Member Data Documentation

readonly Type OpenTK.BindingsBase.CoreClass
protected

A refection handle to the nested type that contains core functions (i.e. not extensions).

readonly SortedList<string, MethodInfo> OpenTK.BindingsBase.CoreFunctionMap = new SortedList<string, MethodInfo>()
protected

A mapping of core function names to MethodInfo handles.

readonly Type OpenTK.BindingsBase.DelegatesClass
protected

A reflection handle to the nested type that contains the function delegates.

Property Documentation

bool OpenTK.BindingsBase.RebuildExtensionList
getsetprotected

Gets or sets a System.Boolean that indicates whether the list of supported extensions may have changed.

abstract object OpenTK.BindingsBase.SyncRoot
getprotected

Gets an object that can be used to synchronize access to the bindings implementation.

This object should be unique across bindings but consistent between bindings of the same type. For example, ES10.GL, OpenGL.GL and CL10.CL should all return unique objects, but all instances of ES10.GL should return the same object.