Export (0) Print
Expand All

wglDeleteContext function

Applies to: desktop apps only

The wglDeleteContext function deletes a specified OpenGL rendering context.

Syntax

BOOL WINAPI wglDeleteContext(
  HGLRC hglrc
);

Parameters

hglrc

Handle to an OpenGL rendering context that the function will delete.

Return value

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE. To get extended error information, call GetLastError.

Remarks

It is an error to delete an OpenGL rendering context that is the current context of another thread. However, if a rendering context is the calling thread's current context, the wglDeleteContext function changes the rendering context to being not current before deleting it.

The wglDeleteContext function does not delete the device context associated with the OpenGL rendering context when you call the wglMakeCurrent function. After calling wglDeleteContext, you must call DeleteDC to delete the associated device context.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Wingdi.h

Library

Opengl32.lib

DLL

Opengl32.dll

See also

OpenGL on Windows
WGL Functions
DeleteDC
wglCreateContext
wglGetCurrentContext
wglGetCurrentDC
wglMakeCurrent

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show:
© 2014 Microsoft