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