Table of Contents

Method wglMakeCurrent

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

wglMakeCurrent(nint, nint)

Makes a specified OpenGL rendering context the current rendering context for the calling thread.

public static extern bool wglMakeCurrent(nint hdc, nint hglrc)

Parameters

hdc nint

A handle to the device context (HDC) to which the OpenGL rendering context is to be attached. This parameter cannot be IntPtr.Zero.

hglrc nint

A handle to the OpenGL rendering context (HGLRC) to be made current. This parameter can be IntPtr.Zero to release the current rendering context.

Returns

bool

true if the operation succeeds; otherwise, false.

Remarks

This method binds the specified OpenGL rendering context to the calling thread and the specified device context. If hglrc is IntPtr.Zero, the current rendering context is released from the calling thread. Only one rendering context can be current per thread at a time.