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