filename | src/display.h |
changeset | 1159:580436b01b6c |
prev | 1134:f502f3d32f90 |
next | 1239:be3121267597 |
author | Nathan Keynes <nkeynes@lxdream.org> |
date | Sat Sep 17 22:39:36 2011 +1000 (12 years ago) |
permissions | -rw-r--r-- |
last change | Fix structure packing on v55 nero images (64-bit) Add basic support for track mode 16 (CDDA + subchannel data, 2448 bytes) |
file | annotate | diff | log | raw |
1.1 --- a/src/display.h Fri Oct 22 20:55:32 2010 +10001.2 +++ b/src/display.h Sat Sep 17 22:39:36 2011 +10001.3 @@ -108,6 +108,43 @@1.4 int stencil_bits; /* 0 = no stencil buffer */1.5 };1.7 +struct vertex_buffer {1.8 + /**1.9 + * Map the buffer into the host address space (if necessary) in preparation1.10 + * for filling the buffer. This also implies a fence operation.1.11 + * @param buf previously allocated buffer1.12 + * @param size number of bytes of the buffer actually to be used. The buffer1.13 + * will be resized if necessary.1.14 + * @return a pointer to the start of the buffer.1.15 + */1.16 + void *(*map)(vertex_buffer_t buf, uint32_t size);1.17 +1.18 + /**1.19 + * Unmap the buffer, after the vertex data is written.1.20 + * @return the buffer base to use for gl*Pointer calls1.21 + */1.22 + void *(*unmap)(vertex_buffer_t buf);1.23 +1.24 + /**1.25 + * Mark the buffer as finished, indicating that the vertex data is no1.26 + * longer required (ie rendering is complete).1.27 + */1.28 + void (*finished)(vertex_buffer_t buf);1.29 +1.30 + /**1.31 + * Delete the buffer and all associated resources.1.32 + */1.33 + void (*destroy)(vertex_buffer_t buf);1.34 +1.35 + /* Private data */1.36 + void *data;1.37 + GLuint id;1.38 + uint32_t capacity;1.39 + uint32_t mapped_size;1.40 + GLuint fence;1.41 +};1.42 +1.43 +1.44 /**1.45 * Core video driver - exports function to setup a GL context, as well as handle1.46 * keyboard input and display resultant output.1.47 @@ -213,11 +250,17 @@1.48 int rowstride, int format );1.50 /**1.51 + * Create a new vertex buffer1.52 + */1.53 + vertex_buffer_t (*create_vertex_buffer)( );1.54 +1.55 + /**1.56 * Dump driver-specific information about the implementation to the given stream1.57 */1.58 void (*print_info)( FILE *out );1.60 struct display_capabilities capabilities;1.61 +1.62 } *display_driver_t;1.64 /**
.