1.1 --- a/src/display.h Fri Oct 22 20:55:32 2010 +1000
1.2 +++ b/src/display.h Tue Nov 29 17:52:43 2011 +1000
1.4 int stencil_bits; /* 0 = no stencil buffer */
1.7 +struct vertex_buffer {
1.9 + * Map the buffer into the host address space (if necessary) in preparation
1.10 + * for filling the buffer. This also implies a fence operation.
1.11 + * @param buf previously allocated buffer
1.12 + * @param size number of bytes of the buffer actually to be used. The buffer
1.13 + * will be resized if necessary.
1.14 + * @return a pointer to the start of the buffer.
1.16 + void *(*map)(vertex_buffer_t buf, uint32_t size);
1.19 + * Unmap the buffer, after the vertex data is written.
1.20 + * @return the buffer base to use for gl*Pointer calls
1.22 + void *(*unmap)(vertex_buffer_t buf);
1.25 + * Mark the buffer as finished, indicating that the vertex data is no
1.26 + * longer required (ie rendering is complete).
1.28 + void (*finished)(vertex_buffer_t buf);
1.31 + * Delete the buffer and all associated resources.
1.33 + void (*destroy)(vertex_buffer_t buf);
1.35 + /* Private data */
1.38 + uint32_t capacity;
1.39 + uint32_t mapped_size;
1.45 * Core video driver - exports function to setup a GL context, as well as handle
1.46 * keyboard input and display resultant output.
1.47 @@ -213,11 +250,17 @@
1.48 int rowstride, int format );
1.51 + * Create a new vertex buffer
1.53 + vertex_buffer_t (*create_vertex_buffer)( );
1.56 * Dump driver-specific information about the implementation to the given stream
1.58 void (*print_info)( FILE *out );
1.60 struct display_capabilities capabilities;
1.62 } *display_driver_t;