Class MswSkiaOpenGLContext
Represents an OpenGL rendering context for a Windows control, designed for use with SkiaSharp's GPU-based rendering.
public class MswSkiaOpenGLContext : DisposableObject, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IDisposable, IBaseObject
- Inheritance
-
MswSkiaOpenGLContext
- Implements
Remarks
This class is specific to Windows and provides an OpenGL rendering context that is compatible with SkiaSharp. It initializes an OpenGL context using the specified control's window handle and sets up a SkiaSharp GRContext for GPU-based rendering. The caller must ensure that the associated control remains valid for the lifetime of this object.
The class relies on native Win32 API calls to configure the OpenGL context and is not cross-platform.
Proper disposal
of this object is required to
release native resources. Use the Dispose() method
or a using statement to ensure resources are cleaned up appropriately.
Constructors
- MswSkiaOpenGLContext(Control)
Initializes a new instance of the MswSkiaOpenGLContext class, setting up an OpenGL rendering context for the specified Windows control.
Properties
- Context
Gets the current graphics rendering context.
- ContextPtr
Gets the native OpenGL context pointer.
- Hdc
Gets the device context handle associated with the OpenGL context.
- Hwnd
Gets the window handle associated with the OpenGL context.
Methods
- DisposeManaged()
Override to dispose managed resources. Here we dispose all used object references.