al_draw_vertex_buffer(3alleg5)
π 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. passNULLif 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 theALLEGRO_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
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms