al_draw_vertex_buffer(3alleg5)

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

πŸ’… al_draw_vertex_buffer πŸ’…

okay bestie, welcome to the Allegro 5 API corner of the Allegro reference manual β€” this is the page for al_draw_vertex_buffer, and yes she eats. let's get into it ✨


✨ SYNOPSIS ✨

#include <allegro5/allegro_primitives.h>

int al_draw_vertex_buffer(ALLEGRO_VERTEX_BUFFER* vertex_buffer,
   ALLEGRO_BITMAP* texture, int start, int end, int type)

πŸ¦‹ DESCRIPTION πŸ¦‹

So what she does is: she draws a subset of the vertex buffer you hand her. Not the whole thing, just a lil slice. cute, right?

two rules though, and I need you to hear me:

  • the vertex buffer must not be locked. locked buffer = no draw, periodt.
  • and if you're drawing onto memory bitmaps, or using memory bitmap textures, the vertex buffer has to support reading β€” which means it must have been created with ALLEGRO_PRIM_BUFFER_READWRITE. no read, no draw. that's just the vibe check.

🌸 Parameters 🌸

  • vertex_buffer β€” the vertex buffer you wanna draw, babe. that's the one.
  • texture β€” the texture to use. pass NULL if you want to rock only color shaded primitives and no texture at all.
  • start β€” the start index of the subset of the vertex buffer you're drawing.
  • end β€” one past the last index of the subset you're drawing. yes, one past. she's exclusive at the top end, that's her thing.
  • type β€” a member of the ALLEGRO_PRIM_TYPE(3alleg5) enumeration, telling her exactly what kind of primitive to draw.
Returns: the number of primitives drawn πŸŽ€

⭐ SINCE ⭐

5.1.3 β€” she's been here a minute, an icon of the era πŸ‘‘


🫢 SEE ALSO 🫢


and that's the whole page, bestie πŸ’– straight from the Allegro reference manual, the one and only source for al_draw_vertex_buffer(3alleg5) β€” go forth and draw your lil subsets, you got this πŸ¦‹βœ¨

πŸ“¦ where this page comes from