ALLEGRO_PRIM_BUFFER_FLAGS(3alleg5)
π ALLEGRO_PRIM_BUFFER_FLAGS π
okay bestie, welcome to the Allegro reference manual (the 3alleg5 era, we're so back) β and today's main character is ALLEGRO_PRIM_BUFFER_FLAGS. she's a lil enum and she has OPINIONS about how your buffers get built. let's get into it π«Ά
β¨ SYNOPSIS β¨
#include <allegro5/allegro_primitives.h>
typedef enum ALLEGRO_PRIM_BUFFER_FLAGS
πΈ DESCRIPTION πΈ
so like. these are flags that tell Allegro how to create a vertex buffer or an index buffer. it's giving "setting the vibe before the party even starts" β¨ here's the whole roster, no skips:
ALLEGRO_PRIM_BUFFER_STREAMβ a hint to the driver that this buffer gets written to often, but only gets used a few times per frame. she's constantly getting rewritten, barely gets stage time. chaotic but valid πALLEGRO_PRIM_BUFFER_STATICβ a hint to the driver that this buffer is written to once and used often. set it and forget it, she's stable, she's reliable, she's the friend who always shows up πALLEGRO_PRIM_BUFFER_DYNAMICβ a hint to the driver that this buffer is written to often AND used often. both. at the same time. highkey the busiest girl in the group chat πALLEGRO_PRIM_BUFFER_READWRITEβ this one says you wanna be able to READ from this buffer. ngl by default that's disabled, purely for performance reasons (the driver is protecting you from yourself, respectfully). and bestie, listen β some platforms (like OpenGL ES) literally do not support reading from vertex buffers, so if you pass this flag toal_create_vertex_bufferoral_create_index_buffer, the call will fail. π no cap. so only use this if you know your platform rides for you.
fr fr: that last one is the danger flag. read the room (and the docs) before you send it.
β SINCE β
5.1.3 β she's been iconic since then, we've just been living in her world π
π¦ SEE ALSO π¦
and that's the whole page, bestie!! go forth and buffer responsibly π this was the Allegro reference manual, 3alleg5 edition β mwah, stan the docs, bye πβ¨
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms