blob: 6cb211535462c16e8c42115c19cc546de17a9c7b [file] [log] [blame]
Gareth Hughes22144ab2001-03-12 00:48:37 +00001/* $Id: acache.h,v 1.2 2001/03/12 00:48:41 gareth Exp $ */
2
Keith Whitwell770169f2000-12-26 15:14:04 +00003/*
4 * Mesa 3-D graphics library
5 * Version: 3.5
6 *
Gareth Hughes22144ab2001-03-12 00:48:37 +00007 * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
Keith Whitwell770169f2000-12-26 15:14:04 +00008 *
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
36extern GLboolean
37_ac_CreateContext( GLcontext *ctx );
38
39extern void
40_ac_DestroyContext( GLcontext *ctx );
41
42extern void
43_ac_InvalidateState( GLcontext *ctx, GLuint new_state );
44
45extern struct gl_client_array *
Gareth Hughes22144ab2001-03-12 00:48:37 +000046_ac_import_texcoord( GLcontext *ctx,
Keith Whitwell770169f2000-12-26 15:14:04 +000047 GLuint unit,
48 GLenum type,
Gareth Hughes22144ab2001-03-12 00:48:37 +000049 GLuint reqstride,
Keith Whitwell770169f2000-12-26 15:14:04 +000050 GLuint reqsize,
51 GLboolean reqwritable,
52 GLboolean *writable );
53
54extern struct gl_client_array *
Gareth Hughes22144ab2001-03-12 00:48:37 +000055_ac_import_vertex( GLcontext *ctx,
Keith Whitwell770169f2000-12-26 15:14:04 +000056 GLenum type,
Gareth Hughes22144ab2001-03-12 00:48:37 +000057 GLuint reqstride,
Keith Whitwell770169f2000-12-26 15:14:04 +000058 GLuint reqsize,
59 GLboolean reqwritable,
60 GLboolean *writable );
61
62extern struct gl_client_array *
Gareth Hughes22144ab2001-03-12 00:48:37 +000063_ac_import_normal( GLcontext *ctx,
Keith Whitwell770169f2000-12-26 15:14:04 +000064 GLenum type,
Gareth Hughes22144ab2001-03-12 00:48:37 +000065 GLuint reqstride,
Keith Whitwell770169f2000-12-26 15:14:04 +000066 GLboolean reqwritable,
67 GLboolean *writable );
68
69extern struct gl_client_array *
Gareth Hughes22144ab2001-03-12 00:48:37 +000070_ac_import_color( GLcontext *ctx,
Keith Whitwell770169f2000-12-26 15:14:04 +000071 GLenum type,
Gareth Hughes22144ab2001-03-12 00:48:37 +000072 GLuint reqstride,
Keith Whitwell770169f2000-12-26 15:14:04 +000073 GLuint reqsize,
74 GLboolean reqwritable,
75 GLboolean *writable );
76
77extern struct gl_client_array *
Gareth Hughes22144ab2001-03-12 00:48:37 +000078_ac_import_index( GLcontext *ctx,
Keith Whitwell770169f2000-12-26 15:14:04 +000079 GLenum type,
Gareth Hughes22144ab2001-03-12 00:48:37 +000080 GLuint reqstride,
Keith Whitwell770169f2000-12-26 15:14:04 +000081 GLboolean reqwritable,
82 GLboolean *writable );
83
84extern struct gl_client_array *
Gareth Hughes22144ab2001-03-12 00:48:37 +000085_ac_import_secondarycolor( GLcontext *ctx,
Keith Whitwell770169f2000-12-26 15:14:04 +000086 GLenum type,
Gareth Hughes22144ab2001-03-12 00:48:37 +000087 GLuint reqstride,
Keith Whitwell770169f2000-12-26 15:14:04 +000088 GLuint reqsize,
89 GLboolean reqwritable,
90 GLboolean *writable );
91
92extern struct gl_client_array *
Gareth Hughes22144ab2001-03-12 00:48:37 +000093_ac_import_fogcoord( GLcontext *ctx,
Keith Whitwell770169f2000-12-26 15:14:04 +000094 GLenum type,
Gareth Hughes22144ab2001-03-12 00:48:37 +000095 GLuint reqstride,
Keith Whitwell770169f2000-12-26 15:14:04 +000096 GLboolean reqwritable,
97 GLboolean *writable );
98
99extern struct gl_client_array *
Gareth Hughes22144ab2001-03-12 00:48:37 +0000100_ac_import_edgeflag( GLcontext *ctx,
Keith Whitwell770169f2000-12-26 15:14:04 +0000101 GLenum type,
Gareth Hughes22144ab2001-03-12 00:48:37 +0000102 GLuint reqstride,
Keith Whitwell770169f2000-12-26 15:14:04 +0000103 GLboolean reqwritable,
104 GLboolean *writable );
105
106
107/* Clients must call this function to validate state and set bounds
Gareth Hughes22144ab2001-03-12 00:48:37 +0000108 * before importing any data:
Keith Whitwell770169f2000-12-26 15:14:04 +0000109 */
Gareth Hughes22144ab2001-03-12 00:48:37 +0000110extern void
Keith Whitwell770169f2000-12-26 15:14:04 +0000111_ac_import_range( GLcontext *ctx, GLuint start, GLuint count );
112
113
114/* Additional convenience function:
115 */
116extern CONST void *
117_ac_import_elements( GLcontext *ctx,
118 GLenum new_type,
119 GLuint count,
120 GLenum old_type,
121 CONST void *indices );
122
123
124#endif