al_lock_vertex_buffer(3alleg5)

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

πŸ’– al_lock_vertex_buffer β€” Allegro 5 API ✨

okay bestie, welcome to al_lock_vertex_buffer(3alleg5), the manual page you didn't know you needed 🫢


🌸 NAME 🌸

al_lock_vertex_buffer β€” Allegro 5 API, and yes that's the whole name, she's simple and she slays πŸ’…


✨ SYNOPSIS ✨

#include <allegro5/allegro_primitives.h>

void* al_lock_vertex_buffer(ALLEGRO_VERTEX_BUFFER* buffer, int offset,
   int length, int flags)

πŸ¦‹ DESCRIPTION πŸ¦‹

So what she does is lock a vertex buffer so you can actually get in there and access its data πŸ‘‘ like she's holding the door open for you while you rearrange the furniture, and when you're done you gotta let her go (that's al_unlock_vertex_buffer, we'll get to her).

She will return NULL if any of these things happen, and not in a cute way:

  • the parameters are invalid πŸ™ˆ
  • you asked to read from a write only buffer (bestie. no. that's not how that works πŸ’€)
  • the buffer is already locked β€” she's busy, she's booked, she's not doing double duty fr fr

πŸŽ€ Parameters πŸŽ€

  • buffer β€” the vertex buffer you wanna lock πŸ’œ literally the thing you're locking
  • offset β€” the vertex index where your locked range starts, like "begin here pls"
  • length β€” how many vertices you're locking, count them, be precise πŸ“
  • flags β€” one of ALLEGRO_LOCK_READONLY, ALLEGRO_LOCK_WRITEONLY or ALLEGRO_LOCK_READWRITE ⭐

🌈 SINCE 🌈

5.1.3 β€” she's been iconic since 5.1.3, no cap 🧚


πŸ’« SEE ALSO πŸ’«


and that's the page!! Allegro reference manual, al_lock_vertex_buffer(3alleg5), the source and version and date of it all β€” mwah πŸ’– go lock something (and unlock it, please, we beg) ✨

πŸ“¦ where this page comes from