15bd8deadSopenharmony_ciXXX - Not complete yet!!!
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ciName
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ci    EXT_cull_vertex
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ciName Strings
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ci    GL_EXT_cull_vertex
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ciVersion
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ci    $Date: 1996/11/21 00:52:20 $ $Revision: 1.3 $
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ciNumber
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ci    98
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ciDependencies
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ci    None
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ciOverview
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ci    This extension introduces a method for culling vertexes in object
265bd8deadSopenharmony_ci    space based on the value of the dot product between the normal at
275bd8deadSopenharmony_ci    the vertex and a culling eye direction.
285bd8deadSopenharmony_ci
295bd8deadSopenharmony_ci    Culling a polygon by examining its vertexes in object space can be
305bd8deadSopenharmony_ci    more efficient than screen space polygon culling since the transformation
315bd8deadSopenharmony_ci    to screen space (which may include a division by w) can be avoided for
325bd8deadSopenharmony_ci    culled vertexes.  Also, vertex culling can be computed before vertexes
335bd8deadSopenharmony_ci    are assembled into primitives.  This is a useful property when drawing
345bd8deadSopenharmony_ci    meshes with shared vertexes, since a vertex can be culled once, and the
355bd8deadSopenharmony_ci    resulting state can be used for all primitives which share the vertex.
365bd8deadSopenharmony_ci
375bd8deadSopenharmony_ciIssues
385bd8deadSopenharmony_ci
395bd8deadSopenharmony_ci    * Should FrontFace affect the comparison of the dot product?
405bd8deadSopenharmony_ci      It may be useful.  For non-local eye positions it is easy for
415bd8deadSopenharmony_ci      the application to flip the eye direction in order to cull
425bd8deadSopenharmony_ci      either front or back faces.  This doesn't work as well for
435bd8deadSopenharmony_ci      local eye positions.  We'll defer this for now; it is easy
445bd8deadSopenharmony_ci      to add as an extension later.
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ci    * Could determine the eye position/direction in object space
475bd8deadSopenharmony_ci      by transforming the vector (0, 0, 1, 0) by the inverse of
485bd8deadSopenharmony_ci      the composite of the modelview and projection transformations.
495bd8deadSopenharmony_ci      Seems better to have the application provide the eye position/direction
505bd8deadSopenharmony_ci      than to have OpenGL pick one arbitrarily.
515bd8deadSopenharmony_ci
525bd8deadSopenharmony_ciNew Procedures and Functions
535bd8deadSopenharmony_ci
545bd8deadSopenharmony_ci    void CullParameterfvEXT (enum pname, float *params)
555bd8deadSopenharmony_ci    void CullParameterdvEXT (enum pname, double *params)
565bd8deadSopenharmony_ci
575bd8deadSopenharmony_ciNew Tokens
585bd8deadSopenharmony_ci
595bd8deadSopenharmony_ci   Accepted by the <cap> parameter of Enable, Disable, and
605bd8deadSopenharmony_ci   IsEnabled, and by the <pname> parameter of GetBooleanv,
615bd8deadSopenharmony_ci   GetIntegerv, GetFloatv, and GetDoublev:
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci       CULL_VERTEX_EXT                     0x81AA
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ci   Accepted by the <pname> parameter of CullParameterfvEXT,
665bd8deadSopenharmony_ci   CullParameterdvEXT, GetBooleanv, GetIntegerv, GetFloatv, and
675bd8deadSopenharmony_ci   GetDoublev:
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ci       CULL_VERTEX_EYE_POSITION_EXT        0x81AB
705bd8deadSopenharmony_ci       CULL_VERTEX_OBJECT_POSITION_EXT     0x81AC
715bd8deadSopenharmony_ci
725bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
735bd8deadSopenharmony_ci
745bd8deadSopenharmony_ci   Before the discussion of Clipping, add a description of 
755bd8deadSopenharmony_ci   vertex culling.
765bd8deadSopenharmony_ci
775bd8deadSopenharmony_ci   Vertex Culling
785bd8deadSopenharmony_ci
795bd8deadSopenharmony_ci   Vertex culling may be used to eliminate vertexes which are
805bd8deadSopenharmony_ci   part of back facing primitives.  Vertex culling is enabled
815bd8deadSopenharmony_ci   or disabled by using the Enable or Disable commands with
825bd8deadSopenharmony_ci   the symbolic constant CULL_VERTEX_EXT.
835bd8deadSopenharmony_ci
845bd8deadSopenharmony_ci   When vertex culling is enabled, vertexes are classified as
855bd8deadSopenharmony_ci   front or back facing according to the sign of the dot
865bd8deadSopenharmony_ci   product between the normal at the vertex and an eye direction
875bd8deadSopenharmony_ci   vector from the vertex toward the eye position.  When
885bd8deadSopenharmony_ci   (normal dot eye_direction) <= 0 the vertex is classified as
895bd8deadSopenharmony_ci   back facing.  When (normal dot eye_direction) > 0 the vertex
905bd8deadSopenharmony_ci   is classified as front facing.  Vertexes are culled when the
915bd8deadSopenharmony_ci   face orientation determined by the dot product is the same
925bd8deadSopenharmony_ci   as the face specified by CullFace.  When all of the vertexes
935bd8deadSopenharmony_ci   of a polygon are culled, then the polygon is culled.
945bd8deadSopenharmony_ci
955bd8deadSopenharmony_ci   The eye direction used for vertex culling is determined
965bd8deadSopenharmony_ci   by the culling eye position.  The culling eye position
975bd8deadSopenharmony_ci   is homogeneous (like a light position).  When the w component
985bd8deadSopenharmony_ci   of the position is non-zero, the position is local and the
995bd8deadSopenharmony_ci   eye direction at each vertex is computed by subtracting
1005bd8deadSopenharmony_ci   the vertex position from the eye position.  When the w
1015bd8deadSopenharmony_ci   component of the position is zero, the position is non-local
1025bd8deadSopenharmony_ci   and the is used as the eye direction for all vertexes.
1035bd8deadSopenharmony_ci
1045bd8deadSopenharmony_ci   The culling eye position is specified by the CullParameter
1055bd8deadSopenharmony_ci   command.  Positions specified when <pname> is
1065bd8deadSopenharmony_ci   CULL_VERTEX_EYE_POSITION_EXT are in eye space and are
1075bd8deadSopenharmony_ci   transformed by the inverse of the current MODELVIEW
1085bd8deadSopenharmony_ci   transformation.  Positions specified when <pname> is
1095bd8deadSopenharmony_ci   CULL_VERTEX_OBJECT_POSITION_EXT are in object space and are
1105bd8deadSopenharmony_ci   used directly.
1115bd8deadSopenharmony_ci
1125bd8deadSopenharmony_ci   Vertex culling is performed independently of face culling.
1135bd8deadSopenharmony_ci   Polygons on the silhouettes of objects may have both front
1145bd8deadSopenharmony_ci   and back facing vertexes.  Since polygons are culled only
1155bd8deadSopenharmony_ci   when all of their vertexes are culled, face culling may have
1165bd8deadSopenharmony_ci   to be used in addition to vertex culling in order to correctly
1175bd8deadSopenharmony_ci   cull silhouette polygons.
1185bd8deadSopenharmony_ci
1195bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.1 Specification (Rasterization)
1205bd8deadSopenharmony_ci
1215bd8deadSopenharmony_ci    None
1225bd8deadSopenharmony_ci
1235bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
1245bd8deadSopenharmony_ciand the Frame Buffer)
1255bd8deadSopenharmony_ci
1265bd8deadSopenharmony_ci    None
1275bd8deadSopenharmony_ci
1285bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.1 Specification (Special Functions)
1295bd8deadSopenharmony_ci
1305bd8deadSopenharmony_ci    None
1315bd8deadSopenharmony_ci
1325bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.1 Specification (State and State Requests)
1335bd8deadSopenharmony_ci
1345bd8deadSopenharmony_ci    None
1355bd8deadSopenharmony_ci
1365bd8deadSopenharmony_ciAdditions to the GLX Specification
1375bd8deadSopenharmony_ci
1385bd8deadSopenharmony_ci    XXX - Not complete yet!!!
1395bd8deadSopenharmony_ci
1405bd8deadSopenharmony_ciGLX Protocol
1415bd8deadSopenharmony_ci
1425bd8deadSopenharmony_ci    XXX - Not complete yet!!!
1435bd8deadSopenharmony_ci
1445bd8deadSopenharmony_ciErrors
1455bd8deadSopenharmony_ci
1465bd8deadSopenharmony_ci    INVALID_ENUM if <pname> parameter to CullParameterfvEXT or
1475bd8deadSopenharmony_ci    CullParameterdvEXT is not CULL_VERTEX_EYE_POSITION_EXT, or
1485bd8deadSopenharmony_ci    CULL_VERTEX_OBJECT_POSITION_EXT.
1495bd8deadSopenharmony_ci
1505bd8deadSopenharmony_ci    INVALID_OPERATION if CullParameterfvEXT or CullParameterdvEXT called
1515bd8deadSopenharmony_ci    between execution of Begin and the corresponding execution of End.
1525bd8deadSopenharmony_ci
1535bd8deadSopenharmony_ciNew State
1545bd8deadSopenharmony_ci
1555bd8deadSopenharmony_ci                                                                Initial
1565bd8deadSopenharmony_ci    Get Value                           Get Command     Type    Value           Attrib
1575bd8deadSopenharmony_ci    ---------                           -----------     ----    -------         ------
1585bd8deadSopenharmony_ci
1595bd8deadSopenharmony_ci    CULL_VERTEX_EXT                     IsEnabled       B       False           transform/enable
1605bd8deadSopenharmony_ci    CULL_VERTEX_OBJECT_POSITION_EXT     GetFloatv       P       (0,0,1,0)       transform
1615bd8deadSopenharmony_ci    CULL_VERTEX_EYE_POSITION_EXT        GetFloatv       P       (0,0,1,0)       transform
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ciNew Implementation Dependent State
1645bd8deadSopenharmony_ci
1655bd8deadSopenharmony_ci    None
166