ALLEGRO_PRIM_BUFFER_FLAGS(3)
π 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 toal_create_vertex_bufferoral_create_index_bufferthe 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