1848b8605Smrg/*
2848b8605Smrg * (C) Copyright IBM Corporation 2004, 2005
3848b8605Smrg * All Rights Reserved.
4848b8605Smrg *
5848b8605Smrg * Permission is hereby granted, free of charge, to any person obtaining a
6848b8605Smrg * copy of this software and associated documentation files (the "Software"),
7848b8605Smrg * to deal in the Software without restriction, including without limitation
8848b8605Smrg * the rights to use, copy, modify, merge, publish, distribute, sub license,
9848b8605Smrg * and/or sell copies of the Software, and to permit persons to whom the
10848b8605Smrg * Software is furnished to do so, subject to the following conditions:
11848b8605Smrg *
12848b8605Smrg * The above copyright notice and this permission notice (including the next
13848b8605Smrg * paragraph) shall be included in all copies or substantial portions of the
14848b8605Smrg * Software.
15848b8605Smrg *
16848b8605Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17848b8605Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18848b8605Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
19848b8605Smrg * IBM,
20848b8605Smrg * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21848b8605Smrg * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
22848b8605Smrg * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23848b8605Smrg * SOFTWARE.
24848b8605Smrg */
25848b8605Smrg
26848b8605Smrg#ifndef INDIRECT_VERTEX_ARRAY_H
27848b8605Smrg#define INDIRECT_VERTEX_ARRAY_H
28848b8605Smrg
29848b8605Smrgextern const GLuint __glXTypeSize_table[16];
30848b8605Smrg
31848b8605Smrg#define __glXTypeSize(e) ((((e) & ~0x0f) != 0x1400) \
32848b8605Smrg    ? 0 : __glXTypeSize_table[ (e) & 0x0f ])
33848b8605Smrg
34848b8605Smrgextern void __glXArrayDisableAll(__GLXattribute * state);
35848b8605Smrg
36848b8605Smrgextern GLboolean __glXSetArrayEnable(__GLXattribute * state,
37848b8605Smrg                                     GLenum key, unsigned index,
38848b8605Smrg                                     GLboolean enable);
39848b8605Smrg
40848b8605Smrgextern GLboolean __glXGetArrayEnable(const __GLXattribute * const state,
41848b8605Smrg                                     GLenum key, unsigned index,
42848b8605Smrg                                     GLintptr * dest);
43848b8605Smrgextern GLboolean __glXGetArraySize(const __GLXattribute * const state,
44848b8605Smrg                                   GLenum key, unsigned index,
45848b8605Smrg                                   GLintptr * dest);
46848b8605Smrgextern GLboolean __glXGetArrayType(const __GLXattribute * const state,
47848b8605Smrg                                   GLenum key, unsigned index,
48848b8605Smrg                                   GLintptr * dest);
49848b8605Smrgextern GLboolean __glXGetArrayStride(const __GLXattribute * const state,
50848b8605Smrg                                     GLenum key, unsigned index,
51848b8605Smrg                                     GLintptr * dest);
52848b8605Smrgextern GLboolean __glXGetArrayPointer(const __GLXattribute * const state,
53848b8605Smrg                                      GLenum key, unsigned index,
54848b8605Smrg                                      void **dest);
55848b8605Smrgextern GLboolean __glXGetArrayNormalized(const __GLXattribute * const state,
56848b8605Smrg                                         GLenum key, unsigned index,
57848b8605Smrg                                         GLintptr * dest);
58848b8605Smrg
59848b8605Smrgextern void __glXPushArrayState(__GLXattribute * state);
60848b8605Smrgextern void __glXPopArrayState(__GLXattribute * state);
61848b8605Smrg
62848b8605Smrgextern GLuint __glXGetActiveTextureUnit(const __GLXattribute * const state);
63848b8605Smrg
64848b8605Smrg#endif /* INDIRECT_VERTEX_ARRAY_H */
65