ALLEGRO_RENDER_STATE(3)

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

πŸ’… NAME πŸ’…

This is ALLEGRO_RENDER_STATE(3), straight out of the Library Functions Manual β€” manual name folded in near the top, as promised 🫢. The NAME section is doing the absolute most with the least: ALLEGRO_RENDER_STATE β€” Allegro 5 API ✨.


πŸŽ€ SYNOPSIS πŸŽ€

okay bestie, here's the exact synopsis vibe β€” include first, enum tease second:

#include <allegro5/allegro.h>

typedef enum ALLEGRO_RENDER_STATE {

✨ DESCRIPTION ✨

These are the possible render states which can be set with al_set_render_state(3) β€” no cap, that's the whole intro. Let's get into each one:

  • ALLEGRO_ALPHA_TEST β€” if you set this to 1, the values of ALLEGRO_ALPHA_FUNCTION and ALLEGRO_ALPHA_TEST_VALUE define a comparison function that gets performed on the alpha component of each pixel. Only if it evaluates to true is the pixel written. Otherwise no subsequent processing (like depth test or blending) is performed. This can be very useful, for example if a depth buffer is used but you do not want fully transparent pixels to modify it. πŸ‘‘
  • ALLEGRO_ALPHA_FUNCTION β€” one of ALLEGRO_RENDER_FUNCTION(3), only used when ALLEGRO_ALPHA_TEST is 1. πŸŽ€
  • ALLEGRO_ALPHA_TEST_VALUE β€” only used when ALLEGRO_ALPHA_TEST is 1. Should be a value of 0 - 255. πŸ’…
  • ALLEGRO_WRITE_MASK β€” this determines how the framebuffer and depthbuffer are updated whenever a pixel is written (in case alpha and/or depth testing is enabled: after all such enabled tests succeed). Depth values are only written if ALLEGRO_DEPTH_TEST is 1, in addition to the write mask flag being set. 🫢
  • ALLEGRO_DEPTH_TEST β€” if this is set to 1, compare the depth value of any newly written pixels with the depth value already in the buffer, according to ALLEGRO_DEPTH_FUNCTION. Allegro primitives with no explicit z coordinate will write a value of 0 into the depth buffer. πŸ”₯
  • ALLEGRO_DEPTH_FUNCTION β€” one of ALLEGRO_RENDER_FUNCTION(3), only used when ALLEGRO_DEPTH_TEST is 1. 🌈

🌸 SINCE 🌸

5.1.2 β€” yes bestie, this has been around since then, iconic behavior. πŸ’–


πŸ¦‹ SEE ALSO πŸ¦‹

Go check these out too, iykyk:


πŸ’– that's the whole page, bestie! source/version: Allegro reference manual; page tag: ALLEGRO_RENDER_STATE(3); date: not shown in this footer, so I'm not inventing one β€” periodt. 🫢
πŸ“¦ 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