Provides a common foundation for all flat API bindings and implements the extension loading interface. More...
Public Member Functions | |
| BindingsBase () | |
| Constructs a new BindingsBase instance. | |
Protected Member Functions | |
| abstract IntPtr | GetAddress (string funcname) |
| Retrieves an unmanaged function pointer to the specified function. | |
Protected Attributes | |
| readonly Type | DelegatesClass |
| A reflection handle to the nested type that contains the function delegates. | |
| readonly Type | CoreClass |
| A refection handle to the nested type that contains core functions (i.e. not extensions). | |
| readonly SortedList< string, MethodInfo > | CoreFunctionMap = new SortedList<string, MethodInfo>() |
| A mapping of core function names to MethodInfo handles. | |
Properties | |
| bool | RebuildExtensionList [get, set] |
| Gets or sets a System.Boolean that indicates whether the list of supported extensions may have changed. | |
| abstract object | SyncRoot [get] |
| Gets an object that can be used to synchronize access to the bindings implementation. | |
Provides a common foundation for all flat API bindings and implements the extension loading interface.
Definition at line 40 of file BindingsBase.cs.
| OpenTK.BindingsBase.BindingsBase | ( | ) |
Constructs a new BindingsBase instance.
Definition at line 68 of file BindingsBase.cs.
00069 { 00070 DelegatesClass = this.GetType().GetNestedType("Delegates", BindingFlags.Static | BindingFlags.NonPublic); 00071 CoreClass = this.GetType().GetNestedType("Core", BindingFlags.Static | BindingFlags.NonPublic); 00072 00073 if (CoreClass != null) 00074 { 00075 MethodInfo[] methods = CoreClass.GetMethods(BindingFlags.Static | BindingFlags.NonPublic); 00076 CoreFunctionMap = new SortedList<string, MethodInfo>(methods.Length); // Avoid resizing 00077 foreach (MethodInfo m in methods) 00078 { 00079 CoreFunctionMap.Add(m.Name, m); 00080 } 00081 } 00082 }
| abstract IntPtr OpenTK.BindingsBase.GetAddress | ( | string | funcname | ) | [protected, pure virtual] |
Retrieves an unmanaged function pointer to the specified function.
| funcname | A System.String that defines the name of the function. |
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.Compute.CL10.CL, and OpenTK.Graphics.GraphicsBindingsBase.
readonly Type OpenTK.BindingsBase.CoreClass [protected] |
A refection handle to the nested type that contains core functions (i.e. not extensions).
Definition at line 52 of file BindingsBase.cs.
readonly SortedList<string, MethodInfo> OpenTK.BindingsBase.CoreFunctionMap = new SortedList<string, MethodInfo>() [protected] |
A mapping of core function names to MethodInfo handles.
Definition at line 57 of file BindingsBase.cs.
readonly Type OpenTK.BindingsBase.DelegatesClass [protected] |
A reflection handle to the nested type that contains the function delegates.
Definition at line 47 of file BindingsBase.cs.
bool OpenTK.BindingsBase.RebuildExtensionList [get, set, protected] |
Gets or sets a System.Boolean that indicates whether the list of supported extensions may have changed.
Definition at line 92 of file BindingsBase.cs.
abstract object OpenTK.BindingsBase.SyncRoot [get, protected] |
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.
Reimplemented in OpenTK.Compute.CL10.CL, OpenTK.Graphics.ES10.GL, OpenTK.Graphics.ES11.GL, OpenTK.Graphics.ES20.GL, and OpenTK.Graphics.OpenGL.GL.
Definition at line 120 of file BindingsBase.cs.
1.6.1