C# Класс Vector.Gpu.OpenGL.Gl

Показать файл Открыть проект

Открытые методы

Метод Описание
GetDelegateForExtensionMethod ( string name, Type signature ) : Delegate

Creates a System.Delegate that can be used to call a dynamically exported OpenGL function.

GetDelegateForMethod ( string methodName, Type signature ) : Delegate

Creates a callable delegate for the specified OpenGL function (core or extension), if it exists.

GetFunctionPointerForExtensionMethod ( string name ) : IntPtr

Retrieves the entry point for a dynamically exported OpenGL function.

The Marshal.GetDelegateForFunctionPointer method can be used to turn the return value into a call-able delegate.

This function is cross-platform. It determines the underlying platform and uses the correct wgl, glx or agl GetAddress function to retrieve the function pointer.

Marshal.GetDelegateForFunctionPointer Gl.GetDelegateForExtensionMethod
IsExtensionSupported ( string name ) : bool

Determines whether the specified OpenGL extension category is available in the current OpenGL context. Equivalent to IsExtensionSupported(name, true)

IsExtensionSupported ( string name, bool useCache ) : bool

Determines whether the specified OpenGL extension category is available in the current OpenGL context.

ReloadFunction ( string name ) : bool

Tries to reload the given OpenGL function (core or extension).

Use this function if you require greater granularity when loading OpenGL entry points.

While the automatic initialisation will load all OpenGL entry points, in some cases the initialisation can take place before an OpenGL Context has been established. In this case, use this function to load the entry points for the OpenGL functions you will need, or use ReloadFunctions() to load all available entry points.

This function will return true if the given OpenGL function exists, false otherwise. A return value of "true" does not mean that any specific OpenGL function is supported; rather it means that the string passed to this function denotes a known OpenGL function.

To query supported extensions use the IsExtensionSupported() function instead.

ReloadFunctions ( ) : void

Reloads all OpenGL functions (core and extensions).

Call this function to reload all OpenGL entry points. This should be done whenever you change the pixelformat/visual, or in the case you cannot (or do not want) to use the automatic initialisation.

Calling this function before the automatic initialisation has taken place will result in the Gl class being initialised twice. This is harmless, but, given the choice, the automatic initialisation should be preferred.

Приватные методы

Метод Описание
NSAddressOfSymbol ( IntPtr symbol ) : IntPtr
NSIsSymbolNameDefined ( string s ) : bool
NSLookupAndBindSymbol ( string s ) : IntPtr
ParseAvailableExtensions ( ) : void

Builds a cache of the supported extensions to speed up searches.

aglGetProcAddress ( string s ) : IntPtr
glxGetProcAddress ( string s ) : IntPtr
glxGetProcAddressARB ( string s ) : IntPtr
wglGetProcAddress ( string s ) : IntPtr

Описание методов

GetDelegateForExtensionMethod() публичный статический Метод

Creates a System.Delegate that can be used to call a dynamically exported OpenGL function.
public static GetDelegateForExtensionMethod ( string name, Type signature ) : Delegate
name string The function string for the OpenGL function (eg. "glNewList")
signature Type The signature of the OpenGL function.
Результат Delegate

GetDelegateForMethod() публичный статический Метод

Creates a callable delegate for the specified OpenGL function (core or extension), if it exists.
public static GetDelegateForMethod ( string methodName, Type signature ) : Delegate
methodName string The OpenGL function name (e.g. glVertex3f)
signature Type The signature of the delegate to return.
Результат Delegate

GetFunctionPointerForExtensionMethod() публичный статический Метод

Retrieves the entry point for a dynamically exported OpenGL function.

The Marshal.GetDelegateForFunctionPointer method can be used to turn the return value into a call-able delegate.

This function is cross-platform. It determines the underlying platform and uses the correct wgl, glx or agl GetAddress function to retrieve the function pointer.

Marshal.GetDelegateForFunctionPointer Gl.GetDelegateForExtensionMethod
public static GetFunctionPointerForExtensionMethod ( string name ) : IntPtr
name string The function string for the OpenGL function (eg. "glNewList")
Результат IntPtr

IsExtensionSupported() публичный статический Метод

Determines whether the specified OpenGL extension category is available in the current OpenGL context. Equivalent to IsExtensionSupported(name, true)
public static IsExtensionSupported ( string name ) : bool
name string The string for the OpenGL extension category (eg. "GL_ARB_multitexture")
Результат bool

IsExtensionSupported() публичный статический Метод

Determines whether the specified OpenGL extension category is available in the current OpenGL context.
public static IsExtensionSupported ( string name, bool useCache ) : bool
name string The string for the OpenGL extension category (eg. "GL_ARB_multitexture")
useCache bool If true, the results will be cached to speed up future results.
Результат bool

ReloadFunction() публичный статический Метод

Tries to reload the given OpenGL function (core or extension).

Use this function if you require greater granularity when loading OpenGL entry points.

While the automatic initialisation will load all OpenGL entry points, in some cases the initialisation can take place before an OpenGL Context has been established. In this case, use this function to load the entry points for the OpenGL functions you will need, or use ReloadFunctions() to load all available entry points.

This function will return true if the given OpenGL function exists, false otherwise. A return value of "true" does not mean that any specific OpenGL function is supported; rather it means that the string passed to this function denotes a known OpenGL function.

To query supported extensions use the IsExtensionSupported() function instead.

public static ReloadFunction ( string name ) : bool
name string The name of the OpenGL function (i.e. glShaderSource)
Результат bool

ReloadFunctions() публичный статический Метод

Reloads all OpenGL functions (core and extensions).

Call this function to reload all OpenGL entry points. This should be done whenever you change the pixelformat/visual, or in the case you cannot (or do not want) to use the automatic initialisation.

Calling this function before the automatic initialisation has taken place will result in the Gl class being initialised twice. This is harmless, but, given the choice, the automatic initialisation should be preferred.

public static ReloadFunctions ( ) : void
Результат void