File: al_create_vertex_buffer.3

package info (click to toggle)
allegro5 2%3A5.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 23,032 kB
  • sloc: ansic: 120,340; cpp: 15,707; objc: 4,805; python: 2,915; java: 2,195; sh: 887; xml: 86; makefile: 49; perl: 37; pascal: 24
file content (50 lines) | stat: -rw-r--r-- 1,413 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
.TH "al_create_vertex_buffer" "3" "" "Allegro reference manual" ""
.SH NAME
.PP
al_create_vertex_buffer \- Allegro 5 API
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <allegro5/allegro_primitives.h>

ALLEGRO_VERTEX_BUFFER*\ al_create_vertex_buffer(ALLEGRO_VERTEX_DECL*\ decl,
\ \ \ const\ void*\ initial_data,\ int\ num_vertices,\ int\ flags)
\f[]
.fi
.SH DESCRIPTION
.PP
Creates a vertex 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[]
.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[]
.IP \[bu] 2
decl \- Vertex type that this buffer will hold.
NULL implies that this buffer will hold ALLEGRO_VERTEX(3) vertices
.IP \[bu] 2
initial_data \- Memory buffer to copy from to initialize the vertex
buffer.
Can be \f[C]NULL\f[], in which case the buffer is uninitialized.
.IP \[bu] 2
num_vertices \- Number of vertices the buffer will hold
.IP \[bu] 2
flags \- A combination of the ALLEGRO_PRIM_BUFFER_FLAGS(3) flags
specifying how this buffer will be created.
Passing 0 is the same as passing \f[C]ALLEGRO_PRIM_BUFFER_STATIC\f[].
.SH SINCE
.PP
5.1.3
.SH SEE ALSO
.PP
ALLEGRO_VERTEX_BUFFER(3), al_destroy_vertex_buffer(3)