ALLEGRO_RENDER_STATE(3)
π 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 to1, the values ofALLEGRO_ALPHA_FUNCTIONandALLEGRO_ALPHA_TEST_VALUEdefine 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 ofALLEGRO_RENDER_FUNCTION(3), only used whenALLEGRO_ALPHA_TESTis1. πALLEGRO_ALPHA_TEST_VALUEβ only used whenALLEGRO_ALPHA_TESTis1. Should be a value of0 - 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 ifALLEGRO_DEPTH_TESTis1, in addition to the write mask flag being set. π«ΆALLEGRO_DEPTH_TESTβ if this is set to1, compare the depth value of any newly written pixels with the depth value already in the buffer, according toALLEGRO_DEPTH_FUNCTION. Allegro primitives with no explicit z coordinate will write a value of0into the depth buffer. π₯ALLEGRO_DEPTH_FUNCTIONβ one ofALLEGRO_RENDER_FUNCTION(3), only used whenALLEGRO_DEPTH_TESTis1. π
πΈ 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