Table of Contents

Method wglCreateContext

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

wglCreateContext(nint)

Creates a new OpenGL rendering context for the specified device context.

public static extern nint wglCreateContext(nint hdc)

Parameters

hdc nint

A handle to a device context for which the OpenGL rendering context is created.

Returns

nint

A handle to the created OpenGL rendering context if successful; otherwise, Zero.

Remarks

The created rendering context must be made current using wglMakeCurrent before it can be used for rendering. Ensure that the device context specified by hdc is compatible with OpenGL.