1Name 2 3 PGI_vertex_hints 4 5Name Strings 6 7 GL_PGI_vertex_hints 8 9Version 10 11 $Date: 1996/04/22 23:24:19 $ $Revision: 1.1 $ 12 13Number 14 15 76 16 17Dependencies 18 19 None 20 21Overview 22 23 The extension allows the app to give hints regarding what kinds of 24 OpenGL function calls will happen between Begin/End pairs. 25 26New Procedures and Functions 27 28 None 29 30New Tokens 31 32 Accepted by the <target> parameters of Hint and HintPGI: 33 34 VERTEX_DATA_HINT_PGI 107050 35 VERTEX_CONSISTENT_HINT_PGI 107051 36 MATERIAL_SIDE_HINT_PGI 107052 37 MAX_VERTEX_HINT_PGI 107053 38 39 Accepted by the <mode> parameters of Hint and HintPGI: 40 41 COLOR3_BIT_PGI 0x00010000 42 COLOR4_BIT_PGI 0x00020000 43 EDGEFLAG_BIT_PGI 0x00040000 44 INDEX_BIT_PGI 0x00080000 45 MAT_AMBIENT_BIT_PGI 0x00100000 46 MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 47 MAT_DIFFUSE_BIT_PGI 0x00400000 48 MAT_EMISSION_BIT_PGI 0x00800000 49 MAT_COLOR_INDEXES_BIT_PGI 0x01000000 50 MAT_SHININESS_BIT_PGI 0x02000000 51 MAT_SPECULAR_BIT_PGI 0x04000000 52 NORMAL_BIT_PGI 0x08000000 53 TEXCOORD1_BIT_PGI 0x10000000 54 TEXCOORD2_BIT_PGI 0x20000000 55 TEXCOORD3_BIT_PGI 0x40000000 56 TEXCOORD4_BIT_PGI 0x80000000 57 VERTEX23_BIT_PGI 0x00000004 58 VERTEX4_BIT_PGI 0x00000008 59 60Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation) 61 62 None 63 64Additions to Chapter 3 of the 1.0 Specification (Rasterization) 65 66 None 67 68Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations 69and the Frame Buffer) 70 71 None 72 73Additions to Chapter 5 of the 1.0 Specification (Special Functions) 74 75 Functions Hint and HintPGI accept the following targets and modes: 76 77 [All hints are subject to Push/Pop with the HINT_BIT attributes.] 78 79 <target> = VERTEX_DATA_HINT_PGI 80 81 This hint indicates which GL calls might occur between Begin/End pairs. 82 If <mode> is any of FALSE, then the hint is "disabled" -- this means 83 the application is not making any predictions about which GL calls 84 might occur between Begin/End pairs. Otherwise, <mode> must be a 85 bitwise OR of the following bits: 86 87 COLOR3_BIT_PGI Color3* 88 COLOR4_BIT_PGI Color4* 89 EDGEFLAG_BIT_PGI EdgeFlag* 90 INDEX_BIT_PGI Index* 91 MAT_AMBIENT_BIT_PGI Material*(pname=AMBIENT) 92 MAT_AMBIENT_AND_DIFFUSE_BIT_PGI Material*(pname=AMBIENT_AND_DIFFUSE) 93 MAT_DIFFUSE_BIT_PGI Material*(pname=DIFFUSE) 94 MAT_EMISSION_BIT_PGI Material*(pname=EMISSION) 95 MAT_COLOR_INDEXES_BIT_PGI Material*(pname=COLOR_INDEXES) 96 MAT_SHININESS_BIT_PGI Material*(pname=SHININESS) 97 MAT_SPECULAR_BIT_PGI Material*(pname=SPECULAR) 98 NORMAL_BIT_PGI Normal* 99 TEXCOORD1_BIT_PGI TexCoord1* 100 TEXCOORD2_BIT_PGI TexCoord2* 101 TEXCOORD3_BIT_PGI TexCoord3* 102 TEXCOORD4_BIT_PGI TexCoord4* 103 VERTEX23_BIT_PGI Vertex[23]* 104 VERTEX4_BIT_PGI Vertex4 105 106 At least one of the bits VERTEX23_BIT_PGI or VERTEX4_BIT_PGI must be 107 set in <mode>. 108 109 Each bit above indicates that one of the associated OpenGL functions 110 might occur between Begin/End pairs. If <mode> does not contain a 111 given bit, then GL may assume that associated functions will not occur 112 between Begin/End pairs -- in this case, behavior of these functions 113 is undefined. (But the functions will not cause program termination.) 114 115 <target> = VERTEX_CONSISTENT_HINT_PGI 116 117 This hint indicates that OpenGL function calls will occur 118 consistently between Begin/End pairs. If <mode> is either 119 TRUE or FASTEST, then the application effectively is making 120 the following assertion: Between Begin/End pairs, if any of 121 the following functions -- Color, EdgeFlag, Index, Material, 122 Normal, TexCoord -- occurs before one Vertex call, then it 123 will occur before all Vertex calls. (Where "before" means the 124 function will occur between the current Vertex function and the 125 previous Vertex of Begin function.) If <mode> is NICEST, DONT_CARE, 126 or FALSE, the application is asserting that any sequence of 127 functions might occur between Begin/End pairs. 128 129 If both VERTEX_CONSISTENT_HINT_PGI and VERTEX_DATA_HINT_PGI are 130 enabled, then GL further assumes that any functions indicated in 131 VERTEX_DATA_HINT_PGI will be called before each vertex call. When 132 a single bit in VERTEX_DATA_HINT_PGI indicates a group of possible 133 functions, GL assumes that at least one function from the group will 134 be called before each Vertex function between Begin/End pairs. 135 136 <target> = MAX_VERTEX_HINT_PGI 137 138 This hint indicates the maximum number of Vertex functions which 139 will occur between Begin/End pairs. If <mode> is FALSE then the 140 hint is "disabled" -- any number of Vertex functions might occur 141 between Begin/End pairs. However, if <mode> is any value greater 142 than 0, then the application is asserting that at most that number 143 of Vertex functions will occur between Begin/End pairs. In this 144 case, if the application exceeds the promised number of Vertex 145 calls, program termination may occur. Negative numbers also 146 disable the hint. 147 148 <target> = MATERIAL_SIDE_HINT_PGI 149 150 This hint indicates which <face> paramters will occur for any 151 Material functions called between Begin/End pairs. If <mode> 152 is any of FALSE, DONT_CARE, NICEST, then this hint is "disabled" -- 153 any <face> parameters might occur in Material functions called 154 between Begin/End pairs. If <mode> is FRONT, BACK, or 155 FRONT_AND_BACK, then only the given value will be used in 156 Material functions called between Begin/End pairs. If <mode> 157 is TRUE or FASTEST, then only a single (unspecified) <face> 158 parameter will be used in Material functions called between 159 Begin/End pairs. 160 161Additions to Chapter 6 of the 1.0 Specification (State and State Requests) 162 163 None 164 165Additions to the GLX Specification 166 167 None 168 169GLX Protocol 170 171 None 172 173Interactions with PGI_misc_hints 174 175 If the PGI_misc_hints extension is available, then the hints 176 described above can be used through the HintPGI client function. 177 178 If PGI_misc_hints is not avialable, then the hints above must 179 be used through the usual Hint function. 180 181Errors 182 183 INVALID_VALUE is generated if <target> for Hint or HintPGI is 184 VERTEX_DATA_HINT_PGI and <mode> is not FALSE or some combination 185 of the bits xxx_BIT_PGI. Also, if <mode> does not contain 186 VERTEX23_BIT_PGI or VERTEX4_BIT_PGI (or both), then INVALID_VALUE 187 is generated. 188 189 INVALID_ENUM is generated if <target> for Hint or HintPGI is 190 VERTEX_CONSISTENT_HINT_PGI and <mode> is not FASTEST, NICEST, 191 DONT_CARE, TRUE, or FALSE 192 193 INVALID_VALUE is generated if <target> for Hint or HintPGI is 194 MAX_VERTEX_HINT_PGI and <mode> is a negative number. 195 196 INVALID_ENUM is generated if <target> for Hint or HintPGI is 197 MATERIAL_SIDE_HINT_PGI and <mode> is not FASTEST, NICEST, 198 DONT_CARE, TRUE, FALSE, FRONT, BACK, or FRONT_AND_BACK. 199 200New State 201 Initial 202 Get Value Get Command Type Value Attrib 203 --------- ----------- ---- ------- ------ 204 205 VERTEX_DATA_HINT_PGI GetIntegerv Z FALSE 206 207 VERTEX_CONSISTENT_HINT_PGI GetIntegerv Z FALSE 208 209 MAX_VERTEX_HINT_PGI GetIntegerv Z FALSE 210 211 MATERIAL_SIDE_HINT_PGI GetIntegerv Z FALSE 212 213New Implementation Dependent State 214 215 None 216