Function gpu_buffer
#include <macawgpu.h>int gpu_buffer(const float *numbers, int count, const char *layout);
Makes a vertex buffer: a list of corners kept ready to draw.
Parameters
numbersconst float *- An array of
floats, corner after corner, each with the numbers its layout lists, in that order. countint- How many
floats there are in all, a whole number of corners. layoutconst char *- What each corner has:
pposition (3),ttexture place (2),nnormal (3),ccolour (1),llight baked in (1, where 1 is lit as usual). It needs ap.NULLmeans"p".
Returns int
The buffer's number. It's an error if count isn't a whole number of corners.
In Buffers, with gpu_bufferset, gpu_buffercount, gpu_freebuffer, gpu_indices, gpu_freeindices, gpu_drawarrays, gpu_drawelements.