ALLEGRO_PRIM_BUFFER_FLAGS(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 to al_create_vertex_buffer or al_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