Table of Contents

Constructor MswSkiaOpenGLContext

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

MswSkiaOpenGLContext(Control)

Initializes a new instance of the MswSkiaOpenGLContext class, setting up an OpenGL rendering context for the specified Windows control.

public MswSkiaOpenGLContext(Control control)

Parameters

control Control

The Control for which the OpenGL rendering context will be created. This control must have a valid window handle.

Remarks

This constructor configures the OpenGL pixel format and creates an OpenGL rendering context associated with the specified control. It uses the control's window handle to initialize the rendering context. The caller is responsible for ensuring that the control remains valid during the lifetime of the OpenGL context.

The created OpenGL context is compatible with SkiaSharp's GPU-based rendering, and a GRContext is initialized internally to support SkiaSharp operations.

This class is specific to Windows and relies on native Win32 API calls to configure the OpenGL context.