al_set_d3d...e_callback(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’… al_set_d3d...e_callback(3) πŸ’…

okay so this page is from the Allegro reference manual, and it lives in the Library Functions Manual β€” very official, very D3D, very β€œbestie you need to handle your resources” energy πŸŽ€


🌸 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 πŸ¦‹

okay so real talk: the callback will be called whenever a D3D device is reset β€” like minimize, toggle fullscreen window, etc. (yes, β€œetc” is out here doing cardio 😭). 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. periodt πŸ’…

🌈 SINCE 🌈

5.1.0 β€” iconic since way back, no cap ✨


xoxo, the Allegro reference manual, page al_set_d3d...e_callback(3), undated and unbothered πŸ’–πŸ«Ά

πŸ“¦ where this page comes from
  • arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms