Macaw OS C reference

Function gpu_indices

#include <macawgpu.h>
int gpu_indices(const int *list, int count);

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.

Parameters

listconst int *
An array of int corner numbers, counting from 0, up to 65535.
countint
How many numbers are in list.

Returns int

The index buffer's number. A number out of range is an error.

In Buffers, with gpu_buffer, gpu_bufferset, gpu_buffercount, gpu_freebuffer, gpu_freeindices, gpu_drawarrays, gpu_drawelements.