Module Buffers
#include <macawgpu.h>A buffer keeps a model's corners, so you send them once and draw them each frame. Buffers and index buffers are numbers.
Functions
- gpu_buffer
- Makes a vertex buffer: a list of corners kept ready to draw.
- gpu_bufferset
- Replaces what's in a buffer, keeping its layout.
- gpu_buffercount
- Tells you how many corners a buffer holds.
- gpu_freebuffer
- Lets go of a buffer you've finished with.
- gpu_indices
- Makes an index buffer: a list of which corners of a vertex buffer to draw, so a corner shared by several triangles is only kept once.
- gpu_freeindices
- Lets go of an index buffer you've finished with.
- gpu_drawarrays
- Draws a buffer's corners in order, as if you'd sent them between
gpu_beginandgpu_done. - gpu_drawelements
- Draws the corners of a buffer that an index buffer picks, in the index buffer's order.