RenderContext
Description
- Derived from
-
Disposable abstract
INativeHandle
IVideoMemoryContainer - Extended by
-
WGLContext sealed
Abstract base for classes that represent a render context for a specific API.
Public / Constructors
Create
Creates a new RenderContext object for the given API.
The returned RenderContext will not be active, i.e. IsActive will return false
.
- See also
Current
Creates a RenderContext object that wraps the current render context of the calling thread.
The returned RenderContext will be active, in the same way as if Begin had been called once.
Public / Methods
Begin
Begins to use this render context as the current one of the calling thread.
Each call to Begin that returns true
must have a paired call to End. Calls to Begin and End may be nested. This render context will be made current upon the first call to Begin.
- See also
BeginThrow
Calls Begin and throws an exception if it returns false
.
- RenderException
-
If Begin has returned
false
.
End
Ends using this render context as the current one of the calling thread.
This render context will be made not current upon the last call to End or when the RenderContext object is disposed. If End is called without a matching call to Begin, it will return silently.
- See also
Present
Presents the current renderings using the window that has been specified with Prepare, using the presentation mode of this render context.
Public / Attributes
IsActive
Checks if this render context is active.
The methods of the Gl object may only be called while the render context is active. Otherwise, the behaviour will be undefined. During the render cycle of a graphics context (see IBeginEnd.Begin and IBeginEnd.End of IGraphicsContext, the underlying render context will always be active).