Drawing3d documented Class Library

FeaturesW32.wglDeleteContext Method

The wglDeleteContext function deletes a specified OpenGL rendering context.

[Visual Basic]
<PreserveSig> _
<DllImport(EntryPoint:="wglDeleteContext", CharSet:=CharSet.None, SetLastError:=True, ExactSpelling:=False, PreserveSig:=True, CallingConvention:=CallingConvention.Winapi, BestFitMapping:=False, ThrowOnUnmappableChar:=False, Value:="opengl32.dll")> _
<SuppressUnmanagedCodeSecurity> _
Public Shared Sub wglDeleteContext( _
   ByVal renderingContext As IntPtr _
)
[C#]
[PreserveSig]
[DllImport(EntryPoint="wglDeleteContext", CharSet=CharSet.None, SetLastError=True, ExactSpelling=False, PreserveSig=True, CallingConvention=CallingConvention.Winapi, BestFitMapping=False, ThrowOnUnmappableChar=False, Value="opengl32.dll")]
[SuppressUnmanagedCodeSecurity]
public static bool wglDeleteContext(
   IntPtr renderingContext
);

Parameters

renderingContext

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 GetLastWin32Error.

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.

See Also

FeaturesW32 Class | Drawing3d.OS.Windows Namespace | wglCreateContext | wglGetCurrentContext | wglMakeCurrent