---
name: "al_set_d3d_device_release_callback"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_set_d3d_device_release_callback"
---

# al\_set\_d3d\_device\_release\_callback(3)

Allegro 5 API

## NAME

al\_set\_d3d\_device\_release\_callback - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_direct3d.h>
  void al_set_d3d_device_release_callback(
     void (*callback)(ALLEGRO_DISPLAY *display))
  ```

## DESCRIPTION

The callback will be called whenever a D3D device is reset (minimize, toggle fullscreen window, etc). In the callback you should release any d3d resources you have created yourself. The callback receives the affected display as a parameter.

Pass NULL to disable the callback.

## SINCE

5\.1.0
