1Name 2 3 IBM_cull_vertex 4 5Name Strings 6 7 GL_IBM_cull_vertex 8 9Version 10 11 IBM Id: cull_vertex.spec,v 1.4 2000/02/11 15:11:46 brokensh Exp 12 13Number 14 15 199 16 17Dependencies 18 19 EXT_cull_vertex affects the definition of this extension 20 21Overview 22 23 IBM_cull_vertex provides a subset of the vertex culling functionality 24 found in EXT_cull_vertex without providing a guarantee that faces will 25 be culled because of it. EXT_cull_vertex is a technically superior 26 solution, but the vertex culling aspect of IBM_cull_vertex provides 27 generally useful function cheaply (without imposing the mandated 28 culling found in EXT_cull_vertex). 29 30Issues 31 32 * Should the application be allowed to specify eye direction explicitly, 33 as is the case in EXT_cull_vertex? Not in this specification; 34 addressed by the full EXT_cull_vertex extension. 35 36 * Should a control be provided to reverse the eye direction, which would 37 be necessary to cull correctly if DepthRange is specified with near > 38 far? Or if the normals specified were reversed? FrontFace could be 39 used in combination with two sided lighting to produce realistic 40 lighting effects if the normals were consistenly reversed. Neither is 41 addressed in the current specification. Both are addressed by 42 EXT_cull_vertex. 43 44 * Should a control be provided to perform vertex culling with a local eye 45 position? Not in this specification; addressed by EXT_cull_vertex. 46 47 * Should forward compatibility between IBM_cull_vertex and 48 EXT_cull_vertex be provided (i.e., applications must change if/when we 49 fully implement EXT_cull_vertex)? Probably not. 50 51New Procedures and Functions 52 53 None 54 55New Tokens 56 57 Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and by 58 the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and 59 GetDoublev: 60 61 CULL_VERTEX_IBM 103050 62 63Additions to Chapter 2 of the GL Specification (OpenGL Operation) 64 65 Before the discussion of Clipping, add a description of vertex culling 66 similar to that found in the EXT_cull_vertex extension: 67 68 Vertex Culling 69 70 When vertex culling is enabled, vertices are classified as front or 71 back facing according to the sign of the dot product between the normal 72 at the vertex and an eye direction vector from the vertex toward the 73 eye position. When (normal dot eye_direction) <= 0 the vertex is 74 classified as back facing. When (normal dot eye_direction) > 0 the 75 vertex is classified as front facing. Vertices are culled when the 76 face orientation determined by the dot product is the same as the face 77 specified by CullFace. When all of the vertices of a polygon are 78 culled, then the polygon may be culled. Unlike EXT_cull_vertex, vertex 79 culling using IBM_cull_vertex does not necessarily result in polygons 80 being culled even if all of the vertices of the polygon are culled. 81 82 The eye direction is determined by transforming the column vector (0, 83 0, 1) by the upper leftmost 3x3 matrix taken from the inverse of the 84 modelview matrix. The eye direction is undefined if the modelview 85 matrix is singular or nearly singular. This operation in effect 86 projects the z axis in eye coordinates back into object space. If the 87 projection matrix or DepthRange settings cause the z axis in window 88 coordinates to be misaligned with the z axis in eye coordinates, this 89 extension should not be used. 90 91 Vertex culling is performed independently of face culling. Polygons on 92 the silhouettes of objects may have both front and back facing 93 vertices. Since polygons are culled only if all of their vertices are 94 culled and are not necessarily culled by IBM_cull_vertex even in that 95 case, face culling may have to be used in addition to vertex culling in 96 order to correctly cull silhouette polygons. 97 98Additions to Chapter 3 of the GL Specification (Rasterization) 99 100 None 101 102Additions to Chapter 4 of the GL Specification (Per-Fragment Operations 103and the Framebuffer) 104 105 None 106 107Additions to Chapter 5 of the GL Specification (Special Functions) 108 109 None 110 111Additions to Chapter 6 of the GL Specification (State and State Requests) 112 113 None 114 115Additions to the GLX Specification 116 117 None 118 119GLX Protocol 120 121 None. 122 123Errors 124 125 None 126 127New State 128 129 Get Value Type Get Command Value Sec Attrib 130 ----------------------------- ---- ----------- ----- ---- ------- 131 CULL_VERTEX_IBM B IsEnabled FALSE -- transform/ 132 enable 133 134New Implementation Dependent State 135 136 None 137