Свойство | Type | Description | |
---|---|---|---|
CreateContext | void | ||
Dispose | void | ||
FindSharedContext | IGraphicsContext | ||
GraphicsContext | System | ||
GraphicsContext | System | ||
IGraphicsContextInternal |
Méthode | Description | |
---|---|---|
Assert ( ) : void |
Checks if a GraphicsContext exists in the calling thread and throws a GraphicsContextMissingException if it doesn't.
|
|
CreateDummyContext ( ) : |
Creates a dummy GraphicsContext to allow OpenTK to work with contexts created by external libraries. Instances created by this method will not be functional. Instance methods will have no effect. This method requires that a context is current on the calling thread. |
|
CreateDummyContext ( ContextHandle handle ) : |
Creates a dummy GraphicsContext to allow OpenTK to work with contexts created by external libraries. Instances created by this method will not be functional. Instance methods will have no effect. |
|
CreateExternalContext ( System.Platform externalGfxContext ) : |
TODO: for used with glfw context
|
|
Dispose ( ) : void |
Disposes of the GraphicsContext.
|
|
GraphicsContext ( ContextHandle handle, IWindowInfo window ) : System |
Constructs a new GraphicsContext from a pre-existing context created outside of OpenTK.
|
|
GraphicsContext ( ContextHandle handle, IWindowInfo window, IGraphicsContext shareContext, int major, int minor, GraphicsContextFlags flags ) : System |
Constructs a new GraphicsContext from a pre-existing context created outside of OpenTK.
|
|
GraphicsContext ( OpenTK.Graphics.GraphicsMode mode, IWindowInfo window ) : System |
Constructs a new GraphicsContext with the specified GraphicsMode and attaches it to the specified window.
|
|
GraphicsContext ( OpenTK.Graphics.GraphicsMode mode, IWindowInfo window, int major, int minor, GraphicsContextFlags flags ) : System |
Constructs a new GraphicsContext with the specified GraphicsMode, version and flags, and attaches it to the specified window. Different hardware supports different flags, major and minor versions. Invalid parameters will be silently ignored. |
|
LoadAll ( ) : void |
Loads all OpenGL entry points.
|
|
MakeCurrent ( IWindowInfo window ) : void |
Makes the GraphicsContext the current rendering target. You can use this method to bind the GraphicsContext to a different window than the one it was created from. |
|
SwapBuffers ( ) : void |
Swaps buffers on a context. This presents the rendered scene to the user.
|
|
Update ( IWindowInfo window ) : void |
Updates the graphics context. This must be called when the render target is resized for proper behavior on Mac OS X.
|
Méthode | Description | |
---|---|---|
CreateContext ( bool direct, IGraphicsContext source ) : void |
Creates an OpenGL context with the specified direct/indirect rendering mode and sharing state with the specified IGraphicsContext. Direct rendering is the default rendering mode for OpenTK, since it can provide higher performance in some circumastances. The 'direct' parameter is a hint, and will ignored if the specified mode is not supported (e.g. setting indirect rendering on Windows platforms). |
|
Dispose ( bool manual ) : void | ||
FindSharedContext ( ) : IGraphicsContext | ||
GraphicsContext ( ContextHandle handle ) : System | ||
GraphicsContext ( OpenTK externalGraphicsContext ) : System | ||
IGraphicsContextInternal ( string function ) : |
Gets the address of an OpenGL extension function.
|
public static CreateDummyContext ( ) : |
||
Résultat |
public static CreateDummyContext ( ContextHandle handle ) : |
||
handle | ContextHandle | The handle of a context. |
Résultat |
public static CreateExternalContext ( System.Platform externalGfxContext ) : |
||
externalGfxContext | System.Platform | |
Résultat |
public GraphicsContext ( ContextHandle handle, IWindowInfo window ) : System | ||
handle | ContextHandle | The handle of the existing context. This must be a valid, unique handle that is not known to OpenTK. |
window | IWindowInfo | The window this context is bound to. This must be a valid window obtained through Utilities.CreateWindowInfo. |
Résultat | System |
public GraphicsContext ( ContextHandle handle, IWindowInfo window, IGraphicsContext shareContext, int major, int minor, GraphicsContextFlags flags ) : System | ||
handle | ContextHandle | The handle of the existing context. This must be a valid, unique handle that is not known to OpenTK. |
window | IWindowInfo | The window this context is bound to. This must be a valid window obtained through Utilities.CreateWindowInfo. |
shareContext | IGraphicsContext | A different context that shares resources with this instance, if any. /// Pass null if the context is not shared or if this is the first GraphicsContext instruct you construct. |
major | int | The major version of the context (e.g. "2" for "2.1"). |
minor | int | The minor version of the context (e.g. "1" for "2.1"). |
flags | GraphicsContextFlags | A bitwise combination of |
Résultat | System |
public GraphicsContext ( OpenTK.Graphics.GraphicsMode mode, IWindowInfo window ) : System | ||
mode | OpenTK.Graphics.GraphicsMode | The OpenTK.Graphics.GraphicsMode of the GraphicsContext. |
window | IWindowInfo | The OpenTK.Platform.IWindowInfo to attach the GraphicsContext to. |
Résultat | System |
public GraphicsContext ( OpenTK.Graphics.GraphicsMode mode, IWindowInfo window, int major, int minor, GraphicsContextFlags flags ) : System | ||
mode | OpenTK.Graphics.GraphicsMode | The OpenTK.Graphics.GraphicsMode of the GraphicsContext. |
window | IWindowInfo | The OpenTK.Platform.IWindowInfo to attach the GraphicsContext to. |
major | int | The major version of the new GraphicsContext. |
minor | int | The minor version of the new GraphicsContext. |
flags | GraphicsContextFlags | The GraphicsContextFlags for the GraphicsContext. |
Résultat | System |
public MakeCurrent ( IWindowInfo window ) : void | ||
window | IWindowInfo | A valid |
Résultat | void |
public Update ( IWindowInfo window ) : void | ||
window | IWindowInfo | |
Résultat | void |