Committing in .
[mesa.git] / src / mesa / array_cache / acache.h
1 /* $Id: acache.h,v 1.3 2002/04/21 18:49:19 brianp Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 4.1
6 *
7 * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 *
26 * Authors:
27 * Keith Whitwell <keithw@valinux.com>
28 */
29
30 #ifndef _ARRAYCACHE_H
31 #define _ARRAYCACHE_H
32
33 #include "mtypes.h"
34
35
36 extern GLboolean
37 _ac_CreateContext( GLcontext *ctx );
38
39 extern void
40 _ac_DestroyContext( GLcontext *ctx );
41
42 extern void
43 _ac_InvalidateState( GLcontext *ctx, GLuint new_state );
44
45 extern struct gl_client_array *
46 _ac_import_vertex( GLcontext *ctx,
47 GLenum type,
48 GLuint reqstride,
49 GLuint reqsize,
50 GLboolean reqwritable,
51 GLboolean *writable );
52
53 extern struct gl_client_array *
54 _ac_import_normal( GLcontext *ctx,
55 GLenum type,
56 GLuint reqstride,
57 GLboolean reqwritable,
58 GLboolean *writable );
59
60 extern struct gl_client_array *
61 _ac_import_color( GLcontext *ctx,
62 GLenum type,
63 GLuint reqstride,
64 GLuint reqsize,
65 GLboolean reqwritable,
66 GLboolean *writable );
67
68 extern struct gl_client_array *
69 _ac_import_index( GLcontext *ctx,
70 GLenum type,
71 GLuint reqstride,
72 GLboolean reqwritable,
73 GLboolean *writable );
74
75 extern struct gl_client_array *
76 _ac_import_secondarycolor( GLcontext *ctx,
77 GLenum type,
78 GLuint reqstride,
79 GLuint reqsize,
80 GLboolean reqwritable,
81 GLboolean *writable );
82
83 extern struct gl_client_array *
84 _ac_import_fogcoord( GLcontext *ctx,
85 GLenum type,
86 GLuint reqstride,
87 GLboolean reqwritable,
88 GLboolean *writable );
89
90 extern struct gl_client_array *
91 _ac_import_edgeflag( GLcontext *ctx,
92 GLenum type,
93 GLuint reqstride,
94 GLboolean reqwritable,
95 GLboolean *writable );
96
97 extern struct gl_client_array *
98 _ac_import_texcoord( GLcontext *ctx,
99 GLuint unit,
100 GLenum type,
101 GLuint reqstride,
102 GLuint reqsize,
103 GLboolean reqwritable,
104 GLboolean *writable );
105
106 extern struct gl_client_array *
107 _ac_import_attrib( GLcontext *ctx,
108 GLuint index,
109 GLenum type,
110 GLuint reqstride,
111 GLuint reqsize,
112 GLboolean reqwritable,
113 GLboolean *writable );
114
115
116 /* Clients must call this function to validate state and set bounds
117 * before importing any data:
118 */
119 extern void
120 _ac_import_range( GLcontext *ctx, GLuint start, GLuint count );
121
122
123 /* Additional convenience function:
124 */
125 extern CONST void *
126 _ac_import_elements( GLcontext *ctx,
127 GLenum new_type,
128 GLuint count,
129 GLenum old_type,
130 CONST void *indices );
131
132
133 #endif