---
name: "glutDestroyWindow"
section: "3"
platform: "linux"
package: "freeglut"
version: "3.8.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/glutDestroyWindow"
---

# glutDestroyWindow(3)

destroys the specified window.

## NAME

glutDestroyWindow - destroys the specified window.

## SYNTAX

```

```

void glutDestroyWindow(int win);

## ARGUMENTS

- *win*

  Identifier of GLUT window to destroy.

## DESCRIPTION

glutDestroyWindow destroys the window specified by win and the window's associated OpenGL context, logical colormap (if the window is color index), and overlay and related state (if an overlay has been established). Any subwindows of destroyed windows are also destroyed by glutDestroyWindow. If win was the current window, the current window becomes invalid ( glutGetWindow will return zero).

## SEE ALSO

glutCreateWindow, glutCreateSubWindow, glutDestroyMenu

## AUTHOR

Mark J. Kilgard (mjk@nvidia.com)
