al_clear_depth_buffer(3)
π
al_clear_depth_buffer(3) β the depth buffer clear page, but make it cute π
okay so this whole page lives in the Library Functions Manual, and it's the Allegro 5 API page for al_clear_depth_buffer(3). yes bestie, we are clearing a depth buffer and we are going to be normal about it. π«Άβ¨
π NAME π
al_clear_depth_buffer β Allegro 5 API. That's the name, that's the vibe, periodt. π
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
void al_clear_depth_buffer(float z)
π DESCRIPTION π
Okay so al_clear_depth_buffer clears the depth buffer β confined by the clipping rectangle, bestie, don't forget that part β to the given value. π«§
A depth buffer is only available if it was requested with al_set_new_display_option(3) and the requirement could be met by the al_create_display(3) call creating the current display. no buffer, no clearing, that's the rule. π
Operations involving the depth buffer are also affected by al_set_render_state(3). keep that in mind, iykyk. π§
For example, if ALLEGRO_DEPTH_FUNCTION is set to ALLEGRO_RENDER_LESS, then a depth buffer value of 1 represents infinite distance β and thus 1 is a good value to use when clearing the depth buffer. iconic little fact. πβ
π¦ SINCE π¦
5.1.2 β that's when this one showed up, periodt. π
π SEE ALSO π
al_clear_to_color(3)β another page on the list, bestie. πal_set_clipping_rectangle(3)β the clipping rectangle, because the clear is confined by it. β¨al_set_render_state(3)β render state can affect depth-buffer operations. π¦al_set_new_display_option(3)β where you request the depth buffer in the first place. πΈ
xoxo bestie π this was the Allegro reference manual page for al_clear_depth_buffer(3) β and the footer isn't showing a date here, so no fake date from me, fr fr. ππ
π¦ 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