---
name: "glXDestroyContext"
section: "3x"
platform: "linux"
package: "xlibmesa-gl-dev"
version: "4.3.0.dfsg.1-14sarge7"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/glXDestroyContext"
---

# glXDestroyContext(3x)

destroy a GLX context

## NAME

glXDestroyContext - destroy a GLX context

## C SPECIFICATION

void **glXDestroyContext**( Display *\*dpy*,

```
	GLXContext ctx )
```

delim $$

## PARAMETERS

- *dpy*

  Specifies the connection to the X server.

- *ctx*

  Specifies the GLX context to be destroyed.

## DESCRIPTION

If the GLX rendering context *ctx* is not current to any thread, **glXDestroyContext**  destroys it immediately. Otherwise, *ctx* is destroyed when it becomes not current to any thread. In either case, the resource ID referenced by *ctx* is freed immediately.

## ERRORS

**GLXBadContext** is generated if *ctx* is not a valid GLX context.

## SEE ALSO

**glXCreateContext**, **glXMakeCurrent**
