Added user_buffer_create() method
authorBrian <brian.paul@tungstengraphics.com>
Wed, 10 Oct 2007 23:57:47 +0000 (17:57 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Wed, 10 Oct 2007 23:57:47 +0000 (17:57 -0600)
This is used to wrap user-space data in a pipe buffer object to allow more
uniform treatment of various things.  For example, wrapping client-side
vertex arrays so they look like VBOs.

src/mesa/pipe/p_winsys.h

index 73ac61c33a2ac9bab4ac118ce54cadd644b84b9e..c80559c73038bd67a34e9b3ea92976d93e2602f3 100644 (file)
@@ -71,6 +71,12 @@ struct pipe_winsys
    struct pipe_buffer_handle *(*buffer_create)(struct pipe_winsys *sws, 
                                               unsigned alignment );
 
+   /** Create a buffer that wraps user-space data */
+   struct pipe_buffer_handle *(*user_buffer_create)(struct pipe_winsys *sws, 
+                                                    void *ptr,
+                                                    unsigned bytes);
+
+
    /** flags is bitmask of PIPE_BUFFER_FLAG_READ/WRITE */
    void *(*buffer_map)( struct pipe_winsys *sws, 
                        struct pipe_buffer_handle *buf,