Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

wglGetCurrentContext function

The wglGetCurrentContext function obtains a handle to the current OpenGL rendering context of the calling thread.

Syntax


HGLRC WINAPI wglGetCurrentContext(void);

Parameters

This function has no parameters.

Return value

If the calling thread has a current OpenGL rendering context, wglGetCurrentContext returns a handle to that rendering context. Otherwise, the return value is NULL.

Remarks

The current OpenGL rendering context of a thread is associated with a device context by means of the wglMakeCurrent function. You can use the wglGetCurrentDC function to obtain a handle to the device context associated with the current OpenGL rendering context.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h

Library

Opengl32.lib

DLL

Opengl32.dll

See also

OpenGL on Windows
WGL Functions
wglCreateContext
wglDeleteContext
wglGetCurrentDC
wglMakeCurrent

 

 

Show: