al_lock_index_buffer(3)

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

πŸ’… al_lock_index_buffer(3) πŸ’…

okay so bestie, we're in the Library Functions Manual and this is the Allegro 5 API page for al_lock_index_buffer. Pull up a chair, hydrate, and let's lock an index buffer the right way ✨

πŸ’– NAME πŸ’–

al_lock_index_buffer β€” Allegro 5 API. That's the whole name situation: this is the Allegro 5 API function for locking an index buffer, periodt πŸ’…

✨ SYNOPSIS ✨

#include <allegro5/allegro_primitives.h>

void* al_lock_index_buffer(ALLEGRO_INDEX_BUFFER* buffer, int offset,
    int length, int flags)

πŸŽ€ DESCRIPTION πŸŽ€

Locks an index buffer so you can access its data β€” yes, that's the whole point, bestie. It returns NULL if the parameters are invalid, if reading is requested from a write only buffer, and if the buffer is already locked. So like, check yourself before you wreck yourself on those three conditions 😭

Parameters:

  • buffer β€” the index buffer you wanna lock 🫢
  • offset β€” the element index of the start of the locked range; think "where the lock begins" ✨
  • length β€” how many indices to lock, i.e. the size of your locked little zone πŸ’…
  • flags β€” one of ALLEGRO_LOCK_READONLY, ALLEGRO_LOCK_WRITEONLY or ALLEGRO_LOCK_READWRITE; pick your access vibe, but only from those exact three 🌈

πŸ¦‹ SINCE πŸ¦‹

5.1.8 β€” she's been around since 5.1.8, iconic behavior πŸ‘‘

🌈 SEE ALSO 🌈


Cute lil sign-off: this page is from the Allegro reference manual, and the footer name is al_lock_index_buffer(3). No date listed on the original footer, so I'm not gonna invent one β€” mwah πŸ’‹

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