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

# glutSetCursor(3)

changes the cursor image of the current window.

## NAME

glutSetCursor - changes the cursor image of the current window.

## SYNTAX

```

```

void glutSetCursor(int cursor);

## ARGUMENTS

- *cursor*

  Name of cursor image to change to.  Possible values follow:

- **GLUT\_CURSOR\_RIGHT\_ARROW**

  Arrow pointing up and to the right.

- **GLUT\_CURSOR\_LEFT\_ARROW**

  Arrow pointing up and to the left.

- **GLUT\_CURSOR\_INFO**

  Pointing hand.

- **GLUT\_CURSOR\_DESTROY**

  Skull & cross bones.

- **GLUT\_CURSOR\_HELP**

  Question mark.

- **GLUT\_CURSOR\_CYCLE**

  Arrows rotating in a circle.

- **GLUT\_CURSOR\_SPRAY**

  Spray can.

- **GLUT\_CURSOR\_WAIT**

  Wrist watch.

- **GLUT\_CURSOR\_TEXT**

  Insertion point cursor for text.

- **GLUT\_CURSOR\_CROSSHAIR**

  Simple cross-hair.

- **GLUT\_CURSOR\_UP\_DOWN**

  Bi-directional pointing up & down.

- **GLUT\_CURSOR\_LEFT\_RIGHT**

  Bi-directional pointing left & right.

- **GLUT\_CURSOR\_TOP\_SIDE**

  Arrow pointing to top side.

- **GLUT\_CURSOR\_BOTTOM\_SIDE**

  Arrow pointing to bottom side.

- **GLUT\_CURSOR\_LEFT\_SIDE**

  Arrow pointing to left side.

- **GLUT\_CURSOR\_RIGHT\_SIDE**

  Arrow pointing to right side.

- **GLUT\_CURSOR\_TOP\_LEFT\_CORNER**

  Arrow pointing to top-left corner.

- **GLUT\_CURSOR\_TOP\_RIGHT\_CORNER**

  Arrow pointing to top-right corner.

- **GLUT\_CURSOR\_BOTTOM\_RIGHT\_CORNER**

  Arrow pointing to bottom-left corner.

- **GLUT\_CURSOR\_BOTTOM\_LEFT\_CORNER**

  Arrow pointing to bottom-right corner.

- **GLUT\_CURSOR\_FULL\_CROSSHAIR**

  Full-screen cross-hair cursor (if possible, otherwise GLUT\_CURSOR\_CROSSHAIR).

- **GLUT\_CURSOR\_NONE**

  Invisible cursor.

- **GLUT\_CURSOR\_INHERIT**

  Use parent's cursor.

## DESCRIPTION

glutSetCursor changes the cursor image of the current window. Each call requests the window system change the cursor appropriately. The cursor image when a window is created is GLUT\_CURSOR\_INHERIT. The exact cursor images used are implementation dependent. The intent is for the image to convey the meaning of the cursor name. For a top-level window, GLUT\_CURSOR\_INHERIT uses the default window system cursor.

## X IMPLEMENTATION NOTES

GLUT for X uses SGI's \_SGI\_CROSSHAIR\_CURSOR convention to access a full-screen cross-hair cursor if possible.

## SEE ALSO

glutCreateWindow, glutCreateSubWindow

## AUTHOR

Mark J. Kilgard (mjk@nvidia.com)
