ALLEGRO_PRIM_BUFFER_FLAGS(3)

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

πŸ’… ALLEGRO_PRIM_BUFFER_FLAGS πŸ’…

okay so bestie, welcome to the Allegro 5 API section of the Allegro reference manual β€” this one's short and sweet, no cap πŸ“


✨ NAME ✨

ALLEGRO_PRIM_BUFFER_FLAGS β€” literally just the Allegro 5 API being its iconic self πŸŽ€


🌸 SYNOPSIS 🌸

#include <allegro5/allegro_primitives.h>

typedef enum ALLEGRO_PRIM_BUFFER_FLAGS

that's it, that's the whole vibe check πŸ’œ


πŸ¦‹ DESCRIPTION πŸ¦‹

so these are the flags you pass to tell the driver how you want your vertex buffer or index buffer to be made πŸ’« like, it's giving "letting the driver know what's up before it commits", iykyk.

  • ALLEGRO_PRIM_BUFFER_STREAM β€” hints to the driver that this buffer gets written to often but only used a few times per frame πŸ‘€ like a group chat you're always typing in but barely scrolling back through. main character energy, lowkey.
  • ALLEGRO_PRIM_BUFFER_STATIC β€” hints to the driver that the buffer is written to once and then used often ✨ set it and forget it, the way that a good playlist just stays on repeat. obsessed.
  • ALLEGRO_PRIM_BUFFER_DYNAMIC β€” hints to the driver that the buffer is written to often and used often πŸ”₯ both. it's doing the most and honestly? slay.
  • ALLEGRO_PRIM_BUFFER_READWRITE β€” specifies that you want to be able read from this buffer πŸ™ˆ by default this is disabled for performance, so it's lowkey off unless you ask. and heads up bestie: some platforms (like OpenGL ES) 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 πŸ’€ not a vibe. protect your error handling fr fr.
⚠️ real talk: that last one is not a drill. pass ALLEGRO_PRIM_BUFFER_READWRITE on a platform that doesn't support it and the create call just fails. check your return values, queen πŸ‘‘

⭐ SINCE ⭐

5.1.3 β€” she's been here since 5.1.3 and she's been serving ever since πŸ‘‘


🫢 SEE ALSO 🫢

go read those next, they're the ones actually doing the work πŸ’–


that's the page, bestie 🌈 courtesy of the Allegro reference manual β€” Allegro 5 API, since version 5.1.3. now go build something iconic πŸ§šβ€β™€οΈπŸ’«

πŸ“¦ 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