glx: indent -br -i3 -npcs --no-tabs singlepix.c
[mesa.git] / src / glx / x11 / indirect_vertex_array.h
1 /* -*- mode: c; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 3; coding: utf-8-unix -*- */
2 /*
3 * (C) Copyright IBM Corporation 2004, 2005
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sub license,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice (including the next
14 * paragraph) shall be included in all copies or substantial portions of the
15 * Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
20 * IBM,
21 * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
23 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 * SOFTWARE.
25 */
26
27 #ifndef INDIRECT_VERTEX_ARRAY_H
28 #define INDIRECT_VERTEX_ARRAY_H
29
30 extern const GLuint __glXTypeSize_table[16];
31
32 #define __glXTypeSize(e) ((((e) & ~0x0f) != 0x1400) \
33 ? 0 : __glXTypeSize_table[ (e) & 0x0f ])
34
35 extern void __glXArrayDisableAll(__GLXattribute * state);
36
37 extern GLboolean __glXSetArrayEnable(__GLXattribute * state,
38 GLenum key, unsigned index,
39 GLboolean enable);
40
41 extern GLboolean __glXGetArrayEnable(const __GLXattribute * const state,
42 GLenum key, unsigned index,
43 GLintptr * dest);
44 extern GLboolean __glXGetArraySize(const __GLXattribute * const state,
45 GLenum key, unsigned index,
46 GLintptr * dest);
47 extern GLboolean __glXGetArrayType(const __GLXattribute * const state,
48 GLenum key, unsigned index,
49 GLintptr * dest);
50 extern GLboolean __glXGetArrayStride(const __GLXattribute * const state,
51 GLenum key, unsigned index,
52 GLintptr * dest);
53 extern GLboolean __glXGetArrayPointer(const __GLXattribute * const state,
54 GLenum key, unsigned index,
55 void **dest);
56 extern GLboolean __glXGetArrayNormalized(const __GLXattribute * const state,
57 GLenum key, unsigned index,
58 GLintptr * dest);
59
60 extern void __glXPushArrayState(__GLXattribute * state);
61 extern void __glXPopArrayState(__GLXattribute * state);
62
63 extern GLuint __glXGetActiveTextureUnit(const __GLXattribute * const state);
64
65 #endif /* INDIRECT_VERTEX_ARRAY_H */