liballeg / allegro5

The official Allegro 5 git repository. Pull requests welcome!
https://liballeg.org
Other
1.9k stars 285 forks source link

Possible typo in docs with al_draw_indexed_buffer #1555

Closed MarkOates closed 5 months ago

MarkOates commented 6 months ago

For the documentation of al_draw_indexed_buffer, the start and end params represent positions of the index_buffer (not the vertex_buffer as stated in the docs).

Currently:

start - Start index of the subset of the vertex buffer (should be "index buffer") to draw end - One past the last index of the subset of the vertex buffer (should be "index buffer") to draw

The other listing https://liballeg.org/a5docs/trunk/primitives.html#al_draw_indexed_prim, appears to have it correct.

ReiquelApplegate commented 6 months ago

One piece of evidence that that the buffer start is indexing into is an index buffer and not vertex buffer:

_al_draw_buffer_common_soft (which is called from al_draw_indexed_buffer) contains this call:

idx = al_lock_index_buffer(index_buffer, start, num_vtx, ALLEGRO_LOCK_READONLY);