st_draw.h revision 8627a14ec872c532ac7660abfaf1a2db9b8608bb
18e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell/**************************************************************************
28e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell *
351da8ee85eccf0df3721cbd863cd174382d1ddfdBrian * Copyright 2004 Tungsten Graphics, Inc., Cedar Park, Texas.
48e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell * All Rights Reserved.
58e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell *
68e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell * Permission is hereby granted, free of charge, to any person obtaining a
78e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell * copy of this software and associated documentation files (the
88e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell * "Software"), to deal in the Software without restriction, including
98e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell * without limitation the rights to use, copy, modify, merge, publish,
108e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell * distribute, sub license, and/or sell copies of the Software, and to
118e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell * permit persons to whom the Software is furnished to do so, subject to
128e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell * the following conditions:
138e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell *
148e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell * The above copyright notice and this permission notice (including the
158e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell * next paragraph) shall be included in all copies or substantial portions
168e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell * of the Software.
178e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell *
188e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
198e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
208e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
218e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
228e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
238e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
248e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
258e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell *
268e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell **************************************************************************/
278e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell
288e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell /*
298e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell  * Authors:
308e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell  *   Keith Whitwell <keith@tungstengraphics.com>
318e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell  */
328e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell
338e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell
348e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#ifndef ST_DRAW_H
358e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define ST_DRAW_H
368e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell
37b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrianstruct _mesa_prim;
38b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrianstruct _mesa_index_buffer;
3951da8ee85eccf0df3721cbd863cd174382d1ddfdBrian
408e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwellvoid st_init_draw( struct st_context *st );
4151da8ee85eccf0df3721cbd863cd174382d1ddfdBrian
428e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwellvoid st_destroy_draw( struct st_context *st );
438e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell
44b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrianextern void
45b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrianst_draw_vbo(GLcontext *ctx,
46b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrian            const struct gl_client_array **arrays,
47b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrian            const struct _mesa_prim *prims,
48b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrian            GLuint nr_prims,
49b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrian            const struct _mesa_index_buffer *ib,
50b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrian            GLuint min_index,
51b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrian            GLuint max_index);
52b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrian
53b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrianextern void
54b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrianst_feedback_draw_vbo(GLcontext *ctx,
55b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrian                     const struct gl_client_array **arrays,
56b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrian                     const struct _mesa_prim *prims,
57b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrian                     GLuint nr_prims,
58b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrian                     const struct _mesa_index_buffer *ib,
59b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrian                     GLuint min_index,
60b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrian                     GLuint max_index);
61b4bacd1fca336f043d1ee3c3a346fbd42a3b02ebBrian
628627a14ec872c532ac7660abfaf1a2db9b8608bbKeith Whitwell/* Internal function:
638627a14ec872c532ac7660abfaf1a2db9b8608bbKeith Whitwell */
648627a14ec872c532ac7660abfaf1a2db9b8608bbKeith Whitwellextern GLuint
658627a14ec872c532ac7660abfaf1a2db9b8608bbKeith Whitwellst_pipe_vertex_format(GLenum type, GLuint size, GLboolean normalized);
668627a14ec872c532ac7660abfaf1a2db9b8608bbKeith Whitwell
678e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#endif
68