• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  Copyright (C) Intel Corp.  2006.  All Rights Reserved.
3  Intel funded Tungsten Graphics to
4  develop this 3D driver.
5 
6  Permission is hereby granted, free of charge, to any person obtaining
7  a copy of this software and associated documentation files (the
8  "Software"), to deal in the Software without restriction, including
9  without limitation the rights to use, copy, modify, merge, publish,
10  distribute, sublicense, and/or sell copies of the Software, and to
11  permit persons to whom the Software is furnished to do so, subject to
12  the following conditions:
13 
14  The above copyright notice and this permission notice (including the
15  next paragraph) shall be included in all copies or substantial
16  portions of the Software.
17 
18  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21  IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
22  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 
26  **********************************************************************/
27  /*
28   * Authors:
29   *   Keith Whitwell <keithw@vmware.com>
30   */
31 
32 #ifndef VBO_ATTRIB_H
33 #define VBO_ATTRIB_H
34 
35 
36 /*
37  * Note: The first attributes match the VERT_ATTRIB_* definitions
38  * in mtypes.h.  However, the tnl module has additional attributes
39  * for materials, color indexes, edge flags, etc.
40  */
41 /* Although it's nice to use these as bit indexes in a DWORD flag, we
42  * could manage without if necessary.  Another limit currently is the
43  * number of bits allocated for these numbers in places like vertex
44  * program instruction formats and register layouts.
45  */
46 enum {
47    VBO_ATTRIB_POS,
48    VBO_ATTRIB_NORMAL,
49    VBO_ATTRIB_COLOR0,
50    VBO_ATTRIB_COLOR1,
51    VBO_ATTRIB_FOG,
52    VBO_ATTRIB_INDEX,
53    VBO_ATTRIB_EDGEFLAG,
54    VBO_ATTRIB_TEX0,
55    VBO_ATTRIB_TEX1,
56    VBO_ATTRIB_TEX2,
57    VBO_ATTRIB_TEX3,
58    VBO_ATTRIB_TEX4,
59    VBO_ATTRIB_TEX5,
60    VBO_ATTRIB_TEX6,
61    VBO_ATTRIB_TEX7,
62    VBO_ATTRIB_POINT_SIZE,
63 
64    VBO_ATTRIB_GENERIC0, /* Not used? */
65    VBO_ATTRIB_GENERIC1,
66    VBO_ATTRIB_GENERIC2,
67    VBO_ATTRIB_GENERIC3,
68    VBO_ATTRIB_GENERIC4,
69    VBO_ATTRIB_GENERIC5,
70    VBO_ATTRIB_GENERIC6,
71    VBO_ATTRIB_GENERIC7,
72    VBO_ATTRIB_GENERIC8,
73    VBO_ATTRIB_GENERIC9,
74    VBO_ATTRIB_GENERIC10,
75    VBO_ATTRIB_GENERIC11,
76    VBO_ATTRIB_GENERIC12,
77    VBO_ATTRIB_GENERIC13,
78    VBO_ATTRIB_GENERIC14,
79    VBO_ATTRIB_GENERIC15,
80 
81    /* XXX: in the vertex program inputs_read flag, we alias
82     * materials and generics and use knowledge about the program
83     * (whether it is a fixed-function emulation) to
84     * differentiate.  Here we must keep them apart instead.
85     */
86    VBO_ATTRIB_MAT_FRONT_AMBIENT,
87    VBO_ATTRIB_MAT_BACK_AMBIENT,
88    VBO_ATTRIB_MAT_FRONT_DIFFUSE,
89    VBO_ATTRIB_MAT_BACK_DIFFUSE,
90    VBO_ATTRIB_MAT_FRONT_SPECULAR,
91    VBO_ATTRIB_MAT_BACK_SPECULAR,
92    VBO_ATTRIB_MAT_FRONT_EMISSION,
93    VBO_ATTRIB_MAT_BACK_EMISSION,
94    VBO_ATTRIB_MAT_FRONT_SHININESS,
95    VBO_ATTRIB_MAT_BACK_SHININESS,
96    VBO_ATTRIB_MAT_FRONT_INDEXES,
97    VBO_ATTRIB_MAT_BACK_INDEXES,
98 
99    VBO_ATTRIB_MAX
100 };
101 
102 #define VBO_ATTRIB_FIRST_MATERIAL VBO_ATTRIB_MAT_FRONT_AMBIENT
103 #define VBO_ATTRIB_LAST_MATERIAL VBO_ATTRIB_MAT_BACK_INDEXES
104 
105 #define VBO_MAX_COPIED_VERTS 3
106 
107 #endif
108