C# 클래스 Vector.Gpu.OpenGL.Gl

파일 보기 프로젝트 열기: sinclairzx81/vector-cs

공개 메소드들

메소드 설명
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