.\" Automatically generated by Pandoc 2.9.2.1 .\" .TH "al_create_index_buffer" "3alleg5" "" "Allegro reference manual" "" .hy .SH NAME .PP al_create_index_buffer - Allegro 5 API .SH SYNOPSIS .IP .nf \f[C] #include ALLEGRO_INDEX_BUFFER* al_create_index_buffer(int index_size, const void* initial_data, int num_indices, int flags) \f[R] .fi .SH DESCRIPTION .PP Creates a index buffer. Can return NULL if the buffer could not be created (e.g.\ the system only supports write-only buffers). .RS .PP \f[I]Note:\f[R] .PP This is an advanced feature, often unsupported on lower-end video cards. Be extra mindful of this function failing and make arrangements for fallback drawing functionality or a nice error message for users with such lower-end cards. .RE .PP \f[I]Parameters:\f[R] .IP \[bu] 2 index_size - Size of the index in bytes. Supported sizes are 2 for short integers and 4 for integers .IP \[bu] 2 initial_data - Memory buffer to copy from to initialize the index buffer. Can be \f[C]NULL\f[R], in which case the buffer is uninitialized. .IP \[bu] 2 num_indices - Number of indices the buffer will hold .IP \[bu] 2 flags - A combination of the ALLEGRO_PRIM_BUFFER_FLAGS(3alleg5) flags specifying how this buffer will be created. Passing 0 is the same as passing \f[C]ALLEGRO_PRIM_BUFFER_STATIC\f[R]. .SH SINCE .PP 5.1.8 .SH SEE ALSO .PP ALLEGRO_INDEX_BUFFER(3alleg5), al_destroy_index_buffer(3alleg5)