1e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian/**************************************************************************
2e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian *
3e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
4e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * All Rights Reserved.
5e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian *
6e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * Permission is hereby granted, free of charge, to any person obtaining a
7e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * copy of this software and associated documentation files (the
8e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * "Software"), to deal in the Software without restriction, including
9e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * without limitation the rights to use, copy, modify, merge, publish,
10e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * distribute, sub license, and/or sell copies of the Software, and to
11e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * permit persons to whom the Software is furnished to do so, subject to
12e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * the following conditions:
13e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian *
14e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * The above copyright notice and this permission notice (including the
15e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * next paragraph) shall be included in all copies or substantial portions
16e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * of the Software.
17e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian *
18e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
22e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian *
26e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian **************************************************************************/
27e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian
28e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian#ifndef U_DRAWQUAD_H
29e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian#define U_DRAWQUAD_H
30e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian
31e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian
326d28bf917fb1d741d90fd3f05c22769376021fcaChia-I Wu#include "pipe/p_compiler.h"
336d28bf917fb1d741d90fd3f05c22769376021fcaChia-I Wu#include "pipe/p_context.h"
346d28bf917fb1d741d90fd3f05c22769376021fcaChia-I Wu
356d28bf917fb1d741d90fd3f05c22769376021fcaChia-I Wu
368c71406c74b80fa2d2b1a488938c3b9dfc156343Brian#ifdef __cplusplus
378c71406c74b80fa2d2b1a488938c3b9dfc156343Brianextern "C" {
388c71406c74b80fa2d2b1a488938c3b9dfc156343Brian#endif
398c71406c74b80fa2d2b1a488938c3b9dfc156343Brian
40287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwellstruct pipe_resource;
41d5062fb3a315c46d77d5c954a3e3c14be1907d33Marek Olšákstruct cso_context;
428c71406c74b80fa2d2b1a488938c3b9dfc156343Brian
43f623d06c495c671f687d4a70c9281c64e5875232Keith Whitwell#include "util/u_draw.h"
446d28bf917fb1d741d90fd3f05c22769376021fcaChia-I Wu
458c71406c74b80fa2d2b1a488938c3b9dfc156343Brianextern void
46d5062fb3a315c46d77d5c954a3e3c14be1907d33Marek Olšákutil_draw_vertex_buffer(struct pipe_context *pipe, struct cso_context *cso,
47287c94ea4987033f9c99a2f91c5750c9083504caKeith Whitwell                        struct pipe_resource *vbuf, uint offset,
488c71406c74b80fa2d2b1a488938c3b9dfc156343Brian                        uint num_attribs, uint num_verts, uint prim_type);
498c71406c74b80fa2d2b1a488938c3b9dfc156343Brian
50fa20733a622770eaaa941f64d570d7b63d8f37b6Marek Olšákvoid
51fa20733a622770eaaa941f64d570d7b63d8f37b6Marek Olšákutil_draw_user_vertex_buffer(struct cso_context *cso, void *buffer,
52fa20733a622770eaaa941f64d570d7b63d8f37b6Marek Olšák                             uint prim_type, uint num_verts, uint num_attribs);
538c71406c74b80fa2d2b1a488938c3b9dfc156343Brian
54e3a747f1fefc147e8dca5729bcc8d68f419c595aBrianextern void
55d5062fb3a315c46d77d5c954a3e3c14be1907d33Marek Olšákutil_draw_texquad(struct pipe_context *pipe, struct cso_context *cso,
56e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian                  float x0, float y0, float x1, float y1, float z);
57e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian
58e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian
598c71406c74b80fa2d2b1a488938c3b9dfc156343Brian#ifdef __cplusplus
608c71406c74b80fa2d2b1a488938c3b9dfc156343Brian}
618c71406c74b80fa2d2b1a488938c3b9dfc156343Brian#endif
628c71406c74b80fa2d2b1a488938c3b9dfc156343Brian
638c71406c74b80fa2d2b1a488938c3b9dfc156343Brian
64e3a747f1fefc147e8dca5729bcc8d68f419c595aBrian#endif
65