diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2007-01-16 09:47:35 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2007-01-16 09:47:35 +0000 |
commit | 0b412f8f156b46b0e7220a2b61e0f41781769f66 (patch) | |
tree | e8c2b71dd2dfa3687ec72b9767e6a82826a90979 /src/mesa/vbo/vbo.h | |
parent | 5363e3331ba016c9b1b9d5167473d69f32be3dac (diff) | |
parent | 584def75ad8dd13add5b4ed7e364d13202539539 (diff) |
Merge branch 'vbo_0_1_branch' into vbo-0.2
Diffstat (limited to 'src/mesa/vbo/vbo.h')
-rw-r--r-- | src/mesa/vbo/vbo.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h index 80f7a3322b..c81d83f9b6 100644 --- a/src/mesa/vbo/vbo.h +++ b/src/mesa/vbo/vbo.h @@ -65,4 +65,40 @@ void _vbo_DestroyContext( GLcontext *ctx ); void _vbo_InvalidateState( GLcontext *ctx, GLuint new_state ); +typedef void (*vbo_draw_func)( GLcontext *ctx, + const struct gl_client_array **arrays, + const struct _mesa_prim *prims, + GLuint nr_prims, + const struct _mesa_index_buffer *ib, + GLuint min_index, + GLuint max_index ); + + + + +/* Utility function to cope with various constraints on tnl modules or + * hardware. This can be used to split an incoming set of arrays and + * primitives against the following constraints: + * - Maximum number of indices in index buffer. + * - Maximum number of vertices referenced by index buffer. + * - Maximum hardware vertex buffer size. + */ +struct split_limits { + GLuint max_verts; + GLuint max_indices; + GLuint max_vb_size; /* bytes */ +}; + + +void vbo_split_prims( GLcontext *ctx, + const struct gl_client_array *arrays[], + const struct _mesa_prim *prim, + GLuint nr_prims, + const struct _mesa_index_buffer *ib, + GLuint min_index, + GLuint max_index, + vbo_draw_func draw, + const struct split_limits *limits ); + + #endif |