15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci    
35bd8deadSopenharmony_ci    ARB_vertex_program
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_ARB_vertex_program
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContributors
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Kurt Akeley
125bd8deadSopenharmony_ci    Allen Akin
135bd8deadSopenharmony_ci    Ben Ashbaugh
145bd8deadSopenharmony_ci    Bob Beretta
155bd8deadSopenharmony_ci    John Carmack
165bd8deadSopenharmony_ci    Matt Craighead
175bd8deadSopenharmony_ci    Ken Dyke
185bd8deadSopenharmony_ci    Steve Glanville
195bd8deadSopenharmony_ci    Michael Gold
205bd8deadSopenharmony_ci    Evan Hart
215bd8deadSopenharmony_ci    Mark Kilgard
225bd8deadSopenharmony_ci    Bill Licea-Kane
235bd8deadSopenharmony_ci    Barthold Lichtenbelt
245bd8deadSopenharmony_ci    Erik Lindholm
255bd8deadSopenharmony_ci    Benj Lipchak
265bd8deadSopenharmony_ci    Bill Mark
275bd8deadSopenharmony_ci    James McCombe
285bd8deadSopenharmony_ci    Jeremy Morris
295bd8deadSopenharmony_ci    Brian Paul
305bd8deadSopenharmony_ci    Bimal Poddar
315bd8deadSopenharmony_ci    Thomas Roell
325bd8deadSopenharmony_ci    Jeremy Sandmel
335bd8deadSopenharmony_ci    Jon Paul Schelter
345bd8deadSopenharmony_ci    Geoff Stahl
355bd8deadSopenharmony_ci    John Stauffer
365bd8deadSopenharmony_ci    Nick Triantos
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ciContact
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ci    Pat Brown, NVIDIA Corporation (pbrown 'at' nvidia.com)
415bd8deadSopenharmony_ci
425bd8deadSopenharmony_ciNotice
435bd8deadSopenharmony_ci
445bd8deadSopenharmony_ci    Copyright (c) 2002-2013 The Khronos Group Inc. Copyright terms at
455bd8deadSopenharmony_ci        http://www.khronos.org/registry/speccopyright.html
465bd8deadSopenharmony_ci
475bd8deadSopenharmony_ciSpecification Update Policy
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ci    Khronos-approved extension specifications are updated in response to
505bd8deadSopenharmony_ci    issues and bugs prioritized by the Khronos OpenGL Working Group. For
515bd8deadSopenharmony_ci    extensions which have been promoted to a core Specification, fixes will
525bd8deadSopenharmony_ci    first appear in the latest version of that core Specification, and will
535bd8deadSopenharmony_ci    eventually be backported to the extension document. This policy is
545bd8deadSopenharmony_ci    described in more detail at
555bd8deadSopenharmony_ci        https://www.khronos.org/registry/OpenGL/docs/update_policy.php
565bd8deadSopenharmony_ci
575bd8deadSopenharmony_ciIP Status
585bd8deadSopenharmony_ci
595bd8deadSopenharmony_ci    NVIDIA claims to own intellectual property related to this extension, and
605bd8deadSopenharmony_ci    has signed an ARB Contributor License agreement licensing this
615bd8deadSopenharmony_ci    intellectual property.
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci    Microsoft claims to own intellectual property related to this extension.
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ciStatus
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ci    Complete. Approved by ARB on June 18, 2002
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ciVersion
705bd8deadSopenharmony_ci
715bd8deadSopenharmony_ci    Last Modified Date:  07/25/07
725bd8deadSopenharmony_ci    Revision:            46
735bd8deadSopenharmony_ci
745bd8deadSopenharmony_ciNumber
755bd8deadSopenharmony_ci
765bd8deadSopenharmony_ci    ARB Extension #26
775bd8deadSopenharmony_ci
785bd8deadSopenharmony_ciDependencies
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ci    Written based on the wording of the OpenGL 1.3 specification and requires
815bd8deadSopenharmony_ci    OpenGL 1.3.
825bd8deadSopenharmony_ci
835bd8deadSopenharmony_ci    ARB_vertex_blend and EXT_vertex_weighting affect the definition of this
845bd8deadSopenharmony_ci    extension.
855bd8deadSopenharmony_ci
865bd8deadSopenharmony_ci    ARB_matrix_palette affects the definition of this extension.
875bd8deadSopenharmony_ci
885bd8deadSopenharmony_ci    ARB_point_parameters and EXT_point_parameters affect the definition of
895bd8deadSopenharmony_ci    this extension.
905bd8deadSopenharmony_ci
915bd8deadSopenharmony_ci    EXT_secondary_color affects the definition of this extension.
925bd8deadSopenharmony_ci
935bd8deadSopenharmony_ci    EXT_fog_coord affects the definition of this extension.
945bd8deadSopenharmony_ci
955bd8deadSopenharmony_ci    ARB_transpose_matrix affects the definition of this extension.
965bd8deadSopenharmony_ci
975bd8deadSopenharmony_ci    NV_vertex_program interacts with this extension.
985bd8deadSopenharmony_ci
995bd8deadSopenharmony_ci    EXT_vertex_shader interacts with this extension.
1005bd8deadSopenharmony_ci
1015bd8deadSopenharmony_ciOverview
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ci    Unextended OpenGL mandates a certain set of configurable per-vertex
1045bd8deadSopenharmony_ci    computations defining vertex transformation, texture coordinate generation
1055bd8deadSopenharmony_ci    and transformation, and lighting.  Several extensions have added further
1065bd8deadSopenharmony_ci    per-vertex computations to OpenGL.  For example, extensions have defined
1075bd8deadSopenharmony_ci    new texture coordinate generation modes (ARB_texture_cube_map,
1085bd8deadSopenharmony_ci    NV_texgen_reflection, NV_texgen_emboss), new vertex transformation modes
1095bd8deadSopenharmony_ci    (ARB_vertex_blend, EXT_vertex_weighting), new lighting modes (OpenGL 1.2's
1105bd8deadSopenharmony_ci    separate specular and rescale normal functionality), several modes for fog
1115bd8deadSopenharmony_ci    distance generation (NV_fog_distance), and eye-distance point size
1125bd8deadSopenharmony_ci    attenuation (EXT/ARB_point_parameters).
1135bd8deadSopenharmony_ci
1145bd8deadSopenharmony_ci    Each such extension adds a small set of relatively inflexible
1155bd8deadSopenharmony_ci    per-vertex computations.
1165bd8deadSopenharmony_ci
1175bd8deadSopenharmony_ci    This inflexibility is in contrast to the typical flexibility provided by
1185bd8deadSopenharmony_ci    the underlying programmable floating point engines (whether micro-coded
1195bd8deadSopenharmony_ci    vertex engines, DSPs, or CPUs) that are traditionally used to implement
1205bd8deadSopenharmony_ci    OpenGL's per-vertex computations.  The purpose of this extension is to
1215bd8deadSopenharmony_ci    expose to the OpenGL application writer a significant degree of per-vertex
1225bd8deadSopenharmony_ci    programmability for computing vertex parameters.
1235bd8deadSopenharmony_ci
1245bd8deadSopenharmony_ci    For the purposes of discussing this extension, a vertex program is a
1255bd8deadSopenharmony_ci    sequence of floating-point 4-component vector operations that determines
1265bd8deadSopenharmony_ci    how a set of program parameters (defined outside of OpenGL's Begin/End
1275bd8deadSopenharmony_ci    pair) and an input set of per-vertex parameters are transformed to a set
1285bd8deadSopenharmony_ci    of per-vertex result parameters.
1295bd8deadSopenharmony_ci
1305bd8deadSopenharmony_ci    The per-vertex computations for standard OpenGL given a particular set of
1315bd8deadSopenharmony_ci    lighting and texture coordinate generation modes (along with any state for
1325bd8deadSopenharmony_ci    extensions defining per-vertex computations) is, in essence, a vertex
1335bd8deadSopenharmony_ci    program.  However, the sequence of operations is defined implicitly by the
1345bd8deadSopenharmony_ci    current OpenGL state settings rather than defined explicitly as a sequence
1355bd8deadSopenharmony_ci    of instructions.
1365bd8deadSopenharmony_ci
1375bd8deadSopenharmony_ci    This extension provides an explicit mechanism for defining vertex program
1385bd8deadSopenharmony_ci    instruction sequences for application-defined vertex programs.  In order
1395bd8deadSopenharmony_ci    to define such vertex programs, this extension defines a vertex
1405bd8deadSopenharmony_ci    programming model including a floating-point 4-component vector
1415bd8deadSopenharmony_ci    instruction set and a relatively large set of floating-point 4-component
1425bd8deadSopenharmony_ci    registers.
1435bd8deadSopenharmony_ci
1445bd8deadSopenharmony_ci    The extension's vertex programming model is designed for efficient
1455bd8deadSopenharmony_ci    hardware implementation and to support a wide variety of vertex programs.
1465bd8deadSopenharmony_ci    By design, the entire set of existing vertex programs defined by existing
1475bd8deadSopenharmony_ci    OpenGL per-vertex computation extensions can be implemented using the
1485bd8deadSopenharmony_ci    extension's vertex programming model.
1495bd8deadSopenharmony_ci
1505bd8deadSopenharmony_ciIssues
1515bd8deadSopenharmony_ci
1525bd8deadSopenharmony_ci    (1) What should this extension be called?
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ci      RESOLVED:  ARB_vertex_program.  DirectX 8 refers to its similar
1555bd8deadSopenharmony_ci      functionality as "vertex shaders".  This is a confusing term because
1565bd8deadSopenharmony_ci      shaders are usually assumed to operate at the fragment or pixel level,
1575bd8deadSopenharmony_ci      not the vertex level.
1585bd8deadSopenharmony_ci
1595bd8deadSopenharmony_ci      Conceptually, what the extension defines is an application-defined
1605bd8deadSopenharmony_ci      program (admittedly limited by its sequential execution model) for
1615bd8deadSopenharmony_ci      processing vertices so the "vertex program" term is more accurate.
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ci      Some of the API machinery in this extension for describing programs
1645bd8deadSopenharmony_ci      should be useful for extending other OpenGL operations with programs
1655bd8deadSopenharmony_ci      (though other types of programs may look very different from vertex
1665bd8deadSopenharmony_ci      programs).
1675bd8deadSopenharmony_ci
1685bd8deadSopenharmony_ci    (2) What terms are important to this specification?
1695bd8deadSopenharmony_ci
1705bd8deadSopenharmony_ci      vertex program mode - When vertex program mode is enabled, vertices are
1715bd8deadSopenharmony_ci      transformed by an application-defined vertex program.
1725bd8deadSopenharmony_ci
1735bd8deadSopenharmony_ci      conventional GL vertex transform mode - When vertex program mode is
1745bd8deadSopenharmony_ci      disabled (or the extension is not supported), vertices are transformed
1755bd8deadSopenharmony_ci      by GL's conventional texgen, lighting, and transform state.
1765bd8deadSopenharmony_ci
1775bd8deadSopenharmony_ci      vertex program - An application-defined program used to transform
1785bd8deadSopenharmony_ci      vertices when vertex program mode is enabled.
1795bd8deadSopenharmony_ci
1805bd8deadSopenharmony_ci      program target - A type or class of program.  This extension supports
1815bd8deadSopenharmony_ci      the VERTEX_PROGRAM_ARB target.  Future extensions may add other program
1825bd8deadSopenharmony_ci      targets.
1835bd8deadSopenharmony_ci
1845bd8deadSopenharmony_ci      program object - An object maintained internal to OpenGL that
1855bd8deadSopenharmony_ci      encapsulates a program and a set of associated state.  Operations
1865bd8deadSopenharmony_ci      performed on program objects include loading a program, binding,
1875bd8deadSopenharmony_ci      generating program object names, querying state, and deleting.
1885bd8deadSopenharmony_ci
1895bd8deadSopenharmony_ci      program name - Each program object has an associated unsigned integer,
1905bd8deadSopenharmony_ci      called the program name.  Applications refer to a program object using
1915bd8deadSopenharmony_ci      the program name.
1925bd8deadSopenharmony_ci
1935bd8deadSopenharmony_ci      current program - Each program target may have a current program object.
1945bd8deadSopenharmony_ci      For vertex programs, the current program is executed whenever a vertex
1955bd8deadSopenharmony_ci      is specified when vertex program mode is enabled.
1965bd8deadSopenharmony_ci
1975bd8deadSopenharmony_ci      default program - Each program target has a default program object,
1985bd8deadSopenharmony_ci      referred to using a program name of zero.  The current program for each
1995bd8deadSopenharmony_ci      program target is initially the default program for that target.
2005bd8deadSopenharmony_ci
2015bd8deadSopenharmony_ci      program execution environment - A set of resources, instructions, and
2025bd8deadSopenharmony_ci      semantic rules used to execute a program.  Each program target may
2035bd8deadSopenharmony_ci      support one or more execution environment -- new execution environments
2045bd8deadSopenharmony_ci      may provide new instructions, resources, or execution rules.  Program
2055bd8deadSopenharmony_ci      strings must specify the execution environment that should be used to
2065bd8deadSopenharmony_ci      execute the program.
2075bd8deadSopenharmony_ci
2085bd8deadSopenharmony_ci      program options - An optional feature that modifies the rules of the
2095bd8deadSopenharmony_ci      execution environment.  Vertex programs specify the options that they
2105bd8deadSopenharmony_ci      require at the beginning of the program.
2115bd8deadSopenharmony_ci
2125bd8deadSopenharmony_ci      vertex attribute - GL state associated with vertices that can vary per
2135bd8deadSopenharmony_ci      vertex.
2145bd8deadSopenharmony_ci
2155bd8deadSopenharmony_ci      conventional vertex attributes - Per-vertex attributes used in
2165bd8deadSopenharmony_ci      conventional GL vertex transform mode, including colors, normals,
2175bd8deadSopenharmony_ci      texture coordinate sets.
2185bd8deadSopenharmony_ci
2195bd8deadSopenharmony_ci      generic vertex attributes - An array of 16+ 4-component vectors added by
2205bd8deadSopenharmony_ci      this extension.  Generic vertex attributes can be used by vertex
2215bd8deadSopenharmony_ci      programs but are unused in conventional GL vertex transform mode.
2225bd8deadSopenharmony_ci
2235bd8deadSopenharmony_ci      program parameter - A set of constants that are available for vertex
2245bd8deadSopenharmony_ci      programs to use during their execution.  Program parameters include
2255bd8deadSopenharmony_ci      program environment parameters, program local parameters, conventional
2265bd8deadSopenharmony_ci      GL state, and program constants.
2275bd8deadSopenharmony_ci
2285bd8deadSopenharmony_ci      program environment parameter - A set of 96+ 4-component vectors
2295bd8deadSopenharmony_ci      belonging to the GL context that can be used as constants during the
2305bd8deadSopenharmony_ci      execution of any vertex program.
2315bd8deadSopenharmony_ci
2325bd8deadSopenharmony_ci      program local parameter - A set of 96+ 4-component vectors belonging to
2335bd8deadSopenharmony_ci      a vertex program object that can be used as constants during the
2345bd8deadSopenharmony_ci      execution of the corresponding vertex program.  Program local parameters
2355bd8deadSopenharmony_ci      can not be used by any other vertex programs.
2365bd8deadSopenharmony_ci
2375bd8deadSopenharmony_ci      program constants - Constants declared in the text of a program may be
2385bd8deadSopenharmony_ci      used during the execution of that program.
2395bd8deadSopenharmony_ci
2405bd8deadSopenharmony_ci      program temporaries - A set of 12+ 4-component vectors to hold temporary
2415bd8deadSopenharmony_ci      results that can be read or written during the execution of a vertex
2425bd8deadSopenharmony_ci      program.
2435bd8deadSopenharmony_ci
2445bd8deadSopenharmony_ci      program address registers - A set of 1+ 1-component integer vectors that
2455bd8deadSopenharmony_ci      can be used to perform variable indirect accesses to program parameter
2465bd8deadSopenharmony_ci      arrays during the execution of a vertex program.  Address registers are
2475bd8deadSopenharmony_ci      specified as vectors to allow for future extensions supporting multiple
2485bd8deadSopenharmony_ci      address register components.
2495bd8deadSopenharmony_ci
2505bd8deadSopenharmony_ci      program results - A set of 4-component vectors to hold the final results
2515bd8deadSopenharmony_ci      of a vertex program.  The program results correspond closely to the set
2525bd8deadSopenharmony_ci      of vertex attributes used during primitive assembly and rasterization.
2535bd8deadSopenharmony_ci      
2545bd8deadSopenharmony_ci      program variables - Variable names used to identify a specific vertex
2555bd8deadSopenharmony_ci      attribute, program parameter, temporary, address register, or result.
2565bd8deadSopenharmony_ci
2575bd8deadSopenharmony_ci      program binding - A program statement that declares a variable and
2585bd8deadSopenharmony_ci      associates it with a specific vertex attribute, program parameter, or
2595bd8deadSopenharmony_ci      program result.
2605bd8deadSopenharmony_ci
2615bd8deadSopenharmony_ci      implicit binding - When an executable instruction refers to a specific
2625bd8deadSopenharmony_ci      vertex attribute, program parameter, program result, or constant by
2635bd8deadSopenharmony_ci      name, without using an explicit program binding statement.  When such
2645bd8deadSopenharmony_ci      values are encountered, an implicit binding to an anonymous variable
2655bd8deadSopenharmony_ci      name is created.
2665bd8deadSopenharmony_ci
2675bd8deadSopenharmony_ci      program invocation - The act of implicitly or explicitly kicking off
2685bd8deadSopenharmony_ci      program execution.  Vertex programs are invoked automatically when
2695bd8deadSopenharmony_ci      vertex program mode is enabled and vertices are received.  Vertex
2705bd8deadSopenharmony_ci      programs are also invoked automatically when the current raster position
2715bd8deadSopenharmony_ci      is specified.
2725bd8deadSopenharmony_ci
2735bd8deadSopenharmony_ci    (3) What part of OpenGL do vertex programs specifically bypass?
2745bd8deadSopenharmony_ci
2755bd8deadSopenharmony_ci      Vertex programs bypass the following OpenGL functionality:
2765bd8deadSopenharmony_ci
2775bd8deadSopenharmony_ci        - The modelview and projection matrix vertex transformations.
2785bd8deadSopenharmony_ci
2795bd8deadSopenharmony_ci        - Vertex weighting/blending (ARB_vertex_blend).
2805bd8deadSopenharmony_ci
2815bd8deadSopenharmony_ci        - Normal transformation, rescaling, and normalization.
2825bd8deadSopenharmony_ci
2835bd8deadSopenharmony_ci        - Color material.
2845bd8deadSopenharmony_ci
2855bd8deadSopenharmony_ci        - Per-vertex lighting.
2865bd8deadSopenharmony_ci
2875bd8deadSopenharmony_ci        - Texture coordinate generation and texture matrix transformations.
2885bd8deadSopenharmony_ci
2895bd8deadSopenharmony_ci        - Per-vertex point size computations in ARB/EXT_point_parameters
2905bd8deadSopenharmony_ci
2915bd8deadSopenharmony_ci        - Per-vertex fog coordinate computations in EXT_fog_coord and
2925bd8deadSopenharmony_ci          NV_fog_distance.
2935bd8deadSopenharmony_ci
2945bd8deadSopenharmony_ci        - Client-defined clip planes.
2955bd8deadSopenharmony_ci
2965bd8deadSopenharmony_ci        - The normalization of AUTO_NORMAL evaluated normals
2975bd8deadSopenharmony_ci
2985bd8deadSopenharmony_ci        - All of the above, when computing the current raster position.
2995bd8deadSopenharmony_ci
3005bd8deadSopenharmony_ci      Operations not subsumed by vertex programs
3015bd8deadSopenharmony_ci
3025bd8deadSopenharmony_ci        - Clipping to the view frustum.
3035bd8deadSopenharmony_ci
3045bd8deadSopenharmony_ci        - Perspective divide (division by w).
3055bd8deadSopenharmony_ci
3065bd8deadSopenharmony_ci        - The viewport transformation.
3075bd8deadSopenharmony_ci
3085bd8deadSopenharmony_ci        - The depth range transformation.
3095bd8deadSopenharmony_ci
3105bd8deadSopenharmony_ci        - Front and back color selection (for two-sided lighting and
3115bd8deadSopenharmony_ci          coloring).
3125bd8deadSopenharmony_ci
3135bd8deadSopenharmony_ci        - Clamping the primary and secondary colors to [0,1].
3145bd8deadSopenharmony_ci
3155bd8deadSopenharmony_ci        - Primitive assembly and subsequent operations.
3165bd8deadSopenharmony_ci
3175bd8deadSopenharmony_ci        - Evaluators (except the AUTO_NORMAL normalization).
3185bd8deadSopenharmony_ci
3195bd8deadSopenharmony_ci    (5) This extension adds a set of generic vertex attributes to the existing
3205bd8deadSopenharmony_ci    conventional attributes.  The sum of the number of generic and
3215bd8deadSopenharmony_ci    conventional attributes supported on a given platform may exceed the total
3225bd8deadSopenharmony_ci    number of per-vertex attributes supported in hardware.  How should this
3235bd8deadSopenharmony_ci    situation be handled?
3245bd8deadSopenharmony_ci
3255bd8deadSopenharmony_ci      RESOLVED:  Implementations may alias conventional and generic vertex
3265bd8deadSopenharmony_ci      attributes, where pairs of conventional and generic vertex attributes
3275bd8deadSopenharmony_ci      share the same storage.  Such aliasing will effectively reduce the
3285bd8deadSopenharmony_ci      number of vertex attributes a hardware platforms.  While implementations
3295bd8deadSopenharmony_ci      may alias attributes, that behavior is not required.  To accommodate both
3305bd8deadSopenharmony_ci      behaviors, changing a generic vertex attribute leaves the corresponding
3315bd8deadSopenharmony_ci      conventional attribute undefined, and vice versa.
3325bd8deadSopenharmony_ci
3335bd8deadSopenharmony_ci      This undefined behavior is a compromise between the existing
3345bd8deadSopenharmony_ci      EXT_vertex_shader extension (which does not permit aliasing) and the
3355bd8deadSopenharmony_ci      NV_vertex_program extension (which requires aliasing).  The mapping
3365bd8deadSopenharmony_ci      between generic and conventional vertex attributes is found in Table X.1
3375bd8deadSopenharmony_ci      below.  This mapping is taken from the NV_vertex_program specification
3385bd8deadSopenharmony_ci      and generalized to define behavior for >8 texture coordinate sets.
3395bd8deadSopenharmony_ci
3405bd8deadSopenharmony_ci      Applications that mix conventional and generic vertex attributes in a
3415bd8deadSopenharmony_ci      single rendering pass should be careful to avoid using attributes that
3425bd8deadSopenharmony_ci      may alias.  To limit inadvertent use of such attributes, loading a
3435bd8deadSopenharmony_ci      vertex program that used a pair of attributes that may alias is
3445bd8deadSopenharmony_ci      guaranteed to fail.  Applications requiring a small number of generic
3455bd8deadSopenharmony_ci      vertex attributes can always safely use generic attributes 6 and 7, and
3465bd8deadSopenharmony_ci      any supported attributes corresponding to unused or unsupported texture
3475bd8deadSopenharmony_ci      units.  For example, if an implementation supports only four texture
3485bd8deadSopenharmony_ci      units, generic attributes 12 through 15 can always be used safely.
3495bd8deadSopenharmony_ci
3505bd8deadSopenharmony_ci    (6) Should there be a "VertexAttribs" entry point to specify multiple
3515bd8deadSopenharmony_ci    vertex attributes in one immediate mode call.
3525bd8deadSopenharmony_ci
3535bd8deadSopenharmony_ci      RESOLVED:  No.  Not providing such functionality serves to reduce the
3545bd8deadSopenharmony_ci      already large number of required immediate mode entry points.  A
3555bd8deadSopenharmony_ci      "VertexAttribs" command would improve the efficiency of vertex attribute
3565bd8deadSopenharmony_ci      transfer, but vertex arrays or display lists should still be better.
3575bd8deadSopenharmony_ci
3585bd8deadSopenharmony_ci    (7) Should a full complement of data types (signed and unsigned bytes,
3595bd8deadSopenharmony_ci    shorts, and ints, as well as floats and doubles) be supported for vertex
3605bd8deadSopenharmony_ci    attributes?  Should fixed-point data types be supported in both normalized
3615bd8deadSopenharmony_ci    (map the range to [0,1] or [-1,1]) and unnormalized form?
3625bd8deadSopenharmony_ci
3635bd8deadSopenharmony_ci      RESOLVED:  For vertex arrays, all data type combinations are supported.
3645bd8deadSopenharmony_ci
3655bd8deadSopenharmony_ci      For immediate mode, a smaller subset is supported, to limit the number
3665bd8deadSopenharmony_ci      of immediate-mode entry points added by this extension.  In fully
3675bd8deadSopenharmony_ci      general form, 112 immediate-mode entry points (4 sizes x 2
3685bd8deadSopenharmony_ci      vector/non-vector x 14 data types) would be required.
3695bd8deadSopenharmony_ci
3705bd8deadSopenharmony_ci      Immediate mode support is available for non-normalized shorts, floats,
3715bd8deadSopenharmony_ci      and doubles for all component counts.  Additionally, immediate mode
3725bd8deadSopenharmony_ci      support is available for 4-component vectors of all data types
3735bd8deadSopenharmony_ci      (normalized and unnormalized).
3745bd8deadSopenharmony_ci
3755bd8deadSopenharmony_ci      Note also that in immediate mode, the "N" qualifier in function names
3765bd8deadSopenharmony_ci      like VertexAttrib4Nub will be used to indicate that fixed-point data
3775bd8deadSopenharmony_ci      should be normalized.
3785bd8deadSopenharmony_ci
3795bd8deadSopenharmony_ci    (8) How should applications indicate that fixed-point generic vertex
3805bd8deadSopenharmony_ci    attribute array components should be converted to [-1,+1] or [0,1] ranges?
3815bd8deadSopenharmony_ci
3825bd8deadSopenharmony_ci      RESOLVED:  The function VertexAttribPointerARB takes a boolean argument
3835bd8deadSopenharmony_ci      <normalized> that indicates whether fixed-point array data should be
3845bd8deadSopenharmony_ci      normalized to [-1,+1] or [0,1].  
3855bd8deadSopenharmony_ci
3865bd8deadSopenharmony_ci      One alternate approach would have been to extend to set of enumerants to
3875bd8deadSopenharmony_ci      include values such as NORMALIZED_UNSIGNED_BYTE_ARB.  Adding such
3885bd8deadSopenharmony_ci      enumerants in some sense implies that UNSIGNED_BYTE is not normalized,
3895bd8deadSopenharmony_ci      even though it usually is.
3905bd8deadSopenharmony_ci
3915bd8deadSopenharmony_ci    (9) In unextended OpenGL, calling Vertex() specifies a vertex and causes
3925bd8deadSopenharmony_ci    vertex transformation operations to be performed on the vertex.  Should
3935bd8deadSopenharmony_ci    there be an equivalent method to specify a vertex using generic vertex
3945bd8deadSopenharmony_ci    attributes?  If so, how should this be accomplished?
3955bd8deadSopenharmony_ci
3965bd8deadSopenharmony_ci      RESOLVED:  Setting generic vertex attribute zero will always specify a
3975bd8deadSopenharmony_ci      vertex.  Vertex*(...) and VertexAttrib*(0,...) are specified to be
3985bd8deadSopenharmony_ci      equivalent, whether or not vertex program mode is enabled.  Allowing
3995bd8deadSopenharmony_ci      generic vertex attribute zero to specify a vertex allows applications to
4005bd8deadSopenharmony_ci      write vertex programs that use only generic attributes; otherwise,
4015bd8deadSopenharmony_ci      applications would have had to use Vertex() to provoke vertex
4025bd8deadSopenharmony_ci      processing.
4035bd8deadSopenharmony_ci
4045bd8deadSopenharmony_ci    (10) How is this extension different from previous vertex program
4055bd8deadSopenharmony_ci    extensions, such as EXT_vertex_shader or NV_vertex_program?  What pitfalls
4065bd8deadSopenharmony_ci    are there in porting vertex programs to/from this extension?
4075bd8deadSopenharmony_ci    
4085bd8deadSopenharmony_ci      RESOLVED:  See "Interactions with NV_vertex_program" and "Interactions
4095bd8deadSopenharmony_ci      with EXT_vertex_shader" sections near the end of this specification.  
4105bd8deadSopenharmony_ci
4115bd8deadSopenharmony_ci    (11) Should program parameter variables bound to GL state be updated
4125bd8deadSopenharmony_ci    automatically after the bound state changes?  If so, when?
4135bd8deadSopenharmony_ci
4145bd8deadSopenharmony_ci      RESOLVED:  Yes.  Such variables are updated automatically prior to the
4155bd8deadSopenharmony_ci      next vertex program invocation with no application intervention
4165bd8deadSopenharmony_ci      required.  A proposal to reduce the burden by requiring a manual "update
4175bd8deadSopenharmony_ci      state" step was considered and rejected.
4185bd8deadSopenharmony_ci
4195bd8deadSopenharmony_ci    (12) How should this specification handle variable bindings to Material
4205bd8deadSopenharmony_ci    state?  Material is allowed inside a Begin/End, so material properties are
4215bd8deadSopenharmony_ci    technically per-vertex state.
4225bd8deadSopenharmony_ci
4235bd8deadSopenharmony_ci      RESOLVED:  Materials can be bound only as program parameters.  Changes
4245bd8deadSopenharmony_ci      to material properties inside a Begin/End will leave the bindings
4255bd8deadSopenharmony_ci      undefined until the subsequent End command.  At that point, all material
4265bd8deadSopenharmony_ci      property bindings are guaranteed to be updated, and any material
4275bd8deadSopenharmony_ci      property changes up to the next Begin command are guaranteed to take
4285bd8deadSopenharmony_ci      effect immediately.
4295bd8deadSopenharmony_ci
4305bd8deadSopenharmony_ci      Supporting per-vertex material properties places additional pressure on
4315bd8deadSopenharmony_ci      the number of per-vertex bindings an implementation can support, which
4325bd8deadSopenharmony_ci      was already a problem.  See issue (5).  
4335bd8deadSopenharmony_ci
4345bd8deadSopenharmony_ci      In practice, material properties are usually not changed in this manner.
4355bd8deadSopenharmony_ci      Applications needing to change material properties inside a Begin/End in
4365bd8deadSopenharmony_ci      vertex program mode can work around this limitation by storing the color
4375bd8deadSopenharmony_ci      in a conventional or generic vertex attribute and modifying the vertex
4385bd8deadSopenharmony_ci      program accordingly.
4395bd8deadSopenharmony_ci
4405bd8deadSopenharmony_ci    (13) What semantic restrictions, if any, should be imposed on binding the
4415bd8deadSopenharmony_ci    same GL state to multiple variables?  The grammar permits such bindings,
4425bd8deadSopenharmony_ci    but allowing this behavior means that single state updates must update
4435bd8deadSopenharmony_ci    multiple variables.
4445bd8deadSopenharmony_ci
4455bd8deadSopenharmony_ci      RESOLVED:  Cases where a single state update necessarily requires
4465bd8deadSopenharmony_ci      updating multiple variables are disallowed.  The only restriction
4475bd8deadSopenharmony_ci      resulting from this decision is that a single state variable can not be
4485bd8deadSopenharmony_ci      bound more than once in the collection of arrays that are accessed using
4495bd8deadSopenharmony_ci      relative addressing (at run time).  The driver can and will coalesce all
4505bd8deadSopenharmony_ci      other bindings accessed only at fixed offsets into a single binding.
4515bd8deadSopenharmony_ci
4525bd8deadSopenharmony_ci      This restriction and a little driver work allows the same state variable
4535bd8deadSopenharmony_ci      to be used multiple times without requiring that a single state change
4545bd8deadSopenharmony_ci      update multiple variables.
4555bd8deadSopenharmony_ci
4565bd8deadSopenharmony_ci    (14) What semantic restrictions, if any, should be imposed on using
4575bd8deadSopenharmony_ci    multiple vertex attributes or program parameters in the same instruction?
4585bd8deadSopenharmony_ci
4595bd8deadSopenharmony_ci      RESOLVED:  None.  If the underlying hardware implementation does not
4605bd8deadSopenharmony_ci      support reads of multiple attributes or program parameters, the driver
4615bd8deadSopenharmony_ci      may need to transparently insert additional instructions and/or consume
4625bd8deadSopenharmony_ci      temporaries to perform the operation.
4635bd8deadSopenharmony_ci    
4645bd8deadSopenharmony_ci    (15) How and when should related state be combined into a single program
4655bd8deadSopenharmony_ci    parameter binding?  Additionally, should any values derived from core GL
4665bd8deadSopenharmony_ci    state be exposed, too?
4675bd8deadSopenharmony_ci
4685bd8deadSopenharmony_ci      RESOLVED:  Related state should be combined when possible, as long as
4695bd8deadSopenharmony_ci      the binding name remains somewhat sensible.  Additionally, certain
4705bd8deadSopenharmony_ci      pre-computed state items useful for performance reasons are also
4715bd8deadSopenharmony_ci      exposed.  In particular, the following GL state combinations are
4725bd8deadSopenharmony_ci      supported:
4735bd8deadSopenharmony_ci
4745bd8deadSopenharmony_ci        * Light attenuation constants and the spot light exponent are combined
4755bd8deadSopenharmony_ci          into a single vector called "state.light[n].attenuation" (spot
4765bd8deadSopenharmony_ci          lights can attenuate the lit result).
4775bd8deadSopenharmony_ci
4785bd8deadSopenharmony_ci        * Spot light direction and cutoff angle cosine are called
4795bd8deadSopenharmony_ci          "state.light[n].spot.direction" (cutoff is directional information).
4805bd8deadSopenharmony_ci          Binding the cutoff angle itself is pretty useless, so the cosine is
4815bd8deadSopenharmony_ci          used.
4825bd8deadSopenharmony_ci
4835bd8deadSopenharmony_ci        * A pre-computed half angle for lighting with infinite lights and an
4845bd8deadSopenharmony_ci          infinite viewer is provided and called "state.light[n].half".
4855bd8deadSopenharmony_ci
4865bd8deadSopenharmony_ci        * Pre-computed products of ambient, diffuse, and specular light colors
4875bd8deadSopenharmony_ci          with the corresponding front or back material colors are supported,
4885bd8deadSopenharmony_ci          and are called "state.lightprod[n].<face>.<property>".
4895bd8deadSopenharmony_ci
4905bd8deadSopenharmony_ci        * Exponential fog density, linear fog start and end parameters, as
4915bd8deadSopenharmony_ci          well as the pre-computed reciprocal of (end-start) are combined into
4925bd8deadSopenharmony_ci          one vector called "state.fog.params".
4935bd8deadSopenharmony_ci
4945bd8deadSopenharmony_ci        * The core point size, minimum and maximum size clamps
4955bd8deadSopenharmony_ci          (ARB_point_parameters), and multisample fade size threshold
4965bd8deadSopenharmony_ci          (ARB_point_parameters) are combined into a single vector called
4975bd8deadSopenharmony_ci          "state.point.size".
4985bd8deadSopenharmony_ci
4995bd8deadSopenharmony_ci        * Precomputed transpose, inverse, and inverse transpose matrices are
5005bd8deadSopenharmony_ci          supported for each base matrix type.
5015bd8deadSopenharmony_ci
5025bd8deadSopenharmony_ci    (16) Should the initial values of temporaries and results be undefined?
5035bd8deadSopenharmony_ci
5045bd8deadSopenharmony_ci      RESOLVED:  Since the underlying hardware differs, it was decided to
5055bd8deadSopenharmony_ci      leave these values uninitalized.  There are a few issues related to this
5065bd8deadSopenharmony_ci      behavior that programs should keep in mind:
5075bd8deadSopenharmony_ci
5085bd8deadSopenharmony_ci        * Since any results not written by the program are undefined, programs
5095bd8deadSopenharmony_ci          should write to all result registers that are needed during
5105bd8deadSopenharmony_ci          rasterization.
5115bd8deadSopenharmony_ci
5125bd8deadSopenharmony_ci        * In particular, the initial vertex position result is undefined, and
5135bd8deadSopenharmony_ci          will remain undefined if not written by a program.  To achieve
5145bd8deadSopenharmony_ci          proper results, vertex programs should be careful to write to all
5155bd8deadSopenharmony_ci          four components of the vertex position.  Otherwise, primitives may
5165bd8deadSopenharmony_ci          be completely clipped or produce undefined results during
5175bd8deadSopenharmony_ci          rasterization.  There is no semantic requirement that programs must
5185bd8deadSopenharmony_ci          write a transformed vertex position, so erroneous programs will load
5195bd8deadSopenharmony_ci          succesfully, but will produce undefined (and probably useless)
5205bd8deadSopenharmony_ci          results.  Such a semantic requirement may be impossible to enforce
5215bd8deadSopenharmony_ci          in future language versions that support run-time branching.
5225bd8deadSopenharmony_ci
5235bd8deadSopenharmony_ci        * Since vertex programs may be executed when the raster position is
5245bd8deadSopenharmony_ci          set, any attributes not written by the program will result in
5255bd8deadSopenharmony_ci          undefined state in the current raster position.  Programs should
5265bd8deadSopenharmony_ci          write to all result registers that would be used when rasterizing
5275bd8deadSopenharmony_ci          pixel primitives using the current raster position.
5285bd8deadSopenharmony_ci
5295bd8deadSopenharmony_ci        * If conventional OpenGL texture mapping operations are performed, a
5305bd8deadSopenharmony_ci          program should always write to the "w" coordinate of any texture
5315bd8deadSopenharmony_ci          coordinates result registers it needs to use.  Conventional OpenGL
5325bd8deadSopenharmony_ci          texture accesses always use projective texture coordinates (e.g.,
5335bd8deadSopenharmony_ci          s/q, t/q, r/q), even though q is almost always 1.0.  An undefined q
5345bd8deadSopenharmony_ci          coordinate (coming from the "w" component of the result register)
5355bd8deadSopenharmony_ci          may produce undefined coordinates on the texture lookup.
5365bd8deadSopenharmony_ci
5375bd8deadSopenharmony_ci    (17) Should vertex programs be required to have a header token and an end
5385bd8deadSopenharmony_ci    token?
5395bd8deadSopenharmony_ci
5405bd8deadSopenharmony_ci      RESOLVED:  Yes.  The header token for this extension is named
5415bd8deadSopenharmony_ci      "!!ARBvp1.0".  The ARB may standardize future language versions which
5425bd8deadSopenharmony_ci      would be expected to have tokens like "!!ARBvp2.0".  Vertex programs
5435bd8deadSopenharmony_ci      must end with the "END" token.
5445bd8deadSopenharmony_ci
5455bd8deadSopenharmony_ci      The initial header token reminds the programmer what type of program
5465bd8deadSopenharmony_ci      they are writing.  If vertex programs are ever read from disk files, the
5475bd8deadSopenharmony_ci      header token can be used to specifically identify vertex programs.  The
5485bd8deadSopenharmony_ci      initial header tokens will also make it easier for programmers to
5495bd8deadSopenharmony_ci      distinguish between multiple types of vertex programs and between vertex
5505bd8deadSopenharmony_ci      programs and another future type of programs.
5515bd8deadSopenharmony_ci
5525bd8deadSopenharmony_ci      We expect that programs may be generated by concatenation of program
5535bd8deadSopenharmony_ci      fragments.  The "END" token will hopefully reduce bugs due to specifying
5545bd8deadSopenharmony_ci      an incorrectly concatenated program.
5555bd8deadSopenharmony_ci
5565bd8deadSopenharmony_ci    (18) Should ProgramStringARB take a <program> specifier?  Should
5575bd8deadSopenharmony_ci    ProgramLocalParameterARB and GetProgramLocalParameterARB take a <program>
5585bd8deadSopenharmony_ci    specifier?  How about GetProgramivARB and GetProgramStringARB?
5595bd8deadSopenharmony_ci
5605bd8deadSopenharmony_ci      RESOLVED:  No to all.  Instead, these calls are specified to always
5615bd8deadSopenharmony_ci      query or modify the currently bound program object.  Using bound objects
5625bd8deadSopenharmony_ci      allows GL implementations to avoid locking and name lookup overhead on
5635bd8deadSopenharmony_ci      each such call.
5645bd8deadSopenharmony_ci
5655bd8deadSopenharmony_ci      This behavior does imply that applications loading a sequence of program
5665bd8deadSopenharmony_ci      objects must bind each in turn.
5675bd8deadSopenharmony_ci
5685bd8deadSopenharmony_ci    (19) Should relative addressing be performed using an address register
5695bd8deadSopenharmony_ci    (load up an integer register) or by taking a floating-point scalar?
5705bd8deadSopenharmony_ci
5715bd8deadSopenharmony_ci      RESOLVED:  Address register.  It would not be a good idea to support
5725bd8deadSopenharmony_ci      both syntaxes simultaneously, since using a floating-point scalar may
5735bd8deadSopenharmony_ci      consume the only available address register in the process.  The current
5745bd8deadSopenharmony_ci      address register syntax can be easily extended to allow for multiple
5755bd8deadSopenharmony_ci      integer registers and/or enable other integer operations in a later
5765bd8deadSopenharmony_ci      extension.
5775bd8deadSopenharmony_ci
5785bd8deadSopenharmony_ci      Using a floating-point index may require an extra instruction on some
5795bd8deadSopenharmony_ci      architectures, and would require optimization work to eliminate
5805bd8deadSopenharmony_ci      redundant loads.  Using a floating-point index may consume one of a
5815bd8deadSopenharmony_ci      small number of temporary registers.  On the other hand, for
5825bd8deadSopenharmony_ci      implementations without a dedicated address register, it may be
5835bd8deadSopenharmony_ci      necessary to dedicate a general-purpose register (or register component)
5845bd8deadSopenharmony_ci      to hold the address register contents.
5855bd8deadSopenharmony_ci
5865bd8deadSopenharmony_ci    (20) How should user-defined clipping be supported in this specification?
5875bd8deadSopenharmony_ci
5885bd8deadSopenharmony_ci      RESOLVED:  User-defined clipping is not supported in standard vertex
5895bd8deadSopenharmony_ci      program mode.  User-defined clipping support will be provided for
5905bd8deadSopenharmony_ci      programs that use the "position invariant" option, where all vertex
5915bd8deadSopenharmony_ci      transformation operations are performed by the fixed-function pipeline.
5925bd8deadSopenharmony_ci      
5935bd8deadSopenharmony_ci      It is expected that future vertex program extensions or a future
5945bd8deadSopenharmony_ci      language standard may provide more powerful user clipping functionality.
5955bd8deadSopenharmony_ci
5965bd8deadSopenharmony_ci      The options considered were:
5975bd8deadSopenharmony_ci
5985bd8deadSopenharmony_ci      (1) Not at all.  Does not work for applications requiring user clipping.
5995bd8deadSopenharmony_ci          User clipping could be supported through a language extension.
6005bd8deadSopenharmony_ci
6015bd8deadSopenharmony_ci      (2) Support only through the "position_invariant" option, where vertex
6025bd8deadSopenharmony_ci          transformation is performed by the fixed-function pipeline.
6035bd8deadSopenharmony_ci
6045bd8deadSopenharmony_ci      (3) Support by using the fixed-function pipeline to generate eye
6055bd8deadSopenharmony_ci          coordinates and perform user clipping as specified for conventional
6065bd8deadSopenharmony_ci          transformation.  May not work properly if the vertex transformation
6075bd8deadSopenharmony_ci          doesn't match the standard "multiply by modelview and projection
6085bd8deadSopenharmony_ci          matrices" model.
6095bd8deadSopenharmony_ci  
6105bd8deadSopenharmony_ci      (4) Project existing fixed-function clip planes into clip coordinates
6115bd8deadSopenharmony_ci          and perform the clip test in clip space.  The clip planes would be
6125bd8deadSopenharmony_ci          transformed by the inverse of the projection matrix, which will not
6135bd8deadSopenharmony_ci          work if the projection matrix is singular.
6145bd8deadSopenharmony_ci
6155bd8deadSopenharmony_ci      (5) Provide a 4-component "user clip coordinate" result that can be
6165bd8deadSopenharmony_ci          bound by a vertex program.  User clipping is performed as in
6175bd8deadSopenharmony_ci          unextended OpenGL, using the "user clip coordinate" in place of the
6185bd8deadSopenharmony_ci          non-existant eye coordinates.  This approach allows an application
6195bd8deadSopenharmony_ci          to do user clipping in any coordinate system.  Clipping would not be
6205bd8deadSopenharmony_ci          independent of primitive tesselation as in the conventional
6215bd8deadSopenharmony_ci          pipeline.  Additionally, the implicit transformation of specified
6225bd8deadSopenharmony_ci          clip planes by the modelview matrix may be undesirable (e.g.,
6235bd8deadSopenharmony_ci          clipping in object coordinates).
6245bd8deadSopenharmony_ci
6255bd8deadSopenharmony_ci      (6) Provide one or more "clip plane distance" results that can be bound
6265bd8deadSopenharmony_ci          by a vertex program.  For conventional clipping applications, vertex
6275bd8deadSopenharmony_ci          programs would compute the dot products normally computed by
6285bd8deadSopenharmony_ci          fixed-function hardware.  Additionally, this method would enable
6295bd8deadSopenharmony_ci          additional unconventional clipping effects.  Primitives would be
6305bd8deadSopenharmony_ci          clipped to the portion whose interpolated clip distances are greater
6315bd8deadSopenharmony_ci          than or equal to zero.  This approach has the same issues as (5).
6325bd8deadSopenharmony_ci
6335bd8deadSopenharmony_ci    (21) How should future vertex program opcodes be named?
6345bd8deadSopenharmony_ci
6355bd8deadSopenharmony_ci      RESOLVED:  Three-character names are recommended for brevity.  Three
6365bd8deadSopenharmony_ci      character names are not a hard-and-fast requirement; extra characters
6375bd8deadSopenharmony_ci      may be needed for clarity or to disambiguate instructions.
6385bd8deadSopenharmony_ci
6395bd8deadSopenharmony_ci    (22) Should anything be said about the precision used for carrying out the
6405bd8deadSopenharmony_ci    instructions?
6415bd8deadSopenharmony_ci
6425bd8deadSopenharmony_ci      RESOLVED:  Not much; precision will vary across platforms.  The minimum
6435bd8deadSopenharmony_ci      precision requirements (1 part in 10^5 or roughly 17 bits) are spelled
6445bd8deadSopenharmony_ci      out in section 2.1.1.  In practice, implementations will generally
6455bd8deadSopenharmony_ci      provide precision comparable to that obtained using single precision
6465bd8deadSopenharmony_ci      floats.  Documenting exact precision across implementations is
6475bd8deadSopenharmony_ci      difficult.  Additionally, it is difficult to spell out precision
6485bd8deadSopenharmony_ci      requirements for "compound" operations such as DP4.
6495bd8deadSopenharmony_ci
6505bd8deadSopenharmony_ci    (23) Should this extension support evaluator maps for generic vertex
6515bd8deadSopenharmony_ci    attributes?  If so, what attribute sizes should be supported?  Note that
6525bd8deadSopenharmony_ci    such maps are not supported at all for texture units except zero.
6535bd8deadSopenharmony_ci
6545bd8deadSopenharmony_ci      RESOLVED:  No.  Evaluator support has not been consistently extended in
6555bd8deadSopenharmony_ci      previous extensions.  For example, neither ARB_multitexture nor OpenGL
6565bd8deadSopenharmony_ci      1.3 provide support for evaluators for texture units other than unit
6575bd8deadSopenharmony_ci      zero.  Adding evaluators for generic attributes involves a large amount
6585bd8deadSopenharmony_ci      of new state and complexity, particularly if evaluators should be
6595bd8deadSopenharmony_ci      supported in general form (1, 2, 3, and 4 components, all supported data
6605bd8deadSopenharmony_ci      type).
6615bd8deadSopenharmony_ci
6625bd8deadSopenharmony_ci    (25) The number of generic vertex attributes is implementation-dependent
6635bd8deadSopenharmony_ci    and is at least 16.  Each generic vertex attribute has a vertex array
6645bd8deadSopenharmony_ci    enable.  Should two new entry points be provided to accept an arbitrary
6655bd8deadSopenharmony_ci    attribute number, or should we reserve a range of enumerants that is
6665bd8deadSopenharmony_ci    "large enough"?
6675bd8deadSopenharmony_ci
6685bd8deadSopenharmony_ci      RESOLVED:  Yes.  EnableVertexAttribArrayARB and
6695bd8deadSopenharmony_ci      DisableVertexAttribArrayARB.  This allows the number of vertex
6705bd8deadSopenharmony_ci      attributes to be unbounded, instead of using a limited range.
6715bd8deadSopenharmony_ci
6725bd8deadSopenharmony_ci    (26) What limits should be imposed on the constants that can be added to
6735bd8deadSopenharmony_ci    or subtracted from the address register for relative addressing?  Negative
6745bd8deadSopenharmony_ci    offsets are sometimes useful for shifting down in an array.
6755bd8deadSopenharmony_ci
6765bd8deadSopenharmony_ci      RESOLVED:  -64 to +63 should be sufficient for the time being.  Offset
6775bd8deadSopenharmony_ci      sizes are limited to allow offsets to be baked into device-dependent
6785bd8deadSopenharmony_ci      instruction encodings.
6795bd8deadSopenharmony_ci
6805bd8deadSopenharmony_ci    (28) What level of precision should be guaranteed for the EXP and LOG
6815bd8deadSopenharmony_ci    instructions?  And for the EX2 and LG2 instructions?
6825bd8deadSopenharmony_ci
6835bd8deadSopenharmony_ci      RESOLVED:  The low precision EXP and LOG instructions should give at
6845bd8deadSopenharmony_ci      least 10 bits (2^-11 maximum relative error).  No specific treatment
6855bd8deadSopenharmony_ci      will be added for EX2/LG2, implying that the computations should at
6865bd8deadSopenharmony_ci      least meet the minimal floating-point precision required by the spec.
6875bd8deadSopenharmony_ci
6885bd8deadSopenharmony_ci    (29) Should incremental program compilation be supported?
6895bd8deadSopenharmony_ci
6905bd8deadSopenharmony_ci      RESOLVED:  No.  Applications can compile programs just as easily using
6915bd8deadSopenharmony_ci      string concatenation.
6925bd8deadSopenharmony_ci
6935bd8deadSopenharmony_ci    (30) Should the execution environment be identified by the program itself
6945bd8deadSopenharmony_ci    or as an additional "language" parameter to ProgramStringARB?
6955bd8deadSopenharmony_ci
6965bd8deadSopenharmony_ci      RESOLVED:  Programs should identify their execution environment in the
6975bd8deadSopenharmony_ci      header.  The header (plus any specified options) make it clear what kind
6985bd8deadSopenharmony_ci      of program is being defined.
6995bd8deadSopenharmony_ci
7005bd8deadSopenharmony_ci    (31) Should this extension provide support for character sets other than
7015bd8deadSopenharmony_ci    7-bit ASCII?
7025bd8deadSopenharmony_ci
7035bd8deadSopenharmony_ci      RESOLVED:  Provide a <format> argument to ProgramStringARB to allow for
7045bd8deadSopenharmony_ci      future extensions.  Only ASCII will be supported by this extension;
7055bd8deadSopenharmony_ci      additional character sets or encodings could be supported using separate
7065bd8deadSopenharmony_ci      extensions.
7075bd8deadSopenharmony_ci
7085bd8deadSopenharmony_ci    (32) Support for "program object" functionality may be applicable to
7095bd8deadSopenharmony_ci    future program targets.  Should this functionality be factored out into a
7105bd8deadSopenharmony_ci    separate extension?
7115bd8deadSopenharmony_ci
7125bd8deadSopenharmony_ci      RESOLVED:  No, such separation is not necessary.  This extension was
7135bd8deadSopenharmony_ci      designed to allow to easily accommodate future program target types.  It
7145bd8deadSopenharmony_ci      would be straightforward to put program object functionality into a
7155bd8deadSopenharmony_ci      separate extension, but the functionality provided by that extension
7165bd8deadSopenharmony_ci      would be of no value by itself.
7175bd8deadSopenharmony_ci
7185bd8deadSopenharmony_ci    (33) Should program residency management be supported?
7195bd8deadSopenharmony_ci
7205bd8deadSopenharmony_ci      RESOLVED:  No.  This functionality can be supported in a separate
7215bd8deadSopenharmony_ci      extension if desired.  If may be desirable to address residency
7225bd8deadSopenharmony_ci      management in a more general form, where an application may desire a
7235bd8deadSopenharmony_ci      diverse set of objects (textures, programs) to be resident at once.
7245bd8deadSopenharmony_ci
7255bd8deadSopenharmony_ci    (34) Should program object management APIs (GenProgramsARB,
7265bd8deadSopenharmony_ci    DeleteProgramsARB) work like texture objects or display lists?
7275bd8deadSopenharmony_ci
7285bd8deadSopenharmony_ci      RESOLVED:  Texture objects.  
7295bd8deadSopenharmony_ci
7305bd8deadSopenharmony_ci      Both approaches have their merits.  Pluses for the display list model
7315bd8deadSopenharmony_ci      include:  no need to keep around multiple indices if you want to
7325bd8deadSopenharmony_ci      allocate a group of object, contiguous indices may fall out on
7335bd8deadSopenharmony_ci      implementations that share one block allocator for textures and display
7345bd8deadSopenharmony_ci      lists.  Pluses for the texture object model:  non-contiguous indices may
7355bd8deadSopenharmony_ci      be more optimizable -- new objects can be mapped to empty blocks in a
7365bd8deadSopenharmony_ci      hash table to avoid collisions with existing objects, separate indices
7375bd8deadSopenharmony_ci      are more compatible with a future handle-based object paradigm, and a
7385bd8deadSopenharmony_ci      larger base of extensions using this model.  Note that display list
7395bd8deadSopenharmony_ci      allocations needed to be contiguous to support CallLists, but no such
7405bd8deadSopenharmony_ci      requirement for texture or program objects exists for programs.
7415bd8deadSopenharmony_ci
7425bd8deadSopenharmony_ci    (35) Should there be support for a program object zero?  With texture
7435bd8deadSopenharmony_ci    objects, texture object zero is "special" because it is the default
7445bd8deadSopenharmony_ci    texture object for each target type.  Is there something like this for
7455bd8deadSopenharmony_ci    program objects?
7465bd8deadSopenharmony_ci
7475bd8deadSopenharmony_ci      RESOLVED:  Yes.  Like texture objects, there should be a separate
7485bd8deadSopenharmony_ci      program object zero for each program type.  This allows applications to
7495bd8deadSopenharmony_ci      use vertex programs without needing to generate and manage program
7505bd8deadSopenharmony_ci      objects.
7515bd8deadSopenharmony_ci
7525bd8deadSopenharmony_ci      With texture objects, an object zero was needed for backward
7535bd8deadSopenharmony_ci      compatibility with pre-OpenGL 1.1 applications.  There is no such
7545bd8deadSopenharmony_ci      requirement here, but providing an object zero nicely matches the
7555bd8deadSopenharmony_ci      familiar texture object model.
7565bd8deadSopenharmony_ci
7575bd8deadSopenharmony_ci    (36) How should this extension provide feedback on why a program failed to
7585bd8deadSopenharmony_ci    load?
7595bd8deadSopenharmony_ci
7605bd8deadSopenharmony_ci      RESOLVED:  Two queries are provided.  Calling GetIntegerv() with
7615bd8deadSopenharmony_ci      PROGRAM_ERROR_POSITION_ARB provides the offset of an offending
7625bd8deadSopenharmony_ci      instruction in the program string.  An error position of -1 indicates
7635bd8deadSopenharmony_ci      that a program loaded successfully.  Calling GetString() with
7645bd8deadSopenharmony_ci      PROGRAM_ERROR_STRING_ARB returns an implementation-dependent error
7655bd8deadSopenharmony_ci      string explaining the reason for the failure.  The error string can be
7665bd8deadSopenharmony_ci      queried even on successful program loads to check for warning messages.
7675bd8deadSopenharmony_ci
7685bd8deadSopenharmony_ci      The error string may be kept in a static buffer managed by the GL
7695bd8deadSopenharmony_ci      implementation.  Implementations may reuse the same buffer on subsequent
7705bd8deadSopenharmony_ci      calls to ProgramStringARB, so returned error strings are guaranteed to
7715bd8deadSopenharmony_ci      be valid only until the next such call.
7725bd8deadSopenharmony_ci
7735bd8deadSopenharmony_ci    (37) How does ARB_vertex_blend's WEIGHT_SUM_UNITY_ARB mode interact with
7745bd8deadSopenharmony_ci    this extension?  This mode allows an application to specify N-1 weights,
7755bd8deadSopenharmony_ci    and have the Nth weight computed by the GL.
7765bd8deadSopenharmony_ci
7775bd8deadSopenharmony_ci      RESOLVED:  The ARB_vertex_blend spec (as of May, 2002) specifies that
7785bd8deadSopenharmony_ci      the nth weight is automatically computed by the GL and is effectively
7795bd8deadSopenharmony_ci      current state.  In practice, ARB_vertex_blend implementations compute
7805bd8deadSopenharmony_ci      the nth weight on the fly in the fixed-function transformation pipeline,
7815bd8deadSopenharmony_ci      implying that the ARB_vertex_blend spec may require a fix.  For the
7825bd8deadSopenharmony_ci      purposes of this extension, the WEIGHT_SUM_UNITY_ARB enable is ignored
7835bd8deadSopenharmony_ci      in vertex program mode.  Applications performing a vertex weighting
7845bd8deadSopenharmony_ci      operation in a vertex program are free to compute the extra weight in
7855bd8deadSopenharmony_ci      the program.
7865bd8deadSopenharmony_ci
7875bd8deadSopenharmony_ci    (38) Should program environment parameters be pushed and popped?
7885bd8deadSopenharmony_ci
7895bd8deadSopenharmony_ci      RESOLVED:  No.  There is no need to push and pop this large set of
7905bd8deadSopenharmony_ci      state, much like pixel maps.  Adding a new attribute bit would have
7915bd8deadSopenharmony_ci      complicated logistics (would the bit be included in ALL_ATTRIB_BITS?).
7925bd8deadSopenharmony_ci      Having program local parameters provides a method for making localized
7935bd8deadSopenharmony_ci      changes to certain state simply by switching programs.
7945bd8deadSopenharmony_ci
7955bd8deadSopenharmony_ci    (39) How should this extension interact with color material?
7965bd8deadSopenharmony_ci
7975bd8deadSopenharmony_ci      RESOLVED:  When color material is enabled, any bindings of material
7985bd8deadSopenharmony_ci      colors that track the current color should be updated when the current
7995bd8deadSopenharmony_ci      color is updated.  In this specification, material properties can be
8005bd8deadSopenharmony_ci      bound only as program parameters, and any changes to the material
8015bd8deadSopenharmony_ci      properties inside a Begin/End leave the bindings undefined until the
8025bd8deadSopenharmony_ci      next End command.  Similarly, any indirect changes to the material
8035bd8deadSopenharmony_ci      properties (through ColorMaterial) will have a similar effect.
8045bd8deadSopenharmony_ci
8055bd8deadSopenharmony_ci      Several other options were considered here.  One option was to support
8065bd8deadSopenharmony_ci      per-vertex material property bindings and have programs that reference
8075bd8deadSopenharmony_ci      tracked material properties should get the current color.  This could be
8085bd8deadSopenharmony_ci      handled either by broadcasting the current color to multiple vertex
8095bd8deadSopenharmony_ci      attributes, or recompiling the vertex program so that references to a
8105bd8deadSopenharmony_ci      tracked material property are redirected to the vertex color.  Both such
8115bd8deadSopenharmony_ci      solutions are somewhat complex.  A second option would be to ignore the
8125bd8deadSopenharmony_ci      COLOR_MATERIAL enable and instead use an "old" material color.  This
8135bd8deadSopenharmony_ci      breaks the standard color material model.  Implementations can and often
8145bd8deadSopenharmony_ci      do defer such updates (making an "old" color available), some conditions
8155bd8deadSopenharmony_ci      may cause an implementation to update of material state at odd times.
8165bd8deadSopenharmony_ci
8175bd8deadSopenharmony_ci    (41) What about when the execution environment involves support for other
8185bd8deadSopenharmony_ci    extensions?  In particular, the execution environment subsumes some
8195bd8deadSopenharmony_ci    functionality from EXT/ARB_point_parameters, EXT_fog_coord,
8205bd8deadSopenharmony_ci    EXT_secondary_color, and ARB_multitexture.
8215bd8deadSopenharmony_ci
8225bd8deadSopenharmony_ci      RESOLVED:  This extension assumes support for functionality that
8235bd8deadSopenharmony_ci      includes a fog coordinate, secondary color, per-vertex point sizes, and
8245bd8deadSopenharmony_ci      multiple texture coordinates (at least to the extent that it exposes >1
8255bd8deadSopenharmony_ci      texture coordinate).  All of these extensions are supported fairly
8265bd8deadSopenharmony_ci      widely.  On some platforms, some of this functionality may require
8275bd8deadSopenharmony_ci      software fallbacks.
8285bd8deadSopenharmony_ci
8295bd8deadSopenharmony_ci    (42) How does PointSize work with vertex programs?
8305bd8deadSopenharmony_ci
8315bd8deadSopenharmony_ci      RESOLVED:  If VERTEX_PROGRAM_POINT_SIZE_ARB is disabled, the size of
8325bd8deadSopenharmony_ci      points is determined by the PointSize state and is not attenuated, even
8335bd8deadSopenharmony_ci      if EXT_point_parameters is supported.  If enabled, the point size is the
8345bd8deadSopenharmony_ci      point size result value, and is clamped to implementation-dependent
8355bd8deadSopenharmony_ci      point size limits during point rasterization.
8365bd8deadSopenharmony_ci
8375bd8deadSopenharmony_ci    (43) What do we say about the alpha component of the secondary color?
8385bd8deadSopenharmony_ci
8395bd8deadSopenharmony_ci      RESOLVED:  The alpha component of the secondary color has generally been
8405bd8deadSopenharmony_ci      treated as zero.  This extension specifies that only the R, G, and B
8415bd8deadSopenharmony_ci      components are added in the color sum operation, making the alpha
8425bd8deadSopenharmony_ci      component of the secondary color irrelevant.  Other downstream
8435bd8deadSopenharmony_ci      extensions may allow applications to make use of this component.
8445bd8deadSopenharmony_ci
8455bd8deadSopenharmony_ci    (44) How are edge flags handled?
8465bd8deadSopenharmony_ci
8475bd8deadSopenharmony_ci      RESOLVED:  Edge flags are passed through without the ability to be
8485bd8deadSopenharmony_ci      modified by a vertex program.  Applications are free to send edge flags
8495bd8deadSopenharmony_ci      when vertex program mode is enabled.
8505bd8deadSopenharmony_ci
8515bd8deadSopenharmony_ci    (45) Should programs be C-style null-terminated strings?
8525bd8deadSopenharmony_ci      
8535bd8deadSopenharmony_ci      RESOLVED:  No.  Programs should be specified as an array of GLubyte with
8545bd8deadSopenharmony_ci      an explicit length parameter.  OpenGL has no precedent for passing
8555bd8deadSopenharmony_ci      null-terminated strings into the API (though GetString returns
8565bd8deadSopenharmony_ci      null-terminated strings).  Null-terminated strings may be problematic
8575bd8deadSopenharmony_ci      for some programming languages.
8585bd8deadSopenharmony_ci
8595bd8deadSopenharmony_ci    (46) Should all existing OpenGL transform functionality and extensions be
8605bd8deadSopenharmony_ci    implementable as vertex programs?
8615bd8deadSopenharmony_ci
8625bd8deadSopenharmony_ci      RESOLVED:  Yes.  Vertex programs should be a complete superset of what
8635bd8deadSopenharmony_ci      you can do with OpenGL 1.2 and existing vertex transform extensions.  To
8645bd8deadSopenharmony_ci      implement EXT_point_parameters, the VERTEX_PROGRAM_POINT_SIZE_ARB enable
8655bd8deadSopenharmony_ci      is introduced.  To implement two-sided lighting, the
8665bd8deadSopenharmony_ci      VERTEX_PROGRAM_TWO_SIDE_ARB enable is introduced.  To implement color
8675bd8deadSopenharmony_ci      material, applications should refer to the per-vertex color attribute in
8685bd8deadSopenharmony_ci      their vertex programs.
8695bd8deadSopenharmony_ci
8705bd8deadSopenharmony_ci    (47) Should there be a plural version of ProgramEnvParameter and
8715bd8deadSopenharmony_ci    ProgramLocalParameter, which would set multiple parameters in a single
8725bd8deadSopenharmony_ci    call?
8735bd8deadSopenharmony_ci
8745bd8deadSopenharmony_ci      RESOLVED:  No; not necessary.
8755bd8deadSopenharmony_ci
8765bd8deadSopenharmony_ci    (48) Can the currently bound vertex program object be deleted or reloaded?
8775bd8deadSopenharmony_ci
8785bd8deadSopenharmony_ci      RESOLVED:  Yes.  When ProgramStringARB is called to reload a program
8795bd8deadSopenharmony_ci      object, subsequent program executions will use the new program.  When
8805bd8deadSopenharmony_ci      DeleteProgramsARB deletes a currently bound program object, object zero
8815bd8deadSopenharmony_ci      becomes the new current program object.
8825bd8deadSopenharmony_ci
8835bd8deadSopenharmony_ci    (49) What happens if you transform vertices in vertex program mode, but
8845bd8deadSopenharmony_ci    the current program object does not contain a valid vertex program?
8855bd8deadSopenharmony_ci
8865bd8deadSopenharmony_ci      RESOLVED:  Begin will fail with an INVALID_OPERATION error if the
8875bd8deadSopenharmony_ci      currently bound vertex program object does not have a valid program.
8885bd8deadSopenharmony_ci      The same applies to RasterPos and any command (Rect, DrawArrays,
8895bd8deadSopenharmony_ci      DrawElements) that implies a Begin.
8905bd8deadSopenharmony_ci
8915bd8deadSopenharmony_ci      Because Vertex is ignored outside of a Begin/End pair (without
8925bd8deadSopenharmony_ci      generating an error) it is impossible to provoke a vertex program if the
8935bd8deadSopenharmony_ci      current vertex program object is nonexistent or invalid.  Other
8945bd8deadSopenharmony_ci      per-vertex parameters (for examples those set by Color, Normal, and
8955bd8deadSopenharmony_ci      VertexAttrib*ARB when the attribute number is not zero) are allowed
8965bd8deadSopenharmony_ci      since they are legal outside of a Begin/End.
8975bd8deadSopenharmony_ci
8985bd8deadSopenharmony_ci    (50) Discussing matrices is confusing because of row-major versus
8995bd8deadSopenharmony_ci    column-major issues.  Can you give an example of how a matrix is bound?
9005bd8deadSopenharmony_ci
9015bd8deadSopenharmony_ci      RESOLVED:  Assume program matrix zero were loaded with the following
9025bd8deadSopenharmony_ci      code:
9035bd8deadSopenharmony_ci 
9045bd8deadSopenharmony_ci        // When loaded, the first row is "1, 2, 3, 4", because of column-major
9055bd8deadSopenharmony_ci        // (OpenGL spec) vs. row-major (C) differences.
9065bd8deadSopenharmony_ci        GLfloat matrix[16] = { 1, 5, 9,  13,
9075bd8deadSopenharmony_ci                               2, 6, 10, 14,
9085bd8deadSopenharmony_ci                               3, 7, 11, 15,
9095bd8deadSopenharmony_ci                               4, 8, 12, 16 };
9105bd8deadSopenharmony_ci        glMatrixMode(GL_MATRIX0_ARB);
9115bd8deadSopenharmony_ci        glLoadMatrixf(matrix);
9125bd8deadSopenharmony_ci
9135bd8deadSopenharmony_ci      Then in the program
9145bd8deadSopenharmony_ci
9155bd8deadSopenharmony_ci        !!ARBvp1.0
9165bd8deadSopenharmony_ci        PARAM mat1[4] = { state.matrix.program[0] };
9175bd8deadSopenharmony_ci        PARAM mat2[4] = { state.matrix.program[0].transpose };
9185bd8deadSopenharmony_ci
9195bd8deadSopenharmony_ci      mat1[0] would have (1,2,3,4), mat1[3] would have (13,14,15,16), mat2[0]
9205bd8deadSopenharmony_ci      would have (1,5,9,13), and mat2[3] would have (4,8,12,16).
9215bd8deadSopenharmony_ci
9225bd8deadSopenharmony_ci    (51) Should the new vertex program-related enables push/pop with
9235bd8deadSopenharmony_ci    ENABLE_BIT?
9245bd8deadSopenharmony_ci
9255bd8deadSopenharmony_ci      RESOLVED:  Yes.  Pushing and popping enable bits is easy.
9265bd8deadSopenharmony_ci
9275bd8deadSopenharmony_ci    (52) Should all the vertex attribute state push/pop with CURRENT_BIT?
9285bd8deadSopenharmony_ci
9295bd8deadSopenharmony_ci      RESOLVED:  Yes.
9305bd8deadSopenharmony_ci
9315bd8deadSopenharmony_ci    (53) Should all the vertex attrib vertex array state push/pop with
9325bd8deadSopenharmony_ci    CLIENT_VERTEX_ARRAY_BIT?
9335bd8deadSopenharmony_ci
9345bd8deadSopenharmony_ci      RESOLVED:  Yes.
9355bd8deadSopenharmony_ci
9365bd8deadSopenharmony_ci    (55) Should we generate an INVALID_VALUE operation if updating a vertex
9375bd8deadSopenharmony_ci    attribute greater than MAX_VERTEX_ATTRIBS_ARB?
9385bd8deadSopenharmony_ci
9395bd8deadSopenharmony_ci      RESOLVED:  Yes.  The other option would be to leave the behavior
9405bd8deadSopenharmony_ci      undefined, as with MultiTexCoord() functions.  An implementation could
9415bd8deadSopenharmony_ci      mask or modulo the vertex attribute index with MAX_VERTEX_ATTRIB_ARB if
9425bd8deadSopenharmony_ci      it were a power of two.  This error check will be a minor performance
9435bd8deadSopenharmony_ci      issue with VertexAttrib*ARB() and VertexAttribArrayARB() calls.  There
9445bd8deadSopenharmony_ci      will be no per-vertex overhead when using vertex arrays or display
9455bd8deadSopenharmony_ci      lists.
9465bd8deadSopenharmony_ci
9475bd8deadSopenharmony_ci    (56) Should writes to program environment or local parameters during a
9485bd8deadSopenharmony_ci    vertex program be supported?
9495bd8deadSopenharmony_ci
9505bd8deadSopenharmony_ci      RESOLVED.  No.  Writes to program parameter registers from within a
9515bd8deadSopenharmony_ci      vertex program would require the execution of vertex programs to be
9525bd8deadSopenharmony_ci      serialized with respect to each other.  This would create a severe
9535bd8deadSopenharmony_ci      implementation penalty for pipelined or parallel vertex program
9545bd8deadSopenharmony_ci      execution implementations.
9555bd8deadSopenharmony_ci
9565bd8deadSopenharmony_ci    (58) Should program objects be shared among rendering contexts in the same
9575bd8deadSopenharmony_ci    manner as display lists and texture objects?
9585bd8deadSopenharmony_ci
9595bd8deadSopenharmony_ci      RESOLVED:  Yes.
9605bd8deadSopenharmony_ci
9615bd8deadSopenharmony_ci    (60) Should there be a MatrixMode or ActiveTexture-style selector for
9625bd8deadSopenharmony_ci    vertex attributes?
9635bd8deadSopenharmony_ci
9645bd8deadSopenharmony_ci      RESOLVED:  No.  While this would reduce the number of enumerants used by
9655bd8deadSopenharmony_ci      this extensions, it would create programming a hassle in lots of cases.
9665bd8deadSopenharmony_ci      Consider having to change the vertex attribute mode to enable a set of
9675bd8deadSopenharmony_ci      vertex arrays.
9685bd8deadSopenharmony_ci
9695bd8deadSopenharmony_ci    (61) How should queries of vertex attribute arrays work?
9705bd8deadSopenharmony_ci
9715bd8deadSopenharmony_ci      RESOLVED:  Add new get commands.  Using the existing calls would require
9725bd8deadSopenharmony_ci      adding 6 sets of 16+ enumerants for current state and vertex attribute
9735bd8deadSopenharmony_ci      array state.  That's too many new enumerants.  Instead, add
9745bd8deadSopenharmony_ci      GetVertexAttribARB and GetVertexAttribPointervARB.  GetVertexAttribARB
9755bd8deadSopenharmony_ci      will be used to query vertex attribute array state and the current
9765bd8deadSopenharmony_ci      values of the generic vertex attributes.  Get and GetPointerv will not
9775bd8deadSopenharmony_ci      return vertex attribute array state and pointers.
9785bd8deadSopenharmony_ci
9795bd8deadSopenharmony_ci    (63) What should be said about rendering invariances?
9805bd8deadSopenharmony_ci
9815bd8deadSopenharmony_ci      RESOLVED:  See the Appendix A additions below.
9825bd8deadSopenharmony_ci
9835bd8deadSopenharmony_ci      The justification for the two rules cited is to support multi-pass
9845bd8deadSopenharmony_ci      rendering when using vertex programs.  Different rendering passes will
9855bd8deadSopenharmony_ci      likely use different programs so there must be some means of
9865bd8deadSopenharmony_ci      guaranteeing that two different programs can generate particular
9875bd8deadSopenharmony_ci      identical vertex results between different passes.
9885bd8deadSopenharmony_ci
9895bd8deadSopenharmony_ci      In practice, this does limit the type of vertex program implementations
9905bd8deadSopenharmony_ci      that are possible.
9915bd8deadSopenharmony_ci
9925bd8deadSopenharmony_ci      For example, consider a limited hardware implementation of vertex
9935bd8deadSopenharmony_ci      programs that uses a different floating-point implementation than the
9945bd8deadSopenharmony_ci      CPU's floating-point implementation.  If the limited hardware
9955bd8deadSopenharmony_ci      implementation can only run small vertex programs (say the hardware
9965bd8deadSopenharmony_ci      provides on 4 temporary registers instead of the required 12), the
9975bd8deadSopenharmony_ci      implementation is incorrect and non-conformant if programs that only
9985bd8deadSopenharmony_ci      require 4 temporary registers use the vertex program hardware, but
9995bd8deadSopenharmony_ci      programs that require more than 4 temporary registers are implemented by
10005bd8deadSopenharmony_ci      the CPU.
10015bd8deadSopenharmony_ci
10025bd8deadSopenharmony_ci      This is a very important practical requirement.  Consider a multi-pass
10035bd8deadSopenharmony_ci      rendering algorithm where one pass uses a vertex program that uses only
10045bd8deadSopenharmony_ci      4 temporary registers, but a different pass uses a vertex program that
10055bd8deadSopenharmony_ci      uses 5 temporary registers.  If two programs have instruction sequences
10065bd8deadSopenharmony_ci      that given the same input state compute identical resulting vertex
10075bd8deadSopenharmony_ci      positions, the multi-pass algorithm should generate identically
10085bd8deadSopenharmony_ci      positioned primitives for each pass.  But given the non-conformant
10095bd8deadSopenharmony_ci      vertex program implementation described above, this could not be
10105bd8deadSopenharmony_ci      guaranteed.
10115bd8deadSopenharmony_ci
10125bd8deadSopenharmony_ci      This does not mean that schemes for splitting vertex program
10135bd8deadSopenharmony_ci      implementations between dedicated hardware and CPUs are impossible.  If
10145bd8deadSopenharmony_ci      the CPU and dedicated vertex program hardware used IDENTICAL
10155bd8deadSopenharmony_ci      floating-point implementations and therefore generated exactly identical
10165bd8deadSopenharmony_ci      results, the above described could work.
10175bd8deadSopenharmony_ci
10185bd8deadSopenharmony_ci      While these invariance rules are vital for vertex programs operating
10195bd8deadSopenharmony_ci      correctly for multi-pass algorithms, there is no requirement that
10205bd8deadSopenharmony_ci      conventional OpenGL vertex transform mode will be invariant with vertex
10215bd8deadSopenharmony_ci      program mode.  A multi-pass algorithm should not assume that one pass
10225bd8deadSopenharmony_ci      using vertex program mode and another pass using conventional GL vertex
10235bd8deadSopenharmony_ci      transform mode will generate identically positioned primitives.
10245bd8deadSopenharmony_ci
10255bd8deadSopenharmony_ci      Consider that while the conventional OpenGL vertex program mode is
10265bd8deadSopenharmony_ci      repeatable with itself, the exact procedure used to transform vertices
10275bd8deadSopenharmony_ci      is not specified nor is the procedure's precision specified.  The GL
10285bd8deadSopenharmony_ci      specification indicates that vertex coordinates are transformed by the
10295bd8deadSopenharmony_ci      modelview matrix and then transformed by the projection matrix.  Some
10305bd8deadSopenharmony_ci      implementations may perform this sequence of transformations exactly,
10315bd8deadSopenharmony_ci      but other implementations may transform vertex coordinates by the
10325bd8deadSopenharmony_ci      composite of the modelview and projection matrices (one matrix transform
10335bd8deadSopenharmony_ci      instead of two matrix transforms in sequence).  Given this
10345bd8deadSopenharmony_ci      implementation flexibility, there is no way for a vertex program author
10355bd8deadSopenharmony_ci      to exactly duplicate the precise computations used by the conventional
10365bd8deadSopenharmony_ci      OpenGL vertex transform mode.
10375bd8deadSopenharmony_ci
10385bd8deadSopenharmony_ci      The guidance to OpenGL application programs is clear.  If you are going
10395bd8deadSopenharmony_ci      to implement multi-pass rendering algorithms that require certain
10405bd8deadSopenharmony_ci      invariances between the multiple passes, choose either vertex program
10415bd8deadSopenharmony_ci      mode or the conventional OpenGL vertex transform mode for your rendering
10425bd8deadSopenharmony_ci      passes, but do not mix the two modes.
10435bd8deadSopenharmony_ci
10445bd8deadSopenharmony_ci    (64) Should there be a way to guarantee position invariance with respect
10455bd8deadSopenharmony_ci    to conventional vertex transformation?
10465bd8deadSopenharmony_ci
10475bd8deadSopenharmony_ci      RESOLVED:  Yes.  The "OPTION ARB_position_invariant" program option
10485bd8deadSopenharmony_ci      addresses this issue.  This program option will be available on all
10495bd8deadSopenharmony_ci      implementations of this extension.
10505bd8deadSopenharmony_ci
10515bd8deadSopenharmony_ci      John Carmack advocated the need for this.
10525bd8deadSopenharmony_ci
10535bd8deadSopenharmony_ci    (65) Why must RCP of 1.0 always be 1.0?
10545bd8deadSopenharmony_ci
10555bd8deadSopenharmony_ci      RESOLVED:  This is important for 3D graphics so that non-projective
10565bd8deadSopenharmony_ci      textures and orthogonal projections work as expected.  Basically when q
10575bd8deadSopenharmony_ci      or w is 1.0, things should work as expected.  Stronger requirements such
10585bd8deadSopenharmony_ci      as "RCP of -1.0 must always be -1.0" are encouraged, but there is no
10595bd8deadSopenharmony_ci      compelling reason to state such requirements explicitly as is the case
10605bd8deadSopenharmony_ci      for "RCP of 1.0 must always be 1.0".
10615bd8deadSopenharmony_ci
10625bd8deadSopenharmony_ci    (66) What happens when the source scalar value for the ARL instruction is
10635bd8deadSopenharmony_ci    an extremely large positive or negative floating-point value?  Is there a
10645bd8deadSopenharmony_ci    problem mapping the value to a constrained integer range?
10655bd8deadSopenharmony_ci
10665bd8deadSopenharmony_ci      RESOLVED:  In this extension, address registers are only useful for
10675bd8deadSopenharmony_ci      relative addressing.  The range of offsets that can be added to an
10685bd8deadSopenharmony_ci      address register is limited (-64 to +63) and the set of valid array
10695bd8deadSopenharmony_ci      indices is also limited to MAX_PROGRAM_PARAMETERS_ARB.  So, the set of
10705bd8deadSopenharmony_ci      floating-point values that needs to be handled properly is
10715bd8deadSopenharmony_ci      well-constrained.
10725bd8deadSopenharmony_ci
10735bd8deadSopenharmony_ci    (67) How do you perform a 3-component normalize in three instructions?
10745bd8deadSopenharmony_ci
10755bd8deadSopenharmony_ci      RESOLVED:  As follows.
10765bd8deadSopenharmony_ci
10775bd8deadSopenharmony_ci        DP3 result.w, vector, vector;     # result.w = nx^2+ny^2+nz^2
10785bd8deadSopenharmony_ci        RSQ result.w, result.w;           # result.w = 1/sqrt(nx^2+ny^2+nz^2)
10795bd8deadSopenharmony_ci        MUL result.xyz, result.w, vector;
10805bd8deadSopenharmony_ci
10815bd8deadSopenharmony_ci    (69) How do you compute the determinant of a 3x3 matrix in three
10825bd8deadSopenharmony_ci    instructions?
10835bd8deadSopenharmony_ci
10845bd8deadSopenharmony_ci      RESOLVED:  As follows.
10855bd8deadSopenharmony_ci
10865bd8deadSopenharmony_ci        #
10875bd8deadSopenharmony_ci        # Determinant of | vec0.x  vec0.y  vec0.z | into result.
10885bd8deadSopenharmony_ci        #                | vec1.x  vec1.y  vec1.z |
10895bd8deadSopenharmony_ci        #                | vec2.x  vec2.y  vec2.z |
10905bd8deadSopenharmony_ci        #
10915bd8deadSopenharmony_ci        MUL result, vec1.zxyw, vec2.yzxw;
10925bd8deadSopenharmony_ci        MAD result, vec1.yzxw, vec2.zxyw, -result;
10935bd8deadSopenharmony_ci        DP3 result, vec0, result;
10945bd8deadSopenharmony_ci
10955bd8deadSopenharmony_ci    (70) How do you transform a vertex position by a 4x4 matrix and then
10965bd8deadSopenharmony_ci    perform a homogeneous divide?
10975bd8deadSopenharmony_ci
10985bd8deadSopenharmony_ci      RESOLVED:  As follows.
10995bd8deadSopenharmony_ci
11005bd8deadSopenharmony_ci        ATTRIB  pos = vertex.position;
11015bd8deadSopenharmony_ci        TEMP    result, temp;
11025bd8deadSopenharmony_ci        PARAM   mat[4] = { state.matrix.modelview };
11035bd8deadSopenharmony_ci
11045bd8deadSopenharmony_ci        DP4     result.w, pos, mat[3];
11055bd8deadSopenharmony_ci        DP4     result.x, pos, mat[0];
11065bd8deadSopenharmony_ci        DP4     result.y, pos, mat[1];
11075bd8deadSopenharmony_ci        DP4     result.z, pos, mat[2];
11085bd8deadSopenharmony_ci        RCP     temp.w, result.w;
11095bd8deadSopenharmony_ci        MUL     result, result, temp.w;
11105bd8deadSopenharmony_ci
11115bd8deadSopenharmony_ci    (71) How do you perform a vector weighting of two vectors using a single
11125bd8deadSopenharmony_ci    weight?
11135bd8deadSopenharmony_ci
11145bd8deadSopenharmony_ci      RESOLVED:  As follows.
11155bd8deadSopenharmony_ci
11165bd8deadSopenharmony_ci        # result = a * vec0 + (1-a) * vec1
11175bd8deadSopenharmony_ci        #        = vec1 + a * (vec0 - vec1)
11185bd8deadSopenharmony_ci        SUB result, vec0, vec1;
11195bd8deadSopenharmony_ci        MAD result, a, result, vec1;
11205bd8deadSopenharmony_ci
11215bd8deadSopenharmony_ci    (72) How do you reduce a value to some fundamental period such as 2*PI?
11225bd8deadSopenharmony_ci
11235bd8deadSopenharmony_ci      RESOLVED:  As follows.
11245bd8deadSopenharmony_ci
11255bd8deadSopenharmony_ci        # result = 2*PI * fraction(in/(2*PI))
11265bd8deadSopenharmony_ci        # piVec = (1/(2*PI), 2*PI, 0, 0)
11275bd8deadSopenharmony_ci        PARAM piVec = { 0.159154943, 6.283185307, 0, 0 };
11285bd8deadSopenharmony_ci
11295bd8deadSopenharmony_ci        MUL result, in, piVec.x;
11305bd8deadSopenharmony_ci        EXP result, result.x;
11315bd8deadSopenharmony_ci        MUL result, result.y, piVec.y;
11325bd8deadSopenharmony_ci
11335bd8deadSopenharmony_ci    (73) How do you implement a simple ambient, specular, and diffuse infinite
11345bd8deadSopenharmony_ci    lighting computation with a single light and an eye-space normal?
11355bd8deadSopenharmony_ci
11365bd8deadSopenharmony_ci      RESOLVED:  As follows.
11375bd8deadSopenharmony_ci
11385bd8deadSopenharmony_ci        !!ARBvp1.0
11395bd8deadSopenharmony_ci        ATTRIB iPos         = vertex.position;
11405bd8deadSopenharmony_ci        ATTRIB iNormal      = vertex.normal;
11415bd8deadSopenharmony_ci        PARAM  mvinv[4]     = { state.matrix.modelview.invtrans };
11425bd8deadSopenharmony_ci        PARAM  mvp[4]       = { state.matrix.mvp };
11435bd8deadSopenharmony_ci        PARAM  lightDir     = state.light[0].position;
11445bd8deadSopenharmony_ci        PARAM  halfDir      = state.light[0].half;
11455bd8deadSopenharmony_ci        PARAM  specExp      = state.material.shininess;
11465bd8deadSopenharmony_ci        PARAM  ambientCol   = state.lightprod[0].ambient;
11475bd8deadSopenharmony_ci        PARAM  diffuseCol   = state.lightprod[0].diffuse;
11485bd8deadSopenharmony_ci        PARAM  specularCol  = state.lightprod[0].specular;
11495bd8deadSopenharmony_ci        TEMP   xfNormal, temp, dots;
11505bd8deadSopenharmony_ci        OUTPUT oPos         = result.position;
11515bd8deadSopenharmony_ci        OUTPUT oColor       = result.color;
11525bd8deadSopenharmony_ci
11535bd8deadSopenharmony_ci        # Transform the vertex to clip coordinates.   
11545bd8deadSopenharmony_ci        DP4   oPos.x, mvp[0], iPos;
11555bd8deadSopenharmony_ci        DP4   oPos.y, mvp[1], iPos;
11565bd8deadSopenharmony_ci        DP4   oPos.z, mvp[2], iPos;
11575bd8deadSopenharmony_ci        DP4   oPos.w, mvp[3], iPos;
11585bd8deadSopenharmony_ci
11595bd8deadSopenharmony_ci        # Transform the normal to eye coordinates.
11605bd8deadSopenharmony_ci        DP3   xfNormal.x, mvinv[0], iNormal;
11615bd8deadSopenharmony_ci        DP3   xfNormal.y, mvinv[1], iNormal;
11625bd8deadSopenharmony_ci        DP3   xfNormal.z, mvinv[2], iNormal;
11635bd8deadSopenharmony_ci        
11645bd8deadSopenharmony_ci        # Compute diffuse and specular dot products and use LIT to compute
11655bd8deadSopenharmony_ci        # lighting coefficients.
11665bd8deadSopenharmony_ci        DP3   dots.x, xfNormal, lightDir;
11675bd8deadSopenharmony_ci        DP3   dots.y, xfNormal, halfDir;
11685bd8deadSopenharmony_ci        MOV   dots.w, specExp.x;
11695bd8deadSopenharmony_ci        LIT   dots, dots;
11705bd8deadSopenharmony_ci
11715bd8deadSopenharmony_ci        # Accumulate color contributions.
11725bd8deadSopenharmony_ci        MAD   temp, dots.y, diffuseCol, ambientCol;
11735bd8deadSopenharmony_ci        MAD   oColor.xyz, dots.z, specularCol, temp;
11745bd8deadSopenharmony_ci        MOV   oColor.w, diffuseCol.w;
11755bd8deadSopenharmony_ci        END
11765bd8deadSopenharmony_ci
11775bd8deadSopenharmony_ci    (75) Can you perturb transformed vertex positions with a vertex program?
11785bd8deadSopenharmony_ci
11795bd8deadSopenharmony_ci       RESOLVED: Yes.  Here is an example that performs an object-space
11805bd8deadSopenharmony_ci       diffuse lighting computations and perturbs the vertex position based on
11815bd8deadSopenharmony_ci       this lighting result.  Do not take this example too seriously.
11825bd8deadSopenharmony_ci
11835bd8deadSopenharmony_ci         !!ARBvp1.0
11845bd8deadSopenharmony_ci         #
11855bd8deadSopenharmony_ci         # Program environment parameters:
11865bd8deadSopenharmony_ci         # c[0].xyz = normalized light direction in object-space
11875bd8deadSopenharmony_ci         #
11885bd8deadSopenharmony_ci         # outputs diffuse illumination for color and perturbed position
11895bd8deadSopenharmony_ci         #
11905bd8deadSopenharmony_ci         ATTRIB iPos         = vertex.position;
11915bd8deadSopenharmony_ci         ATTRIB iNormal      = vertex.normal;
11925bd8deadSopenharmony_ci         PARAM  mvp[4]       = { state.matrix.mvp };
11935bd8deadSopenharmony_ci         PARAM  lightDir     = program.env[0];
11945bd8deadSopenharmony_ci         PARAM  diffuseCol   = { 1, 1, 0, 1 };
11955bd8deadSopenharmony_ci         TEMP   temp;
11965bd8deadSopenharmony_ci         OUTPUT oPos         = result.position;
11975bd8deadSopenharmony_ci         OUTPUT oColor       = result.color;
11985bd8deadSopenharmony_ci 
11995bd8deadSopenharmony_ci         DP3   temp, lightDir, iNormal;
12005bd8deadSopenharmony_ci         MUL   oColor.xyz, temp, diffuseCol;
12015bd8deadSopenharmony_ci         MAX   temp, temp, 0;            # clamp dot product to zero
12025bd8deadSopenharmony_ci         MUL   temp, temp, iNormal;      # align in direction of normal
12035bd8deadSopenharmony_ci         MUL   temp, temp, 0.125;        # scale displacement by 1/8
12045bd8deadSopenharmony_ci         SUB   temp, temp, iPos;         # perturb
12055bd8deadSopenharmony_ci         DP4   oPos.x, mvp[0], temp;     # xform using perturbed position
12065bd8deadSopenharmony_ci         DP4   oPos.y, mvp[1], temp;
12075bd8deadSopenharmony_ci         DP4   oPos.z, mvp[2], temp;
12085bd8deadSopenharmony_ci         DP4   oPos.w, mvp[3], temp;
12095bd8deadSopenharmony_ci         END
12105bd8deadSopenharmony_ci
12115bd8deadSopenharmony_ci    (76) Should this extension provide any method for updating program
12125bd8deadSopenharmony_ci    parameters in a program itself?
12135bd8deadSopenharmony_ci
12145bd8deadSopenharmony_ci      RESOLVED:  No.  NV_vertex_program provided a special mechanism to do
12155bd8deadSopenharmony_ci      this using a "vertex state program" manually executed by calling
12165bd8deadSopenharmony_ci      ExecuteProgramNV.  This capability has not proven itself particularly
12175bd8deadSopenharmony_ci      useful to date.
12185bd8deadSopenharmony_ci
12195bd8deadSopenharmony_ci    (78) Should there be a different ProgramStringARB call for every distinct
12205bd8deadSopenharmony_ci    program target?  Arguably, 1D, 2D, and 3D textures each have their own
12215bd8deadSopenharmony_ci    TexImage command for specifying their image data.
12225bd8deadSopenharmony_ci
12235bd8deadSopenharmony_ci      RESOLVED:  No.  All program objects can/should be loaded with
12245bd8deadSopenharmony_ci      ProgramStringARB.  We expect the string to be a sufficient to express
12255bd8deadSopenharmony_ci      any kind of programmability.
12265bd8deadSopenharmony_ci
12275bd8deadSopenharmony_ci      Moreover, the 1D, 2D, and 3D TexImage commands describe the image being
12285bd8deadSopenharmony_ci      specified as opposed to the texture target being updated.  With cube map
12295bd8deadSopenharmony_ci      textures, there are six face texture targets that use the TexImage2D
12305bd8deadSopenharmony_ci      command but not with the TEXTURE_2D target.
12315bd8deadSopenharmony_ci
12325bd8deadSopenharmony_ci    (79) This extension introduces a collection of new matrices for use by
12335bd8deadSopenharmony_ci    vertex programs (and possibly other programs as well).  What should these
12345bd8deadSopenharmony_ci    matrices be called?
12355bd8deadSopenharmony_ci
12365bd8deadSopenharmony_ci      RESOLVED:  Program matrices.  These matrices are referred to as
12375bd8deadSopenharmony_ci      "tracking matrices" in NV_vertex_program, but the functionality is
12385bd8deadSopenharmony_ci      equivalent.
12395bd8deadSopenharmony_ci
12405bd8deadSopenharmony_ci    (80) With ARB_vertex_blend and EXT_vertex_weighting, there are multiple
12415bd8deadSopenharmony_ci    modelview matrices.  This extension provides a single "MVP" matrix,
12425bd8deadSopenharmony_ci    defined to be the product of modelview matrix 0 and the projection
12435bd8deadSopenharmony_ci    matrices.  Should this extension instead provide one MVP matrix per
12445bd8deadSopenharmony_ci    modelview matrix?
12455bd8deadSopenharmony_ci
12465bd8deadSopenharmony_ci      RESOLVED:  No.  Providing multiple MVP matrices allows applications to
12475bd8deadSopenharmony_ci      do N transformations into clip space and then one weighting operation,
12485bd8deadSopenharmony_ci      instead of N transformations into eye space, a weighting operation, and
12495bd8deadSopenharmony_ci      then a single transformation into clip space.  This would potentially
12505bd8deadSopenharmony_ci      save instructions, but this optimization would be of no value if the
12515bd8deadSopenharmony_ci      program did any other operations that required eye coordinates.
12525bd8deadSopenharmony_ci      
12535bd8deadSopenharmony_ci      Note also that the MVP transformations are likely general 4x4 matrix
12545bd8deadSopenharmony_ci      multiplies (4 DP4 instructions per transform).  On the other hand,
12555bd8deadSopenharmony_ci      object and eye coordinates are often 3D coordinates with a constant W of
12565bd8deadSopenharmony_ci      1.0.  So each transformation to eye coordinates may require only 3 DP4
12575bd8deadSopenharmony_ci      instructions, in which case the comparison may be 4N instructions (clip
12585bd8deadSopenharmony_ci      weighting) vs. 3N+4 (eye weighting).
12595bd8deadSopenharmony_ci
12605bd8deadSopenharmony_ci    (81) Should variable declarations be allowed to be anywhere within the
12615bd8deadSopenharmony_ci    program body, or should they instead be required to be done at the
12625bd8deadSopenharmony_ci    beginning of the program?  Should the possibility of branching in a future
12635bd8deadSopenharmony_ci    standard affect this resolution?
12645bd8deadSopenharmony_ci
12655bd8deadSopenharmony_ci      RESOLVED:  Declarations will be allowed anywhere in the program text;
12665bd8deadSopenharmony_ci      the only ordering requirement is that the declaration of a variable must
12675bd8deadSopenharmony_ci      precede its use in the program text.  Requiring up-front variable
12685bd8deadSopenharmony_ci      declarations may require multiple passes for applications that build
12695bd8deadSopenharmony_ci      programs on the fly.
12705bd8deadSopenharmony_ci
12715bd8deadSopenharmony_ci      While declarations can appear anywhere in the program body, they are not
12725bd8deadSopenharmony_ci      executable statements.  Any corresponding bindings (including constant
12735bd8deadSopenharmony_ci      initializations) are resolved before the program executes.  The bindings
12745bd8deadSopenharmony_ci      will be resolved even if a program were to "branch around" a
12755bd8deadSopenharmony_ci      declaration.
12765bd8deadSopenharmony_ci
12775bd8deadSopenharmony_ci    (82) Should address register variables be treated as vectors?  If so,
12785bd8deadSopenharmony_ci    should a variable number of components (up to four) be supported by this
12795bd8deadSopenharmony_ci    extension?
12805bd8deadSopenharmony_ci
12815bd8deadSopenharmony_ci      RESOLVED:  In the future, four-component address vectors may be
12825bd8deadSopenharmony_ci      supported, and vector notation is used for forward compatibility.  Using
12835bd8deadSopenharmony_ci      this notation makes address registers consistent with all the other
12845bd8deadSopenharmony_ci      vector data types in this extension.  However, support for more than one
12855bd8deadSopenharmony_ci      usable component will be left for future extensions, but could be added
12865bd8deadSopenharmony_ci      via a program option or in a new language revision (e.g., !!ARBvp2.0).
12875bd8deadSopenharmony_ci
12885bd8deadSopenharmony_ci    (83) Should program local parameters be logically connected to the program
12895bd8deadSopenharmony_ci    string or the program object?
12905bd8deadSopenharmony_ci
12915bd8deadSopenharmony_ci      RESOLVED:  Program local parameters are properties of a program object.
12925bd8deadSopenharmony_ci      Their values persist even after a new program is loaded into the object.
12935bd8deadSopenharmony_ci      This model does allow applications to recompile the program in a given
12945bd8deadSopenharmony_ci      object based on certain rendering settings without having to
12955bd8deadSopenharmony_ci      re-initialize any state stored in the object.
12965bd8deadSopenharmony_ci
12975bd8deadSopenharmony_ci    (84) Should this extension provide a method to specify "anonymous" program
12985bd8deadSopenharmony_ci    local parameters and query an index into the program parameter array.
12995bd8deadSopenharmony_ci
13005bd8deadSopenharmony_ci      RESOLVED:  No.  It would be nice to declare a variable in a program such
13015bd8deadSopenharmony_ci      as
13025bd8deadSopenharmony_ci
13035bd8deadSopenharmony_ci        PARAM foo = program.local;  # note no index in the array
13045bd8deadSopenharmony_ci
13055bd8deadSopenharmony_ci      after which an application could query the location of "foo" in the
13065bd8deadSopenharmony_ci      program local parameter array.  However, given that local parameters
13075bd8deadSopenharmony_ci      persist even across program loads, it would be difficult to specify what
13085bd8deadSopenharmony_ci      program local parameter "foo" would be assigned to.
13095bd8deadSopenharmony_ci
13105bd8deadSopenharmony_ci    (85) EXT_vertex_weighting provides a single vertex blend weight.
13115bd8deadSopenharmony_ci    ARB_vertex_blend generalizes this concept to a weight vector.  Both pieces
13125bd8deadSopenharmony_ci    of state are specified separately, and could be thought of as distinct.
13135bd8deadSopenharmony_ci    Should distinct bindings be provided in this extension?
13145bd8deadSopenharmony_ci
13155bd8deadSopenharmony_ci      RESOLVED:  No.  No current implementation supports both extensions, but
13165bd8deadSopenharmony_ci      the vendors involved in this standardization process agree that the
13175bd8deadSopenharmony_ci      state should not be considered distinct.  If an implementation supported
13185bd8deadSopenharmony_ci      both extensions, the APIs would modify the same state.
13195bd8deadSopenharmony_ci
13205bd8deadSopenharmony_ci    (86) Should this extension provide functionality for variable aliasing?
13215bd8deadSopenharmony_ci    If so, how should it be specified and what types of variables can be
13225bd8deadSopenharmony_ci    aliasesed?
13235bd8deadSopenharmony_ci
13245bd8deadSopenharmony_ci      RESOLVED:  Yes, for all variable types.  The syntax is a simple text
13255bd8deadSopenharmony_ci      replacement:
13265bd8deadSopenharmony_ci
13275bd8deadSopenharmony_ci        ALIAS a = b;
13285bd8deadSopenharmony_ci
13295bd8deadSopenharmony_ci      This functionality allows applications to "share" variables, and thereby
13305bd8deadSopenharmony_ci      exceed implementation-dependent limits on the number of variable
13315bd8deadSopenharmony_ci      declarations.  This may be particularly significant for temporaries,
13325bd8deadSopenharmony_ci      where the limit on the number of variables may be fairly low.
13335bd8deadSopenharmony_ci
13345bd8deadSopenharmony_ci    (87) How do you determine whether a given program option is supported by
13355bd8deadSopenharmony_ci    the GL implementation?
13365bd8deadSopenharmony_ci
13375bd8deadSopenharmony_ci      RESOLVED:  Program options may be introduced in OpenGL extensions and
13385bd8deadSopenharmony_ci      may be added to future OpenGL specifications.  An option will be
13395bd8deadSopenharmony_ci      supported if and only if (1) the corresponding OpenGL extension appears
13405bd8deadSopenharmony_ci      in the implementation-dependent EXTENSIONS string or (2) the option is
13415bd8deadSopenharmony_ci      documented in the OpenGL specification version corresponding to the
13425bd8deadSopenharmony_ci      implementation's VERSION string.
13435bd8deadSopenharmony_ci
13445bd8deadSopenharmony_ci      The ARB_position_invariant option is provided by this extension, and
13455bd8deadSopenharmony_ci      will always be available (provided this extension is supported).
13465bd8deadSopenharmony_ci
13475bd8deadSopenharmony_ci    (88) What's the deal with binding the alpha component of light colors, fog
13485bd8deadSopenharmony_ci    colors, and material colors (other than diffuse)?  They don't do anything,
13495bd8deadSopenharmony_ci    right?
13505bd8deadSopenharmony_ci
13515bd8deadSopenharmony_ci      RESOLVED:  The GL state for these different colors includes alpha
13525bd8deadSopenharmony_ci      components, which will be returned by queries.  However, in the
13535bd8deadSopenharmony_ci      conventional OpenGL pipeline, most of these alpha components are
13545bd8deadSopenharmony_ci      effectively ignored.  However, since they are present in the GL state,
13555bd8deadSopenharmony_ci      they will be exposed in bindings.  What is done with these alpha values
13565bd8deadSopenharmony_ci      in program mode is completely up to the vertex program.
13575bd8deadSopenharmony_ci
13585bd8deadSopenharmony_ci      Vertex programs need to be careful to ensure that the alpha component is
13595bd8deadSopenharmony_ci      computed correctly when evaluating lighting equations.  When
13605bd8deadSopenharmony_ci      accumulating light contributions, it may be necessary to use write masks
13615bd8deadSopenharmony_ci      to disable writes to the alpha component.
13625bd8deadSopenharmony_ci
13635bd8deadSopenharmony_ci    (89) The LOG instruction takes the logarithm of the absolute value of its
13645bd8deadSopenharmony_ci    operand while the LG2 instruction takes the logarithm of the operand
13655bd8deadSopenharmony_ci    itself.  In LG2, the logarithm of negative numbers is undefined.
13665bd8deadSopenharmony_ci
13675bd8deadSopenharmony_ci      RESOLVED:  The LOG instruction is present for (1) compatibility with
13685bd8deadSopenharmony_ci      NV_vertex_program and DirectX 8 languages and (2) because it may
13695bd8deadSopenharmony_ci      outperform LG2 on some platforms.  For compatibility, it is defined to
13705bd8deadSopenharmony_ci      behave identically to existing languages.
13715bd8deadSopenharmony_ci
13725bd8deadSopenharmony_ci    (90) With vertex programs, fog coordinates and point sizes can be computed
13735bd8deadSopenharmony_ci    on a per-vertex basis.  How are the fog coordinates and point sizes
13745bd8deadSopenharmony_ci    associated with vertices introduced by clipping computed?
13755bd8deadSopenharmony_ci
13765bd8deadSopenharmony_ci      RESOLVED:  Fog coordinates and point sizes for clipped vertices are
13775bd8deadSopenharmony_ci      computed by interpolating the computed values at the original vertices
13785bd8deadSopenharmony_ci      in exactly the same manner as colors and texture coordinates are
13795bd8deadSopenharmony_ci      interpolated in section 2.13.8 of the OpenGL 1.3 specification.
13805bd8deadSopenharmony_ci
13815bd8deadSopenharmony_ci    (91) Vertex programs support only RGBA colors, but do not support color
13825bd8deadSopenharmony_ci    index inputs or results.  What happens if an application uses vertex
13835bd8deadSopenharmony_ci    programs in color index mode.
13845bd8deadSopenharmony_ci
13855bd8deadSopenharmony_ci      RESOLVED:  The results of vertex program execution are undefined if the
13865bd8deadSopenharmony_ci      GL is in color index mode.
13875bd8deadSopenharmony_ci
13885bd8deadSopenharmony_ci    (92) Should automatic normalization of evaluated normals (AUTO_NORMAL) be
13895bd8deadSopenharmony_ci    supported when the GL is in vertex program mode?
13905bd8deadSopenharmony_ci
13915bd8deadSopenharmony_ci      RESOLVED:  Automatic normalization of normals will be disabled in vertex
13925bd8deadSopenharmony_ci      program mode.  The current vertex program can easily normalize the
13935bd8deadSopenharmony_ci      normal if required.  This can lead to greater efficiency if the vertex
13945bd8deadSopenharmony_ci      program transforms the normal to another coordinate system such as
13955bd8deadSopenharmony_ci      eye-space with a transform that preserves vector length.  Then a single
13965bd8deadSopenharmony_ci      normalize after transform is more efficient than normalizing after
13975bd8deadSopenharmony_ci      evaluation and normalizing again after transform.  Conceptually, the
13985bd8deadSopenharmony_ci      normalize mandated for AUTO_NORMAL in section 5.1 is just one of the
13995bd8deadSopenharmony_ci      many transformation operations subsumed by vertex programs.
14005bd8deadSopenharmony_ci
14015bd8deadSopenharmony_ci    (93) This extension allows applications to name their own variables.  What
14025bd8deadSopenharmony_ci    keywords should be reserved?
14035bd8deadSopenharmony_ci
14045bd8deadSopenharmony_ci      RESOLVED:  Instruction names and declaration keywords (e.g., PARAM) will
14055bd8deadSopenharmony_ci      be reserved.  Additionally, since attribute, parameter, and result
14065bd8deadSopenharmony_ci      bindings are allowed in the program text, the binding prefix keywords
14075bd8deadSopenharmony_ci      "vertex", "state", "program", and "result" are reserved to simplify
14085bd8deadSopenharmony_ci      parsing.  This prevents the need to distinguish between
14095bd8deadSopenharmony_ci      "vertex.position" ("vertex" as a binding) and "vertex.xyzw" ("vertex" as
14105bd8deadSopenharmony_ci      a variable).
14115bd8deadSopenharmony_ci
14125bd8deadSopenharmony_ci    (94) When counting the number of program parameter bindings, multiple
14135bd8deadSopenharmony_ci    constant vectors with the same components are counted only once.  How is
14145bd8deadSopenharmony_ci    this determined?
14155bd8deadSopenharmony_ci
14165bd8deadSopenharmony_ci      RESOLVED:  The implementation does a numerical comparison after the
14175bd8deadSopenharmony_ci      specified constants are converted to an internal floating-point
14185bd8deadSopenharmony_ci      representation.  Due to floating-point representation limits, such
14195bd8deadSopenharmony_ci      conversions are not always precise.  Constants specified with different
14205bd8deadSopenharmony_ci      text that are "equivalent" (e.g., "12" and "1.2E+01") are not guaranteed
14215bd8deadSopenharmony_ci      to resolve to the same value.  Additionally, constants that are not
14225bd8deadSopenharmony_ci      "equivalent" but have only small relative differences (e.g., "200000000"
14235bd8deadSopenharmony_ci      and "200000001") may end up resolving to the same value.  Constants
14245bd8deadSopenharmony_ci      specified with the same text should always be identical.
14255bd8deadSopenharmony_ci
14265bd8deadSopenharmony_ci    (95) What characters are allowed in identifier names?
14275bd8deadSopenharmony_ci
14285bd8deadSopenharmony_ci      RESOLVED:  Letters ("A"-"Z", "a"-"z"), numbers ("0"-"9"), underscores
14295bd8deadSopenharmony_ci      ("_"), and dollar signs ("$").
14305bd8deadSopenharmony_ci
14315bd8deadSopenharmony_ci    (96) How should future programmability extensions interact with this one?
14325bd8deadSopenharmony_ci
14335bd8deadSopenharmony_ci      RESOLVED:  Future programmability extensions are expected to fall in one
14345bd8deadSopenharmony_ci      of two classes:  (1) extensions that bring programmability to new
14355bd8deadSopenharmony_ci      sections and (2) extensions the extend existing programmability models.
14365bd8deadSopenharmony_ci      The former class should introduce a new program target; the latter class
14375bd8deadSopenharmony_ci      would extend the functionality of an existing target.
14385bd8deadSopenharmony_ci
14395bd8deadSopenharmony_ci      Recommendations for extensions introducing new program targets include:
14405bd8deadSopenharmony_ci
14415bd8deadSopenharmony_ci        * Re-use and reference the functionality specified in this extension
14425bd8deadSopenharmony_ci          (or in a future OpenGL specification incorporating this extension)
14435bd8deadSopenharmony_ci          as much as possible, to maintain a consistent model.
14445bd8deadSopenharmony_ci
14455bd8deadSopenharmony_ci        * Provide a program header allowing for easy identification and
14465bd8deadSopenharmony_ci          versioning of programs for the new target.
14475bd8deadSopenharmony_ci
14485bd8deadSopenharmony_ci      Recommendations for extensions modifying existing program targets
14495bd8deadSopenharmony_ci      include:
14505bd8deadSopenharmony_ci
14515bd8deadSopenharmony_ci        * The option mechanism (section 2.14.4.5) should be used to provide
14525bd8deadSopenharmony_ci          minor modifications to the program language.
14535bd8deadSopenharmony_ci
14545bd8deadSopenharmony_ci        * The program header/version string (section 2.14.2) should be used to
14555bd8deadSopenharmony_ci          provide major modifications to the language, or potentially to
14565bd8deadSopenharmony_ci          provide a commonly used collection of options.  Program header
14575bd8deadSopenharmony_ci          string changes should be multi-vendor extensions as much as
14585bd8deadSopenharmony_ci          possible.
14595bd8deadSopenharmony_ci
14605bd8deadSopenharmony_ci        * For portability, programs should not be allowed to use extended
14615bd8deadSopenharmony_ci          language features without specifying the corresponding program
14625bd8deadSopenharmony_ci          options or program header.
14635bd8deadSopenharmony_ci
14645bd8deadSopenharmony_ci
14655bd8deadSopenharmony_ciNew Procedures and Functions
14665bd8deadSopenharmony_ci
14675bd8deadSopenharmony_ci    void VertexAttrib1sARB(uint index, short x);
14685bd8deadSopenharmony_ci    void VertexAttrib1fARB(uint index, float x);
14695bd8deadSopenharmony_ci    void VertexAttrib1dARB(uint index, double x);
14705bd8deadSopenharmony_ci    void VertexAttrib2sARB(uint index, short x, short y);
14715bd8deadSopenharmony_ci    void VertexAttrib2fARB(uint index, float x, float y);
14725bd8deadSopenharmony_ci    void VertexAttrib2dARB(uint index, double x, double y);
14735bd8deadSopenharmony_ci    void VertexAttrib3sARB(uint index, short x, short y, short z);
14745bd8deadSopenharmony_ci    void VertexAttrib3fARB(uint index, float x, float y, float z);
14755bd8deadSopenharmony_ci    void VertexAttrib3dARB(uint index, double x, double y, double z);
14765bd8deadSopenharmony_ci    void VertexAttrib4sARB(uint index, short x, short y, short z, short w);
14775bd8deadSopenharmony_ci    void VertexAttrib4fARB(uint index, float x, float y, float z, float w);
14785bd8deadSopenharmony_ci    void VertexAttrib4dARB(uint index, double x, double y, double z, double w);
14795bd8deadSopenharmony_ci    void VertexAttrib4NubARB(uint index, ubyte x, ubyte y, ubyte z, ubyte w);
14805bd8deadSopenharmony_ci
14815bd8deadSopenharmony_ci    void VertexAttrib1svARB(uint index, const short *v);
14825bd8deadSopenharmony_ci    void VertexAttrib1fvARB(uint index, const float *v);
14835bd8deadSopenharmony_ci    void VertexAttrib1dvARB(uint index, const double *v);
14845bd8deadSopenharmony_ci    void VertexAttrib2svARB(uint index, const short *v);
14855bd8deadSopenharmony_ci    void VertexAttrib2fvARB(uint index, const float *v);
14865bd8deadSopenharmony_ci    void VertexAttrib2dvARB(uint index, const double *v);
14875bd8deadSopenharmony_ci    void VertexAttrib3svARB(uint index, const short *v);
14885bd8deadSopenharmony_ci    void VertexAttrib3fvARB(uint index, const float *v);
14895bd8deadSopenharmony_ci    void VertexAttrib3dvARB(uint index, const double *v);
14905bd8deadSopenharmony_ci    void VertexAttrib4bvARB(uint index, const byte *v);
14915bd8deadSopenharmony_ci    void VertexAttrib4svARB(uint index, const short *v);
14925bd8deadSopenharmony_ci    void VertexAttrib4ivARB(uint index, const int *v);
14935bd8deadSopenharmony_ci    void VertexAttrib4ubvARB(uint index, const ubyte *v);
14945bd8deadSopenharmony_ci    void VertexAttrib4usvARB(uint index, const ushort *v);
14955bd8deadSopenharmony_ci    void VertexAttrib4uivARB(uint index, const uint *v);
14965bd8deadSopenharmony_ci    void VertexAttrib4fvARB(uint index, const float *v);
14975bd8deadSopenharmony_ci    void VertexAttrib4dvARB(uint index, const double *v);
14985bd8deadSopenharmony_ci    void VertexAttrib4NbvARB(uint index, const byte *v);
14995bd8deadSopenharmony_ci    void VertexAttrib4NsvARB(uint index, const short *v);
15005bd8deadSopenharmony_ci    void VertexAttrib4NivARB(uint index, const int *v);
15015bd8deadSopenharmony_ci    void VertexAttrib4NubvARB(uint index, const ubyte *v);
15025bd8deadSopenharmony_ci    void VertexAttrib4NusvARB(uint index, const ushort *v);
15035bd8deadSopenharmony_ci    void VertexAttrib4NuivARB(uint index, const uint *v);
15045bd8deadSopenharmony_ci
15055bd8deadSopenharmony_ci    void VertexAttribPointerARB(uint index, int size, enum type, 
15065bd8deadSopenharmony_ci                                boolean normalized, sizei stride,
15075bd8deadSopenharmony_ci                                const void *pointer);
15085bd8deadSopenharmony_ci
15095bd8deadSopenharmony_ci    void EnableVertexAttribArrayARB(uint index);
15105bd8deadSopenharmony_ci    void DisableVertexAttribArrayARB(uint index);
15115bd8deadSopenharmony_ci
15125bd8deadSopenharmony_ci    void ProgramStringARB(enum target, enum format, sizei len, 
15135bd8deadSopenharmony_ci                          const void *string); 
15145bd8deadSopenharmony_ci
15155bd8deadSopenharmony_ci    void BindProgramARB(enum target, uint program);
15165bd8deadSopenharmony_ci
15175bd8deadSopenharmony_ci    void DeleteProgramsARB(sizei n, const uint *programs);
15185bd8deadSopenharmony_ci
15195bd8deadSopenharmony_ci    void GenProgramsARB(sizei n, uint *programs);
15205bd8deadSopenharmony_ci
15215bd8deadSopenharmony_ci    void ProgramEnvParameter4dARB(enum target, uint index,
15225bd8deadSopenharmony_ci                                  double x, double y, double z, double w);
15235bd8deadSopenharmony_ci    void ProgramEnvParameter4dvARB(enum target, uint index,
15245bd8deadSopenharmony_ci                                   const double *params);
15255bd8deadSopenharmony_ci    void ProgramEnvParameter4fARB(enum target, uint index,
15265bd8deadSopenharmony_ci                                  float x, float y, float z, float w);
15275bd8deadSopenharmony_ci    void ProgramEnvParameter4fvARB(enum target, uint index,
15285bd8deadSopenharmony_ci                                   const float *params);
15295bd8deadSopenharmony_ci
15305bd8deadSopenharmony_ci    void ProgramLocalParameter4dARB(enum target, uint index,
15315bd8deadSopenharmony_ci                                    double x, double y, double z, double w);
15325bd8deadSopenharmony_ci    void ProgramLocalParameter4dvARB(enum target, uint index,
15335bd8deadSopenharmony_ci                                     const double *params);
15345bd8deadSopenharmony_ci    void ProgramLocalParameter4fARB(enum target, uint index,
15355bd8deadSopenharmony_ci                                    float x, float y, float z, float w);
15365bd8deadSopenharmony_ci    void ProgramLocalParameter4fvARB(enum target, uint index,
15375bd8deadSopenharmony_ci                                     const float *params);
15385bd8deadSopenharmony_ci
15395bd8deadSopenharmony_ci    void GetProgramEnvParameterdvARB(enum target, uint index,
15405bd8deadSopenharmony_ci                                     double *params);
15415bd8deadSopenharmony_ci    void GetProgramEnvParameterfvARB(enum target, uint index, 
15425bd8deadSopenharmony_ci                                     float *params);
15435bd8deadSopenharmony_ci
15445bd8deadSopenharmony_ci    void GetProgramLocalParameterdvARB(enum target, uint index,
15455bd8deadSopenharmony_ci                                       double *params);
15465bd8deadSopenharmony_ci    void GetProgramLocalParameterfvARB(enum target, uint index, 
15475bd8deadSopenharmony_ci                                       float *params);
15485bd8deadSopenharmony_ci
15495bd8deadSopenharmony_ci    void GetProgramivARB(enum target, enum pname, int *params);
15505bd8deadSopenharmony_ci
15515bd8deadSopenharmony_ci    void GetProgramStringARB(enum target, enum pname, void *string);
15525bd8deadSopenharmony_ci
15535bd8deadSopenharmony_ci    void GetVertexAttribdvARB(uint index, enum pname, double *params);
15545bd8deadSopenharmony_ci    void GetVertexAttribfvARB(uint index, enum pname, float *params);
15555bd8deadSopenharmony_ci    void GetVertexAttribivARB(uint index, enum pname, int *params);
15565bd8deadSopenharmony_ci
15575bd8deadSopenharmony_ci    void GetVertexAttribPointervARB(uint index, enum pname, void **pointer);
15585bd8deadSopenharmony_ci
15595bd8deadSopenharmony_ci    boolean IsProgramARB(uint program);
15605bd8deadSopenharmony_ci
15615bd8deadSopenharmony_ci
15625bd8deadSopenharmony_ciNew Tokens
15635bd8deadSopenharmony_ci
15645bd8deadSopenharmony_ci    Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the
15655bd8deadSopenharmony_ci    <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev,
15665bd8deadSopenharmony_ci    and by the <target> parameter of ProgramStringARB, BindProgramARB,
15675bd8deadSopenharmony_ci    ProgramEnvParameter4[df][v]ARB, ProgramLocalParameter4[df][v]ARB,
15685bd8deadSopenharmony_ci    GetProgramEnvParameter[df]vARB, GetProgramLocalParameter[df]vARB,
15695bd8deadSopenharmony_ci    GetProgramivARB, and GetProgramStringARB.
15705bd8deadSopenharmony_ci
15715bd8deadSopenharmony_ci        VERTEX_PROGRAM_ARB                              0x8620
15725bd8deadSopenharmony_ci
15735bd8deadSopenharmony_ci    Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, and by
15745bd8deadSopenharmony_ci    the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and
15755bd8deadSopenharmony_ci    GetDoublev:
15765bd8deadSopenharmony_ci
15775bd8deadSopenharmony_ci        VERTEX_PROGRAM_POINT_SIZE_ARB                   0x8642
15785bd8deadSopenharmony_ci        VERTEX_PROGRAM_TWO_SIDE_ARB                     0x8643
15795bd8deadSopenharmony_ci        COLOR_SUM_ARB                                   0x8458
15805bd8deadSopenharmony_ci
15815bd8deadSopenharmony_ci    Accepted by the <format> parameter of ProgramStringARB:
15825bd8deadSopenharmony_ci
15835bd8deadSopenharmony_ci        PROGRAM_FORMAT_ASCII_ARB                        0x8875
15845bd8deadSopenharmony_ci
15855bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetVertexAttrib[dfi]vARB:
15865bd8deadSopenharmony_ci
15875bd8deadSopenharmony_ci        VERTEX_ATTRIB_ARRAY_ENABLED_ARB                 0x8622
15885bd8deadSopenharmony_ci        VERTEX_ATTRIB_ARRAY_SIZE_ARB                    0x8623
15895bd8deadSopenharmony_ci        VERTEX_ATTRIB_ARRAY_STRIDE_ARB                  0x8624
15905bd8deadSopenharmony_ci        VERTEX_ATTRIB_ARRAY_TYPE_ARB                    0x8625
15915bd8deadSopenharmony_ci        VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB              0x886A
15925bd8deadSopenharmony_ci        CURRENT_VERTEX_ATTRIB_ARB                       0x8626
15935bd8deadSopenharmony_ci
15945bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetVertexAttribPointervARB:
15955bd8deadSopenharmony_ci
15965bd8deadSopenharmony_ci        VERTEX_ATTRIB_ARRAY_POINTER_ARB                 0x8645
15975bd8deadSopenharmony_ci
15985bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetProgramivARB:
15995bd8deadSopenharmony_ci
16005bd8deadSopenharmony_ci        PROGRAM_LENGTH_ARB                              0x8627
16015bd8deadSopenharmony_ci        PROGRAM_FORMAT_ARB                              0x8876
16025bd8deadSopenharmony_ci        PROGRAM_BINDING_ARB                             0x8677
16035bd8deadSopenharmony_ci        PROGRAM_INSTRUCTIONS_ARB                        0x88A0
16045bd8deadSopenharmony_ci        MAX_PROGRAM_INSTRUCTIONS_ARB                    0x88A1
16055bd8deadSopenharmony_ci        PROGRAM_NATIVE_INSTRUCTIONS_ARB                 0x88A2
16065bd8deadSopenharmony_ci        MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB             0x88A3
16075bd8deadSopenharmony_ci        PROGRAM_TEMPORARIES_ARB                         0x88A4
16085bd8deadSopenharmony_ci        MAX_PROGRAM_TEMPORARIES_ARB                     0x88A5
16095bd8deadSopenharmony_ci        PROGRAM_NATIVE_TEMPORARIES_ARB                  0x88A6
16105bd8deadSopenharmony_ci        MAX_PROGRAM_NATIVE_TEMPORARIES_ARB              0x88A7
16115bd8deadSopenharmony_ci        PROGRAM_PARAMETERS_ARB                          0x88A8
16125bd8deadSopenharmony_ci        MAX_PROGRAM_PARAMETERS_ARB                      0x88A9
16135bd8deadSopenharmony_ci        PROGRAM_NATIVE_PARAMETERS_ARB                   0x88AA
16145bd8deadSopenharmony_ci        MAX_PROGRAM_NATIVE_PARAMETERS_ARB               0x88AB
16155bd8deadSopenharmony_ci        PROGRAM_ATTRIBS_ARB                             0x88AC
16165bd8deadSopenharmony_ci        MAX_PROGRAM_ATTRIBS_ARB                         0x88AD
16175bd8deadSopenharmony_ci        PROGRAM_NATIVE_ATTRIBS_ARB                      0x88AE
16185bd8deadSopenharmony_ci        MAX_PROGRAM_NATIVE_ATTRIBS_ARB                  0x88AF
16195bd8deadSopenharmony_ci        PROGRAM_ADDRESS_REGISTERS_ARB                   0x88B0
16205bd8deadSopenharmony_ci        MAX_PROGRAM_ADDRESS_REGISTERS_ARB               0x88B1
16215bd8deadSopenharmony_ci        PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB            0x88B2
16225bd8deadSopenharmony_ci        MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB        0x88B3
16235bd8deadSopenharmony_ci        MAX_PROGRAM_LOCAL_PARAMETERS_ARB                0x88B4
16245bd8deadSopenharmony_ci        MAX_PROGRAM_ENV_PARAMETERS_ARB                  0x88B5
16255bd8deadSopenharmony_ci        PROGRAM_UNDER_NATIVE_LIMITS_ARB                 0x88B6
16265bd8deadSopenharmony_ci
16275bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetProgramStringARB:
16285bd8deadSopenharmony_ci
16295bd8deadSopenharmony_ci        PROGRAM_STRING_ARB                              0x8628
16305bd8deadSopenharmony_ci
16315bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
16325bd8deadSopenharmony_ci    GetFloatv, and GetDoublev:
16335bd8deadSopenharmony_ci
16345bd8deadSopenharmony_ci        PROGRAM_ERROR_POSITION_ARB                      0x864B
16355bd8deadSopenharmony_ci        CURRENT_MATRIX_ARB                              0x8641
16365bd8deadSopenharmony_ci        TRANSPOSE_CURRENT_MATRIX_ARB                    0x88B7
16375bd8deadSopenharmony_ci        CURRENT_MATRIX_STACK_DEPTH_ARB                  0x8640
16385bd8deadSopenharmony_ci        MAX_VERTEX_ATTRIBS_ARB                          0x8869
16395bd8deadSopenharmony_ci        MAX_PROGRAM_MATRICES_ARB                        0x862F
16405bd8deadSopenharmony_ci        MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB              0x862E
16415bd8deadSopenharmony_ci
16425bd8deadSopenharmony_ci    Accepted by the <name> parameter of GetString:
16435bd8deadSopenharmony_ci
16445bd8deadSopenharmony_ci        PROGRAM_ERROR_STRING_ARB                        0x8874
16455bd8deadSopenharmony_ci
16465bd8deadSopenharmony_ci    Accepted by the <mode> parameter of MatrixMode:
16475bd8deadSopenharmony_ci    
16485bd8deadSopenharmony_ci        MATRIX0_ARB                                     0x88C0
16495bd8deadSopenharmony_ci        MATRIX1_ARB                                     0x88C1
16505bd8deadSopenharmony_ci        MATRIX2_ARB                                     0x88C2
16515bd8deadSopenharmony_ci        MATRIX3_ARB                                     0x88C3
16525bd8deadSopenharmony_ci        MATRIX4_ARB                                     0x88C4
16535bd8deadSopenharmony_ci        MATRIX5_ARB                                     0x88C5
16545bd8deadSopenharmony_ci        MATRIX6_ARB                                     0x88C6
16555bd8deadSopenharmony_ci        MATRIX7_ARB                                     0x88C7
16565bd8deadSopenharmony_ci        MATRIX8_ARB                                     0x88C8
16575bd8deadSopenharmony_ci        MATRIX9_ARB                                     0x88C9
16585bd8deadSopenharmony_ci        MATRIX10_ARB                                    0x88CA
16595bd8deadSopenharmony_ci        MATRIX11_ARB                                    0x88CB
16605bd8deadSopenharmony_ci        MATRIX12_ARB                                    0x88CC
16615bd8deadSopenharmony_ci        MATRIX13_ARB                                    0x88CD
16625bd8deadSopenharmony_ci        MATRIX14_ARB                                    0x88CE
16635bd8deadSopenharmony_ci        MATRIX15_ARB                                    0x88CF
16645bd8deadSopenharmony_ci        MATRIX16_ARB                                    0x88D0
16655bd8deadSopenharmony_ci        MATRIX17_ARB                                    0x88D1
16665bd8deadSopenharmony_ci        MATRIX18_ARB                                    0x88D2
16675bd8deadSopenharmony_ci        MATRIX19_ARB                                    0x88D3
16685bd8deadSopenharmony_ci        MATRIX20_ARB                                    0x88D4
16695bd8deadSopenharmony_ci        MATRIX21_ARB                                    0x88D5
16705bd8deadSopenharmony_ci        MATRIX22_ARB                                    0x88D6
16715bd8deadSopenharmony_ci        MATRIX23_ARB                                    0x88D7
16725bd8deadSopenharmony_ci        MATRIX24_ARB                                    0x88D8
16735bd8deadSopenharmony_ci        MATRIX25_ARB                                    0x88D9
16745bd8deadSopenharmony_ci        MATRIX26_ARB                                    0x88DA
16755bd8deadSopenharmony_ci        MATRIX27_ARB                                    0x88DB
16765bd8deadSopenharmony_ci        MATRIX28_ARB                                    0x88DC
16775bd8deadSopenharmony_ci        MATRIX29_ARB                                    0x88DD
16785bd8deadSopenharmony_ci        MATRIX30_ARB                                    0x88DE
16795bd8deadSopenharmony_ci        MATRIX31_ARB                                    0x88DF
16805bd8deadSopenharmony_ci
16815bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 1.3 Specification (OpenGL Operation)
16825bd8deadSopenharmony_ci
16835bd8deadSopenharmony_ci    Modify Section 2.6, Begin/End Paradigm (p. 12)
16845bd8deadSopenharmony_ci
16855bd8deadSopenharmony_ci    (modify last paragraph, p. 12) ... In addition, a current normal, a
16865bd8deadSopenharmony_ci    current color, multiple current texture coordinate sets, and multiple
16875bd8deadSopenharmony_ci    generic vertex attributes may be used in processing each vertex.  Normals
16885bd8deadSopenharmony_ci    are used by the GL in lighting calculations; the current normal is a
16895bd8deadSopenharmony_ci    three-dimensional vector that may be set by sending three coordinates that
16905bd8deadSopenharmony_ci    specify it.  Texture coordinates determine how a texture image is mapped
16915bd8deadSopenharmony_ci    onto a primitive.  Multiple sets of texture coordinates may be used to
16925bd8deadSopenharmony_ci    specify how multiple texture images are mapped onto a primitive.  Generic
16935bd8deadSopenharmony_ci    vertex attributes do not have any specific function but can be used in
16945bd8deadSopenharmony_ci    vertex program mode (section 2.14) to compute final values for any data
16955bd8deadSopenharmony_ci    associated with a vertex.
16965bd8deadSopenharmony_ci
16975bd8deadSopenharmony_ci
16985bd8deadSopenharmony_ci    Modify Section 2.6.3, GL Commands within Begin/End (p. 19)
16995bd8deadSopenharmony_ci
17005bd8deadSopenharmony_ci    (modify first paragraph of section, p. 19) The only GL commands that are
17015bd8deadSopenharmony_ci    allowed within any Begin/End pairs are the commands for specifying vertex
17025bd8deadSopenharmony_ci    coordinates, vertex color, normal coordinates, texture coordinates, and
17035bd8deadSopenharmony_ci    generic vertex attributes (Vertex, Color, Index, Normal, TexCoord,
17045bd8deadSopenharmony_ci    VertexAttrib*ARB), ...
17055bd8deadSopenharmony_ci
17065bd8deadSopenharmony_ci
17075bd8deadSopenharmony_ci    Modify Section 2.7, Vertex Specification (p. 19)
17085bd8deadSopenharmony_ci
17095bd8deadSopenharmony_ci    (remove the "Finally" from the next-to-last paragraph, p. 20) There are
17105bd8deadSopenharmony_ci    several ways to set the current color. The GL stores both a current
17115bd8deadSopenharmony_ci    single-valued color index, and a current four-valued RGBA color. One
17125bd8deadSopenharmony_ci
17135bd8deadSopenharmony_ci    (add new paragraph before last paragraph of section, p. 21) Vertex
17145bd8deadSopenharmony_ci    programs (section 2.14) can access an array of four-component generic
17155bd8deadSopenharmony_ci    current vertex attributes.  The first entry of this array is numbered
17165bd8deadSopenharmony_ci    zero, and the number of entries in the array is given by the
17175bd8deadSopenharmony_ci    implementation-dependent constant MAX_VERTEX_ATTRIBS_ARB.  The commands
17185bd8deadSopenharmony_ci
17195bd8deadSopenharmony_ci      void VertexAttrib{1234}{sfd}ARB(uint index, T coords);
17205bd8deadSopenharmony_ci      void VertexAttrib{123}{sfd}vARB(uint index, T coords);
17215bd8deadSopenharmony_ci      void VertexAttrib4{bsifd ubusui}vARB(uint index, T coords);
17225bd8deadSopenharmony_ci
17235bd8deadSopenharmony_ci    specify the current vertex attribute numbered <index>, whose components
17245bd8deadSopenharmony_ci    are named <x>, <y>, <z>, and <w>.  The VertexAttrib1ARB family of commands
17255bd8deadSopenharmony_ci    sets the <x> coordinate to the provided single argument while setting <y>
17265bd8deadSopenharmony_ci    and <z> to 0 and <w> to 1.  Similarly, VertexAttrib2ARB commands set <x>
17275bd8deadSopenharmony_ci    and <y> to the specified values, <z> to 0 and <w> to 1; VertexAttrib3ARB
17285bd8deadSopenharmony_ci    commands set <x>, <y>, and <z>, with <w> set to 1, and VertexAttrib4ARB
17295bd8deadSopenharmony_ci    commands set all four coordinates.  The error INVALID_VALUE is generated
17305bd8deadSopenharmony_ci    if <index> is greater than or equal to MAX_VERTEX_ATTRIBS_ARB.
17315bd8deadSopenharmony_ci
17325bd8deadSopenharmony_ci    The commands
17335bd8deadSopenharmony_ci
17345bd8deadSopenharmony_ci      void VertexAttrib4NubARB(uint index, T coords);
17355bd8deadSopenharmony_ci      void VertexAttrib4N{bsi ubusui}vARB(uint index, T coords);
17365bd8deadSopenharmony_ci
17375bd8deadSopenharmony_ci    also specify vertex attributes with fixed-point coordinates that are
17385bd8deadSopenharmony_ci    scaled to the range [0,1] or [-1,1], according to Table 2.6.
17395bd8deadSopenharmony_ci
17405bd8deadSopenharmony_ci    Setting generic vertex attribute zero specifies a vertex; the four vertex
17415bd8deadSopenharmony_ci    coordinates are taken from the values of attribute zero.  A Vertex2,
17425bd8deadSopenharmony_ci    Vertex3, or Vertex4 command is completely equivalent to the corresponding
17435bd8deadSopenharmony_ci    VertexAttrib command with an index of zero.  Setting any other generic
17445bd8deadSopenharmony_ci    vertex attribute updates the current values of the attribute.  There are
17455bd8deadSopenharmony_ci    no current values for vertex attribute zero.
17465bd8deadSopenharmony_ci
17475bd8deadSopenharmony_ci    Implementations may, but do not necessarily, use the same storage for the
17485bd8deadSopenharmony_ci    current values of generic and certain conventional vertex attributes.
17495bd8deadSopenharmony_ci    When any generic vertex attribute other than zero is specified, the
17505bd8deadSopenharmony_ci    current values for the corresponding conventional attribute in Table X.1
17515bd8deadSopenharmony_ci    become undefined.  Additionally, when a conventional vertex attribute is
17525bd8deadSopenharmony_ci    specified, the current values for the corresponding generic vertex
17535bd8deadSopenharmony_ci    attribute in Table X.1 become undefined.  For example, setting the current
17545bd8deadSopenharmony_ci    normal will leave generic vertex attribute 2 undefined, and vice versa.
17555bd8deadSopenharmony_ci
17565bd8deadSopenharmony_ci    Generic
17575bd8deadSopenharmony_ci    Attribute   Conventional Attribute       Conventional Attribute Command
17585bd8deadSopenharmony_ci    ---------   ------------------------     ------------------------------
17595bd8deadSopenharmony_ci         0      vertex position              Vertex
17605bd8deadSopenharmony_ci         1      vertex weights 0-3           WeightARB, VertexWeightEXT
17615bd8deadSopenharmony_ci         2      normal                       Normal
17625bd8deadSopenharmony_ci         3      primary color                Color
17635bd8deadSopenharmony_ci         4      secondary color              SecondaryColorEXT
17645bd8deadSopenharmony_ci         5      fog coordinate               FogCoordEXT
17655bd8deadSopenharmony_ci         6      -                            -
17665bd8deadSopenharmony_ci         7      -                            -
17675bd8deadSopenharmony_ci         8      texture coordinate set 0     MultiTexCoord(TEXTURE0, ...)
17685bd8deadSopenharmony_ci         9      texture coordinate set 1     MultiTexCoord(TEXTURE1, ...)
17695bd8deadSopenharmony_ci        10      texture coordinate set 2     MultiTexCoord(TEXTURE2, ...)
17705bd8deadSopenharmony_ci        11      texture coordinate set 3     MultiTexCoord(TEXTURE3, ...)
17715bd8deadSopenharmony_ci        12      texture coordinate set 4     MultiTexCoord(TEXTURE4, ...)
17725bd8deadSopenharmony_ci        13      texture coordinate set 5     MultiTexCoord(TEXTURE5, ...)
17735bd8deadSopenharmony_ci        14      texture coordinate set 6     MultiTexCoord(TEXTURE6, ...)
17745bd8deadSopenharmony_ci        15      texture coordinate set 7     MultiTexCoord(TEXTURE7, ...)
17755bd8deadSopenharmony_ci       8+n      texture coordinate set n     MultiTexCoord(TEXTURE0+n, ...)
17765bd8deadSopenharmony_ci
17775bd8deadSopenharmony_ci    Table X.1, Generic and Conventional Vertex Attribute Mappings.  For each
17785bd8deadSopenharmony_ci    row, the current value of the conventional attribute becomes undefined
17795bd8deadSopenharmony_ci    when the corresponding generic attribute is set, and vice versa.
17805bd8deadSopenharmony_ci    Attribute zero corresponds to the vertex position and has no current
17815bd8deadSopenharmony_ci    state.
17825bd8deadSopenharmony_ci
17835bd8deadSopenharmony_ci    Setting any conventional vertex attribute not listed in Table X.1
17845bd8deadSopenharmony_ci    (including vertex weights 4 and above, if supported) will not cause any
17855bd8deadSopenharmony_ci    generic vertex attribute to become undefined, and such attributes will not
17865bd8deadSopenharmony_ci    become undefined when any generic vertex attribute is set.
17875bd8deadSopenharmony_ci
17885bd8deadSopenharmony_ci
17895bd8deadSopenharmony_ci
17905bd8deadSopenharmony_ci    (modify the last paragraph in the section, p.21) The state required to
17915bd8deadSopenharmony_ci    support vertex specification consists of four floating-point numbers per
17925bd8deadSopenharmony_ci    texture unit to store the current texture coordinates s, t, r, and q,
17935bd8deadSopenharmony_ci    three floating-point numbers to store the three coordinates of the current
17945bd8deadSopenharmony_ci    normal, four floating-point values to store the current RGBA color, one
17955bd8deadSopenharmony_ci    floating-point value to store the current color index, and
17965bd8deadSopenharmony_ci    MAX_VERTEX_ATTRIBS_ARB-1 four-component floating-point vectors for generic
17975bd8deadSopenharmony_ci    vertex attributes.  There is no notion of a current vertex, so no state is
17985bd8deadSopenharmony_ci    devoted to vertex coordinates or vertex attribute zero.  The initial
17995bd8deadSopenharmony_ci    texture coordinates are (S,T,R,Q) = (0,0,0,1) for each texture unit. The
18005bd8deadSopenharmony_ci    initial current normal has coordinates (0,0,1). The initial RGBA color is
18015bd8deadSopenharmony_ci    (R,G,B,A) = (1,1,1,1). The initial color index is 1.  The initial values
18025bd8deadSopenharmony_ci    for all generic vertex attributes are undefined.
18035bd8deadSopenharmony_ci
18045bd8deadSopenharmony_ci    
18055bd8deadSopenharmony_ci    Modify Section 2.8, Vertex Arrays (p. 21)
18065bd8deadSopenharmony_ci
18075bd8deadSopenharmony_ci    (modify first paragraph of section, p.21) The vertex specification
18085bd8deadSopenharmony_ci    commands described in section 2.7 accept data in almost any format, but
18095bd8deadSopenharmony_ci    their use requires many command executions to specify even simple
18105bd8deadSopenharmony_ci    geometry. Vertex data may also be placed into arrays that are stored in
18115bd8deadSopenharmony_ci    the client's address space. Blocks of data in these arrays may then be
18125bd8deadSopenharmony_ci    used to specify multiple geometric primitives through the execution of a
18135bd8deadSopenharmony_ci    single GL command. The client may specify up to 5 plus the values of
18145bd8deadSopenharmony_ci    MAX_TEXTURE_UNITS and MAX_VERTEX_ATTRIBS_ARB arrays: one each to store
18155bd8deadSopenharmony_ci    vertex coordinates, edge flags, colors, color indices, normals, one or
18165bd8deadSopenharmony_ci    more texture coordinate sets, and one or more generic vertex attributes.
18175bd8deadSopenharmony_ci    The commands
18185bd8deadSopenharmony_ci
18195bd8deadSopenharmony_ci      ...
18205bd8deadSopenharmony_ci
18215bd8deadSopenharmony_ci      void VertexAttribPointerARB(uint index, int size, enum type, 
18225bd8deadSopenharmony_ci                                  boolean normalized, sizei stride, 
18235bd8deadSopenharmony_ci                                  const void *pointer);
18245bd8deadSopenharmony_ci
18255bd8deadSopenharmony_ci    describe the locations and organizations...
18265bd8deadSopenharmony_ci
18275bd8deadSopenharmony_ci    (add after the first paragraph, p.22) The <index> parameter in the
18285bd8deadSopenharmony_ci    VertexAttribPointer command identifies the generic vertex attribute array
18295bd8deadSopenharmony_ci    being described.  The error INVALID_VALUE is generated if <index> is
18305bd8deadSopenharmony_ci    greater than or equal to MAX_VERTEX_ATTRIBS_ARB.  The <normalized>
18315bd8deadSopenharmony_ci    parameter in the VertexAttribPointer command identifies whether
18325bd8deadSopenharmony_ci    fixed-point types should be normalized when converted to floating-point.
18335bd8deadSopenharmony_ci    If <normalized> is TRUE, fixed-point data are converted as specified in
18345bd8deadSopenharmony_ci    Table 2.6; otherwise, the fixed-point values are converted directly.
18355bd8deadSopenharmony_ci
18365bd8deadSopenharmony_ci    (add after first paragraph, p.23) An individual generic vertex attribute
18375bd8deadSopenharmony_ci    array is enabled or disabled by calling one of
18385bd8deadSopenharmony_ci
18395bd8deadSopenharmony_ci      void EnableVertexAttribArrayARB(uint index);
18405bd8deadSopenharmony_ci      void DisableVertexAttribArrayARB(uint index);
18415bd8deadSopenharmony_ci
18425bd8deadSopenharmony_ci    where <index> identifies the generic vertex attribute array to enable or
18435bd8deadSopenharmony_ci    disable.  The error INVALID_VALUE is generated if <index> is greater than
18445bd8deadSopenharmony_ci    or equal to MAX_VERTEX_ATTRIBS_ARB.
18455bd8deadSopenharmony_ci
18465bd8deadSopenharmony_ci    (modify Table 2.4, p.23)
18475bd8deadSopenharmony_ci
18485bd8deadSopenharmony_ci                                       Normal    
18495bd8deadSopenharmony_ci      Command                 Sizes    ized?   Types
18505bd8deadSopenharmony_ci      ----------------------  -------  ------  --------------------------------
18515bd8deadSopenharmony_ci      VertexPointer           2,3,4     no     short, int, float, double
18525bd8deadSopenharmony_ci      NormalPointer           3         yes    byte, short, int, float, double
18535bd8deadSopenharmony_ci      ColorPointer            3,4       yes    byte, ubyte, short, ushort,
18545bd8deadSopenharmony_ci                                               int, uint, float, double
18555bd8deadSopenharmony_ci      IndexPointer            1         no     ubyte, short, int, float, double
18565bd8deadSopenharmony_ci      TexCoordPointer         1,2,3,4   no     short, int, float, double
18575bd8deadSopenharmony_ci      EdgeFlagPointer         1         no     boolean
18585bd8deadSopenharmony_ci      VertexAttribPointerARB  1,2,3,4   flag   byte, ubyte, short, ushort,
18595bd8deadSopenharmony_ci                                               int, uint, float, double
18605bd8deadSopenharmony_ci      WeightPointerARB        >=1       yes    byte, ubyte, short, ushort,
18615bd8deadSopenharmony_ci                                               int, uint, float, double
18625bd8deadSopenharmony_ci      VertexWeightPointerEXT  1         n/a    float
18635bd8deadSopenharmony_ci      SecondaryColor-         3         yes    byte, ubyte, short, ushort,
18645bd8deadSopenharmony_ci        PointerEXT                             int, uint, float, double
18655bd8deadSopenharmony_ci      FogCoordPointerEXT      1         n/a    float, double
18665bd8deadSopenharmony_ci      MatrixIndexPointerARB   >=1       no     ubyte, ushort, uint
18675bd8deadSopenharmony_ci
18685bd8deadSopenharmony_ci      Table 2.4: Vertex array sizes (values per vertex) and data types.  The
18695bd8deadSopenharmony_ci      "normalized" column indicates whether fixed-point types are accepted
18705bd8deadSopenharmony_ci      directly or normalized to [0,1] (for unsigned types) or [-1,1] (for
18715bd8deadSopenharmony_ci      singed types). For generic vertex attributes, fixed-point data are
18725bd8deadSopenharmony_ci      normalized if and only if the <normalized> flag is set.
18735bd8deadSopenharmony_ci
18745bd8deadSopenharmony_ci    (modify last paragraph, p.23) The command
18755bd8deadSopenharmony_ci
18765bd8deadSopenharmony_ci      void ArrayElement(int i); 
18775bd8deadSopenharmony_ci
18785bd8deadSopenharmony_ci    transfers the ith element of every enabled array to the GL.  The effect of
18795bd8deadSopenharmony_ci    ArrayElement(i) is the same as the effect of the command sequence
18805bd8deadSopenharmony_ci
18815bd8deadSopenharmony_ci      if (ARB_vertex_blend vertex weight array enabled) {
18825bd8deadSopenharmony_ci        Weight[type]vARB(vertex weight array size, 
18835bd8deadSopenharmony_ci                         vertex weight array element i);
18845bd8deadSopenharmony_ci      }
18855bd8deadSopenharmony_ci      if (EXT_vertex_weighting vertex weight array enabled) {
18865bd8deadSopenharmony_ci        VertexWeight[type]vARB(vertex weight array element i);
18875bd8deadSopenharmony_ci      }
18885bd8deadSopenharmony_ci      if (normal array enabled) {
18895bd8deadSopenharmony_ci        Normal3[type]v(normal array element i);
18905bd8deadSopenharmony_ci      }
18915bd8deadSopenharmony_ci      if (color array enabled) {
18925bd8deadSopenharmony_ci        Color[size][type]v(color array element i);
18935bd8deadSopenharmony_ci      }
18945bd8deadSopenharmony_ci      if (secondary color array enabled) {
18955bd8deadSopenharmony_ci        SecondaryColor3[type]vEXT(secondary color array element i);
18965bd8deadSopenharmony_ci      }
18975bd8deadSopenharmony_ci      if (fog coordinate array enabled) {
18985bd8deadSopenharmony_ci        FogCoord[type]vEXT(fog coordinate array element i);
18995bd8deadSopenharmony_ci      }
19005bd8deadSopenharmony_ci      if (matrix index array enabled) {
19015bd8deadSopenharmony_ci        MatrixIndex[type]vARB(matrix index array size,
19025bd8deadSopenharmony_ci                              matrix index array element i);
19035bd8deadSopenharmony_ci      }
19045bd8deadSopenharmony_ci      for (j = 0; j < textureUnits; j++) {
19055bd8deadSopenharmony_ci        if (texture coordinate set j array enabled) {
19065bd8deadSopenharmony_ci          MultiTexCoord[size][type]v(TEXTURE0 + j,
19075bd8deadSopenharmony_ci                                     texture coordinate set j
19085bd8deadSopenharmony_ci                                     array element i);
19095bd8deadSopenharmony_ci      }
19105bd8deadSopenharmony_ci      if (color index array enabled) {
19115bd8deadSopenharmony_ci        Index[type]v(color index array element i);
19125bd8deadSopenharmony_ci      }
19135bd8deadSopenharmony_ci      if (edge flag array enabled) {
19145bd8deadSopenharmony_ci        EdgeFlagv(edge flag array element i);
19155bd8deadSopenharmony_ci      }
19165bd8deadSopenharmony_ci      for (j = 1; j < genericAttributes; j++) {
19175bd8deadSopenharmony_ci        if (generic vertex attribute j array enabled) {
19185bd8deadSopenharmony_ci          if (generic vertex attribute j array normalization flag
19195bd8deadSopenharmony_ci              is set, and type is not FLOAT or DOUBLE) {
19205bd8deadSopenharmony_ci            VertexAttrib[size]N[type]vARB(j, generic vertex attribute j
19215bd8deadSopenharmony_ci                                             array element i);
19225bd8deadSopenharmony_ci          } else {
19235bd8deadSopenharmony_ci            VertexAttrib[size][type]vARB(j, generic vertex attribute j
19245bd8deadSopenharmony_ci                                            array element i);
19255bd8deadSopenharmony_ci          }
19265bd8deadSopenharmony_ci        }
19275bd8deadSopenharmony_ci      }
19285bd8deadSopenharmony_ci      if (generic attribute array 0 enabled) {
19295bd8deadSopenharmony_ci        if (generic vertex attribute j array normalization flag
19305bd8deadSopenharmony_ci            is set, and type is not FLOAT or DOUBLE) {
19315bd8deadSopenharmony_ci          VertexAttrib[size]N[type]vARB(0, generic vertex attribute 0
19325bd8deadSopenharmony_ci                                           array element i);
19335bd8deadSopenharmony_ci        } else {
19345bd8deadSopenharmony_ci          VertexAttrib[size][type]vARB(0, generic vertex attribute 0
19355bd8deadSopenharmony_ci                                          array element i);
19365bd8deadSopenharmony_ci        }
19375bd8deadSopenharmony_ci      } else if (vertex array enabled) {
19385bd8deadSopenharmony_ci        Vertex[size][type]vARB(vertex array element i);
19395bd8deadSopenharmony_ci      }
19405bd8deadSopenharmony_ci
19415bd8deadSopenharmony_ci    where <textureUnits> and <genericAttributes> give the number of texture
19425bd8deadSopenharmony_ci    units and generic vertex attributes supported by the implementation,
19435bd8deadSopenharmony_ci    respectively.  "[size]" and "[type]" correspond to the size and type of
19445bd8deadSopenharmony_ci    the corresponding array.  For generic vertex attributes, it is assumed
19455bd8deadSopenharmony_ci    that a complete set of vertex attribute commands exists, even though not
19465bd8deadSopenharmony_ci    all such functions are provided by the GL.  Both generic attribute array
19475bd8deadSopenharmony_ci    zero and the vertex array can specify a vertex if enabled, but only one
19485bd8deadSopenharmony_ci    such array is used.  As described in section 2.7, setting a generic vertex
19495bd8deadSopenharmony_ci    attributes listed in Table X.1 will leave the corresponding conventional
19505bd8deadSopenharmony_ci    vertex attribute undefined, and vice versa.
19515bd8deadSopenharmony_ci
19525bd8deadSopenharmony_ci
19535bd8deadSopenharmony_ci    (modify last paragraph of section, p.28) If the number of supported
19545bd8deadSopenharmony_ci    texture units (the value of MAX TEXTURE UNITS) is m and the number of
19555bd8deadSopenharmony_ci    supported generic vertex attributes (MAX_VERTEX_ATTRIBS_ARB) is n, then
19565bd8deadSopenharmony_ci    the client state required to implement vertex arrays consists of 5+m+n
19575bd8deadSopenharmony_ci    boolean enables, 5+m+n memory pointers, 5+m+n integer stride values, 4+m+n
19585bd8deadSopenharmony_ci    symbolic constants representing array types, 2+m+n integers representing
19595bd8deadSopenharmony_ci    values per element, and n boolean normalization flags. In the initial
19605bd8deadSopenharmony_ci    state, the enable values are each disabled, the memory pointers are each
19615bd8deadSopenharmony_ci    null, the strides are each zero, the array types are each FLOAT, the
19625bd8deadSopenharmony_ci    integers representing values per element are each four, and the
19635bd8deadSopenharmony_ci    normalization flags are disabled..
19645bd8deadSopenharmony_ci
19655bd8deadSopenharmony_ci
19665bd8deadSopenharmony_ci    Modify Section 2.10, Coordinate Transformations (p. 29)
19675bd8deadSopenharmony_ci
19685bd8deadSopenharmony_ci    (add new paragraphs) Vertex attributes are transformed before the vertex
19695bd8deadSopenharmony_ci    is used to generate primitives for rasterization, establish a raster
19705bd8deadSopenharmony_ci    position, or generate vertices for selection or feedback.  The attributes
19715bd8deadSopenharmony_ci    of each vertex are transformed using one of two vertex transformation
19725bd8deadSopenharmony_ci    modes.  The first mode, described in this and subsequent sections, is GL's
19735bd8deadSopenharmony_ci    conventional vertex transformation model.  The second mode, known as
19745bd8deadSopenharmony_ci    vertex program mode and described in section 2.14, transforms vertex
19755bd8deadSopenharmony_ci    attributes as specified in an application-supplied vertex program.
19765bd8deadSopenharmony_ci
19775bd8deadSopenharmony_ci    Vertex program mode is enabled and disabled, respectively, by
19785bd8deadSopenharmony_ci
19795bd8deadSopenharmony_ci      void Enable(enum target);
19805bd8deadSopenharmony_ci
19815bd8deadSopenharmony_ci    and
19825bd8deadSopenharmony_ci
19835bd8deadSopenharmony_ci      void Disable(enum target);
19845bd8deadSopenharmony_ci
19855bd8deadSopenharmony_ci    with <target> equal to VERTEX_PROGRAM_ARB.  When vertex program mode is
19865bd8deadSopenharmony_ci    enabled, vertices are transformed by the currently bound vertex program as
19875bd8deadSopenharmony_ci    discussed in section 2.14.
19885bd8deadSopenharmony_ci
19895bd8deadSopenharmony_ci    When vertex program mode is disabled, vertices, normals, and texture
19905bd8deadSopenharmony_ci    coordinates are transformed before their coordinates are used to produce
19915bd8deadSopenharmony_ci    an image in the framebuffer.  We begin with a description of how vertex
19925bd8deadSopenharmony_ci    coordinates are transformed and how the transformation is controlled in
19935bd8deadSopenharmony_ci    this case.  The discussion that continues through section 2.13 applies
19945bd8deadSopenharmony_ci    when vertex program mode is disabled.
19955bd8deadSopenharmony_ci
19965bd8deadSopenharmony_ci
19975bd8deadSopenharmony_ci    Modify Section 2.10.2, Matrices (p. 31)
19985bd8deadSopenharmony_ci
19995bd8deadSopenharmony_ci    (modify 1st paragraph) The projection matrix and model-view matrix are set
20005bd8deadSopenharmony_ci    and modified with a variety of commands.  The affected matrix is
20015bd8deadSopenharmony_ci    determined by the current matrix mode.  The current matrix mode is set
20025bd8deadSopenharmony_ci    with
20035bd8deadSopenharmony_ci
20045bd8deadSopenharmony_ci      void MatrixMode(enum mode);
20055bd8deadSopenharmony_ci
20065bd8deadSopenharmony_ci    which takes one of the pre-defined constants TEXTURE, MODELVIEW, COLOR,
20075bd8deadSopenharmony_ci    PROJECTION, or MATRIX<i>_ARB as the argument.  In the case of
20085bd8deadSopenharmony_ci    MATRIX<i>_ARB, <i> is an integer between 0 and <n>-1 indicating one of <n>
20095bd8deadSopenharmony_ci    program matrices where <n> is the value of the implementation defined
20105bd8deadSopenharmony_ci    constant MAX_PROGRAM_MATRICES_ARB.  Such program matrices are described in
20115bd8deadSopenharmony_ci    section 2.14.6.  TEXTURE is described later in section 2.10.2, and COLOR
20125bd8deadSopenharmony_ci    is described in section 3.6.3.  If the current matrix mode is MODELVIEW,
20135bd8deadSopenharmony_ci    then matrix operations apply to the model-view matrix; if PROJECTION, then
20145bd8deadSopenharmony_ci    they apply to the projection matrix.
20155bd8deadSopenharmony_ci
20165bd8deadSopenharmony_ci    (modify last paragraph of section) The state required to implement
20175bd8deadSopenharmony_ci    transformations consists of a <n>-value integer indicating the current
20185bd8deadSopenharmony_ci    matrix mode (where <n> is 4 + the number of supported texture and program
20195bd8deadSopenharmony_ci    matrices), a stack of at least two 4x4 matrices for each of COLOR,
20205bd8deadSopenharmony_ci    PROJECTION, and TEXTURE with associated stack pointers, <n> stacks (where
20215bd8deadSopenharmony_ci    <n> is at least 8) of at least one 4x4 matrix for each MATRIX<i>_ARB with
20225bd8deadSopenharmony_ci    associated stack pointers, and a stack of at least 32 4x4 matrices with an
20235bd8deadSopenharmony_ci    associated stack pointer for MODELVIEW.  Initially, there is only one
20245bd8deadSopenharmony_ci    matrix on each stack, and all matrices are set to the identity.  The
20255bd8deadSopenharmony_ci    initial matrix mode is MODELVIEW.  The initial value of ACTIVE_TEXTURE is
20265bd8deadSopenharmony_ci    TEXTURE0.
20275bd8deadSopenharmony_ci
20285bd8deadSopenharmony_ci
20295bd8deadSopenharmony_ci    Modify Section 2.11, Clipping (p. 39)
20305bd8deadSopenharmony_ci
20315bd8deadSopenharmony_ci    (add to end of next-to-last paragraph, p. 40) ... User clipping is not
20325bd8deadSopenharmony_ci    supported in vertex program mode if the current program is not
20335bd8deadSopenharmony_ci    position-invariant (section 2.14.4.5.1).  In this case, client-defined
20345bd8deadSopenharmony_ci    clip planes are always treated as disabled.
20355bd8deadSopenharmony_ci
20365bd8deadSopenharmony_ci
20375bd8deadSopenharmony_ci    Modify Section 2.12, Current Raster Position (p. 42)
20385bd8deadSopenharmony_ci
20395bd8deadSopenharmony_ci    (modify fourth paragraph, p.42) The coordinates are treated as if they
20405bd8deadSopenharmony_ci    were specified in a Vertex command.  If vertex program mode is enabled,
20415bd8deadSopenharmony_ci    the currently bound vertex program is executed, using the x, y, z, and w
20425bd8deadSopenharmony_ci    coordinates as the object coordinates of the vertex.  Otherwise, the x, y,
20435bd8deadSopenharmony_ci    z, and w coordinates are transformed by the current model-view and
20445bd8deadSopenharmony_ci    projection matrices. These coordinates, along with current values, are
20455bd8deadSopenharmony_ci    used to generate a color and texture coordinates just as is done for a
20465bd8deadSopenharmony_ci    vertex. The color and texture coordinates produced using either method
20475bd8deadSopenharmony_ci    replace the color and texture coordinates stored in the current raster
20485bd8deadSopenharmony_ci    position's associated data.  When in vertex program mode, the "x"
20495bd8deadSopenharmony_ci    component of the fog coordinate result replaces the current raster
20505bd8deadSopenharmony_ci    distance; otherwise, the distance from the origin of the eye coordinate
20515bd8deadSopenharmony_ci    system to the vertex as transformed by only the current model-view matrix
20525bd8deadSopenharmony_ci    replaces the current raster distance.  The latter distance can be
20535bd8deadSopenharmony_ci    approximated (see section 3.10).
20545bd8deadSopenharmony_ci
20555bd8deadSopenharmony_ci    Rename and Modify Section 2.13.8, Color and Vertex Data Clipping (p.56)
20565bd8deadSopenharmony_ci
20575bd8deadSopenharmony_ci    (modify second paragraph, p.57) Texture coordinates, as well as fog
20585bd8deadSopenharmony_ci    coordinates and point sizes computed on a per-vertex basis, must also be
20595bd8deadSopenharmony_ci    clipped when a primitive is clipped.  The method is exactly analogous to
20605bd8deadSopenharmony_ci    that used for color clipping.
20615bd8deadSopenharmony_ci
20625bd8deadSopenharmony_ci
20635bd8deadSopenharmony_ci    Add New Section 2.14 and subsections (p. 57).
20645bd8deadSopenharmony_ci
20655bd8deadSopenharmony_ci    Section 2.14, Vertex Programs
20665bd8deadSopenharmony_ci    
20675bd8deadSopenharmony_ci    The conventional GL vertex transformation model described in sections 2.10
20685bd8deadSopenharmony_ci    through 2.13 is a configurable but essentially hard-wired sequence of
20695bd8deadSopenharmony_ci    per-vertex computations based on a canonical set of per-vertex parameters
20705bd8deadSopenharmony_ci    and vertex transformation related state such as transformation matrices,
20715bd8deadSopenharmony_ci    lighting parameters, and texture coordinate generation parameters.  The
20725bd8deadSopenharmony_ci    general success and utility of the conventional GL vertex transformation
20735bd8deadSopenharmony_ci    model reflects its basic correspondence to the typical vertex
20745bd8deadSopenharmony_ci    transformation requirements of 3D applications.
20755bd8deadSopenharmony_ci
20765bd8deadSopenharmony_ci    However when the conventional GL vertex transformation model is not
20775bd8deadSopenharmony_ci    sufficient, the vertex program mode provides a substantially more flexible
20785bd8deadSopenharmony_ci    model for vertex transformation.  The vertex program mode permits
20795bd8deadSopenharmony_ci    applications to define their own vertex programs.
20805bd8deadSopenharmony_ci
20815bd8deadSopenharmony_ci    A vertex program is a character string that specifies a sequence of
20825bd8deadSopenharmony_ci    operations to perform.  Vertex program instructions are typically
20835bd8deadSopenharmony_ci    4-component vector operations that operate on per-vertex attributes and
20845bd8deadSopenharmony_ci    program parameters.  Vertex programs execute on a per-vertex basis and
20855bd8deadSopenharmony_ci    operate on each vertex completely independently from any other vertices.
20865bd8deadSopenharmony_ci    Vertex programs execute a finite fixed sequence of instructions with no
20875bd8deadSopenharmony_ci    branching or looping.  Vertex programs execute without data hazards so
20885bd8deadSopenharmony_ci    results computed in one instruction can be used immediately afterwards.
20895bd8deadSopenharmony_ci    The result of a vertex program is a set of vertex result registers that
20905bd8deadSopenharmony_ci    becomes the set of transformed vertex attributes used during clipping and
20915bd8deadSopenharmony_ci    primitive assembly.
20925bd8deadSopenharmony_ci
20935bd8deadSopenharmony_ci    Vertex programs are defined to operate only in RGBA mode.  The results of
20945bd8deadSopenharmony_ci    vertex program execution are undefined if the GL is in color index mode.
20955bd8deadSopenharmony_ci
20965bd8deadSopenharmony_ci
20975bd8deadSopenharmony_ci    Section 2.14.1,  Program Objects
20985bd8deadSopenharmony_ci
20995bd8deadSopenharmony_ci    The GL provides one or more program targets, each identifying a portion of
21005bd8deadSopenharmony_ci    the GL that can be controlled through application-specified programs.  The
21015bd8deadSopenharmony_ci    program target for vertex programs is VERTEX_PROGRAM_ARB.  Each program
21025bd8deadSopenharmony_ci    target has an associated program object, called the current program
21035bd8deadSopenharmony_ci    object.  Each program target also has a default program object, which is
21045bd8deadSopenharmony_ci    initially the current program object.
21055bd8deadSopenharmony_ci
21065bd8deadSopenharmony_ci    Each program object has an associated program string.  The command
21075bd8deadSopenharmony_ci
21085bd8deadSopenharmony_ci      ProgramStringARB(enum target, enum format, sizei len, 
21095bd8deadSopenharmony_ci                       const void *string);
21105bd8deadSopenharmony_ci
21115bd8deadSopenharmony_ci    updates the program string for the current program object for <target>.
21125bd8deadSopenharmony_ci    <format> describes the format of the program string, which must currently
21135bd8deadSopenharmony_ci    be PROGRAM_FORMAT_ASCII_ARB.  <string> is a pointer to the array of bytes
21145bd8deadSopenharmony_ci    representing the program string being loaded, which need not be
21155bd8deadSopenharmony_ci    null-terminated.  The length of the array is given by <len>.  If <string>
21165bd8deadSopenharmony_ci    is null-terminated, <len> should not include the terminator.
21175bd8deadSopenharmony_ci
21185bd8deadSopenharmony_ci    When a program string is loaded, it is interpreted according to syntactic
21195bd8deadSopenharmony_ci    and semantic rules corresponding to the program target specified by
21205bd8deadSopenharmony_ci    <target>.  If a program violates the syntactic or semantic restrictions of
21215bd8deadSopenharmony_ci    the program target, ProgramStringARB generates the error
21225bd8deadSopenharmony_ci    INVALID_OPERATION.
21235bd8deadSopenharmony_ci
21245bd8deadSopenharmony_ci    Additionally, ProgramString will update the program error position
21255bd8deadSopenharmony_ci    (PROGRAM_ERROR_POSITION_ARB) and error string (PROGRAM_ERROR_STRING_ARB).
21265bd8deadSopenharmony_ci    If a program fails to load, the value of the program error position is set
21275bd8deadSopenharmony_ci    to the ubyte offset into the specified program string indicating where the
21285bd8deadSopenharmony_ci    first program error was detected.  If the program fails to load because of
21295bd8deadSopenharmony_ci    a semantic restriction that is not detected until the program is fully
21305bd8deadSopenharmony_ci    scanned, the error position is set to the value of <len>.  If a program
21315bd8deadSopenharmony_ci    loads successfully, the error position is set to the value negative one.
21325bd8deadSopenharmony_ci    The implementation-dependent program error string contains one or more
21335bd8deadSopenharmony_ci    error or warning messages.  If a program loads succesfully, the error
21345bd8deadSopenharmony_ci    string may either contain warning messages or be empty.
21355bd8deadSopenharmony_ci
21365bd8deadSopenharmony_ci    Each program object has an associated array of program local parameters.
21375bd8deadSopenharmony_ci    The number and type of program local parameters is target- and
21385bd8deadSopenharmony_ci    implementation-dependent.  For vertex programs, program local parameters
21395bd8deadSopenharmony_ci    are four-component floating-point vectors.  The number of vectors is given
21405bd8deadSopenharmony_ci    by the implementation-dependent constant MAX_PROGRAM_LOCAL_PARAMETERS_ARB,
21415bd8deadSopenharmony_ci    which must be at least 96.  The commands
21425bd8deadSopenharmony_ci
21435bd8deadSopenharmony_ci      void ProgramLocalParameter4fARB(enum target, uint index,
21445bd8deadSopenharmony_ci                                      float x, float y, float z, float w);
21455bd8deadSopenharmony_ci      void ProgramLocalParameter4fvARB(enum target, uint index, 
21465bd8deadSopenharmony_ci                                       const float *params);
21475bd8deadSopenharmony_ci      void ProgramLocalParameter4dARB(enum target, uint index,
21485bd8deadSopenharmony_ci                                      double x, double y, double z, double w);
21495bd8deadSopenharmony_ci      void ProgramLocalParameter4dvARB(enum target, uint index, 
21505bd8deadSopenharmony_ci                                       const double *params);
21515bd8deadSopenharmony_ci
21525bd8deadSopenharmony_ci    update the values of the program local parameter numbered <index>
21535bd8deadSopenharmony_ci    belonging to the program object currently bound to <target>.  For
21545bd8deadSopenharmony_ci    ProgramLocalParameter4fARB and ProgramLocalParameter4dARB, the four
21555bd8deadSopenharmony_ci    components of the parameter are updated with the values of <x>, <y>, <z>,
21565bd8deadSopenharmony_ci    and <w>, respectively.  For ProgramLocalParameter4fvARB and
21575bd8deadSopenharmony_ci    ProgramLocalParameter4dvARB, the four components of the parameter are
21585bd8deadSopenharmony_ci    updated with the array of four values pointed to by <params>.  The error
21595bd8deadSopenharmony_ci    INVALID_VALUE is generated if <index> is greater than or equal to the
21605bd8deadSopenharmony_ci    number of program local parameters supported by <target>.
21615bd8deadSopenharmony_ci
21625bd8deadSopenharmony_ci    Additionally, each program target has an associated array of program
21635bd8deadSopenharmony_ci    environment parameters.  Unlike program local parameters, program
21645bd8deadSopenharmony_ci    environment parameters are shared by all program objects of a given
21655bd8deadSopenharmony_ci    target.  The number and type of program environment parameters is target-
21665bd8deadSopenharmony_ci    and implementation-dependent.  For vertex programs, program environment
21675bd8deadSopenharmony_ci    parameters are four-component floating-point vectors.  The number of
21685bd8deadSopenharmony_ci    vectors is given by the implementation-dependent constant
21695bd8deadSopenharmony_ci    MAX_PROGRAM_ENV_PARAMETERS_ARB, which must be at least 96.  The commands
21705bd8deadSopenharmony_ci
21715bd8deadSopenharmony_ci      void ProgramEnvParameter4fARB(enum target, uint index,
21725bd8deadSopenharmony_ci                                    float x, float y, float z, float w);
21735bd8deadSopenharmony_ci      void ProgramEnvParameter4fvARB(enum target, uint index,
21745bd8deadSopenharmony_ci                                     const float *params);
21755bd8deadSopenharmony_ci      void ProgramEnvParameter4dARB(enum target, uint index,
21765bd8deadSopenharmony_ci                                    double x, double y, double z, double w);
21775bd8deadSopenharmony_ci      void ProgramEnvParameter4dvARB(enum target, uint index,
21785bd8deadSopenharmony_ci                                     const double *params);
21795bd8deadSopenharmony_ci
21805bd8deadSopenharmony_ci    update the values of the program environment parameter numbered <index>
21815bd8deadSopenharmony_ci    for the given program target <target>.  For ProgramEnvParameter4fARB and
21825bd8deadSopenharmony_ci    ProgramEnvParameter4dARB, the four components of the parameter are updated
21835bd8deadSopenharmony_ci    with the values of <x>, <y>, <z>, and <w>, respectively.  For
21845bd8deadSopenharmony_ci    ProgramEnvParameter4fvARB and ProgramEnvParameter4dvARB, the four
21855bd8deadSopenharmony_ci    components of the parameter are updated with the array of four values
21865bd8deadSopenharmony_ci    pointed to by <params>.  The error INVALID_VALUE is generated if <index>
21875bd8deadSopenharmony_ci    is greater than or equal to the number of program environment parameters
21885bd8deadSopenharmony_ci    supported by <target>.
21895bd8deadSopenharmony_ci
21905bd8deadSopenharmony_ci    Each program target has a default program object.  Additionally, named
21915bd8deadSopenharmony_ci    program objects can be created and operated upon.  The name space for
21925bd8deadSopenharmony_ci    program objects is the positive integers and is shared by programs of all
21935bd8deadSopenharmony_ci    targets.  The name zero is reserved by the GL.
21945bd8deadSopenharmony_ci
21955bd8deadSopenharmony_ci    A named program object is created by binding an unused program object name
21965bd8deadSopenharmony_ci    to a valid program target.  The binding is effected by calling
21975bd8deadSopenharmony_ci
21985bd8deadSopenharmony_ci      BindProgramARB(enum target, uint program);
21995bd8deadSopenharmony_ci
22005bd8deadSopenharmony_ci    with <target> set to the desired program target and <program> set to the
22015bd8deadSopenharmony_ci    unused program name.  The resulting program object has a program target
22025bd8deadSopenharmony_ci    given by <target> and is assigned target-specific default values (see
22035bd8deadSopenharmony_ci    section 2.14.7 for vertex programs).  BindProgramARB may also be used to
22045bd8deadSopenharmony_ci    bind an existing program object to a program target.  If <program> is
22055bd8deadSopenharmony_ci    zero, the default program object for <target> is bound.  If <program> is
22065bd8deadSopenharmony_ci    the name of an existing program object whose associated program target is
22075bd8deadSopenharmony_ci    <target>, the named program object is bound.  The error INVALID_OPERATION
22085bd8deadSopenharmony_ci    is generated if <program> names an existing program object whose
22095bd8deadSopenharmony_ci    associated program target is anything other than <target>.
22105bd8deadSopenharmony_ci
22115bd8deadSopenharmony_ci    Programs objects are deleted by calling
22125bd8deadSopenharmony_ci
22135bd8deadSopenharmony_ci      void DeleteProgramsARB(sizei n, const uint *programs);
22145bd8deadSopenharmony_ci
22155bd8deadSopenharmony_ci    <programs> contains <n> names of programs to be deleted.  After a program
22165bd8deadSopenharmony_ci    object is deleted, its name is again unused.  If a program object that is
22175bd8deadSopenharmony_ci    bound to any target is deleted, it is as though BindProgramARB is first
22185bd8deadSopenharmony_ci    executed with same target and a <program> of zero.  Unused names in
22195bd8deadSopenharmony_ci    <programs> are silently ignored, as is the value zero.
22205bd8deadSopenharmony_ci
22215bd8deadSopenharmony_ci    The command
22225bd8deadSopenharmony_ci
22235bd8deadSopenharmony_ci      void GenProgramsARB(sizei n, uint *programs);
22245bd8deadSopenharmony_ci
22255bd8deadSopenharmony_ci    returns <n> currently unused program names in <programs>.  These names are
22265bd8deadSopenharmony_ci    marked as used, for the purposes of GenProgramsARB only, but objects are
22275bd8deadSopenharmony_ci    created only when they are first bound using BindProgramARB.
22285bd8deadSopenharmony_ci
22295bd8deadSopenharmony_ci
22305bd8deadSopenharmony_ci    Section 2.14.2,  Vertex Program Grammar and Semantic Restrictions
22315bd8deadSopenharmony_ci
22325bd8deadSopenharmony_ci    Vertex program strings are specified as an array of ASCII characters
22335bd8deadSopenharmony_ci    containing the program text.  When a vertex program is loaded by a call to
22345bd8deadSopenharmony_ci    ProgramStringARB, the program string is parsed into a set of tokens
22355bd8deadSopenharmony_ci    possibly separated by whitespace.  Spaces, tabs, newlines, carriage
22365bd8deadSopenharmony_ci    returns, and comments are considered whitespace.  Comments begin with the
22375bd8deadSopenharmony_ci    character "#" and are terminated by a newline, a carriage return, or the
22385bd8deadSopenharmony_ci    end of the program array.
22395bd8deadSopenharmony_ci
22405bd8deadSopenharmony_ci    The Backus-Naur Form (BNF) grammar below specifies the syntactically valid
22415bd8deadSopenharmony_ci    sequences for vertex programs.  The set of valid tokens can be inferred
22425bd8deadSopenharmony_ci    from the grammar.  The token "" represents an empty string and is used to
22435bd8deadSopenharmony_ci    indicate optional rules.  A program is invalid if it contains any
22445bd8deadSopenharmony_ci    undefined tokens or characters.
22455bd8deadSopenharmony_ci
22465bd8deadSopenharmony_ci    A vertex program is required to begin with the header string "!!ARBvp1.0",
22475bd8deadSopenharmony_ci    without any preceding whitespace.  This string identifies the subsequent
22485bd8deadSopenharmony_ci    program text as a vertex program (version 1.0) that should be parsed
22495bd8deadSopenharmony_ci    according to the following grammar and semantic rules.  Program string
22505bd8deadSopenharmony_ci    parsing begins with the character immediately following the header string.
22515bd8deadSopenharmony_ci
22525bd8deadSopenharmony_ci    <program>              ::= <optionSequence> <statementSequence> "END"
22535bd8deadSopenharmony_ci
22545bd8deadSopenharmony_ci    <optionSequence>       ::= <optionSequence> <option>
22555bd8deadSopenharmony_ci                             | ""
22565bd8deadSopenharmony_ci
22575bd8deadSopenharmony_ci    <option>               ::= "OPTION" <identifier> ";"
22585bd8deadSopenharmony_ci
22595bd8deadSopenharmony_ci    <statementSequence>    ::= <statementSequence> <statement>
22605bd8deadSopenharmony_ci                             | ""
22615bd8deadSopenharmony_ci
22625bd8deadSopenharmony_ci    <statement>            ::= <instruction> ";"
22635bd8deadSopenharmony_ci                             | <namingStatement> ";"
22645bd8deadSopenharmony_ci
22655bd8deadSopenharmony_ci    <instruction>          ::= <ARL_instruction>
22665bd8deadSopenharmony_ci                             | <VECTORop_instruction>
22675bd8deadSopenharmony_ci                             | <SCALARop_instruction>
22685bd8deadSopenharmony_ci                             | <BINSCop_instruction>
22695bd8deadSopenharmony_ci                             | <BINop_instruction>
22705bd8deadSopenharmony_ci                             | <TRIop_instruction>
22715bd8deadSopenharmony_ci                             | <SWZ_instruction>
22725bd8deadSopenharmony_ci
22735bd8deadSopenharmony_ci    <ARL_instruction>      ::= "ARL" <maskedAddrReg> "," <scalarSrcReg>
22745bd8deadSopenharmony_ci
22755bd8deadSopenharmony_ci    <VECTORop_instruction> ::= <VECTORop> <maskedDstReg> "," <swizzleSrcReg>
22765bd8deadSopenharmony_ci
22775bd8deadSopenharmony_ci    <VECTORop>             ::= "ABS"
22785bd8deadSopenharmony_ci                             | "FLR"
22795bd8deadSopenharmony_ci                             | "FRC"
22805bd8deadSopenharmony_ci                             | "LIT"
22815bd8deadSopenharmony_ci                             | "MOV"
22825bd8deadSopenharmony_ci
22835bd8deadSopenharmony_ci    <SCALARop_instruction> ::= <SCALARop> <maskedDstReg> "," <scalarSrcReg>
22845bd8deadSopenharmony_ci
22855bd8deadSopenharmony_ci    <SCALARop>             ::= "EX2"
22865bd8deadSopenharmony_ci                             | "EXP"
22875bd8deadSopenharmony_ci                             | "LG2"
22885bd8deadSopenharmony_ci                             | "LOG"                          
22895bd8deadSopenharmony_ci                             | "RCP"
22905bd8deadSopenharmony_ci                             | "RSQ"
22915bd8deadSopenharmony_ci
22925bd8deadSopenharmony_ci    <BINSCop_instruction>  ::= <BINSCop> <maskedDstReg> "," <scalarSrcReg> ","
22935bd8deadSopenharmony_ci                               <scalarSrcReg> 
22945bd8deadSopenharmony_ci
22955bd8deadSopenharmony_ci    <BINSCop>              ::= "POW"
22965bd8deadSopenharmony_ci 
22975bd8deadSopenharmony_ci    <BINop_instruction>    ::= <BINop> <maskedDstReg> ","
22985bd8deadSopenharmony_ci                               <swizzleSrcReg> "," <swizzleSrcReg>
22995bd8deadSopenharmony_ci
23005bd8deadSopenharmony_ci    <BINop>                ::= "ADD"
23015bd8deadSopenharmony_ci                             | "DP3"
23025bd8deadSopenharmony_ci                             | "DP4"
23035bd8deadSopenharmony_ci                             | "DPH"
23045bd8deadSopenharmony_ci                             | "DST"
23055bd8deadSopenharmony_ci                             | "MAX"
23065bd8deadSopenharmony_ci                             | "MIN"
23075bd8deadSopenharmony_ci                             | "MUL"
23085bd8deadSopenharmony_ci                             | "SGE"
23095bd8deadSopenharmony_ci                             | "SLT"
23105bd8deadSopenharmony_ci                             | "SUB"
23115bd8deadSopenharmony_ci                             | "XPD"
23125bd8deadSopenharmony_ci
23135bd8deadSopenharmony_ci    <TRIop_instruction>    ::= <TRIop> <maskedDstReg> ","
23145bd8deadSopenharmony_ci                               <swizzleSrcReg> "," <swizzleSrcReg> ","
23155bd8deadSopenharmony_ci                               <swizzleSrcReg>
23165bd8deadSopenharmony_ci
23175bd8deadSopenharmony_ci    <TRIop>                ::= "MAD"
23185bd8deadSopenharmony_ci
23195bd8deadSopenharmony_ci    <SWZ_instruction>      ::= "SWZ" <maskedDstReg> "," <srcReg> "," 
23205bd8deadSopenharmony_ci                               <extendedSwizzle>
23215bd8deadSopenharmony_ci
23225bd8deadSopenharmony_ci    <scalarSrcReg>         ::= <optionalSign> <srcReg> <scalarSuffix>
23235bd8deadSopenharmony_ci
23245bd8deadSopenharmony_ci    <swizzleSrcReg>        ::= <optionalSign> <srcReg> <swizzleSuffix>
23255bd8deadSopenharmony_ci
23265bd8deadSopenharmony_ci    <maskedDstReg>         ::= <dstReg> <optionalMask>
23275bd8deadSopenharmony_ci
23285bd8deadSopenharmony_ci    <maskedAddrReg>        ::= <addrReg> <addrWriteMask>
23295bd8deadSopenharmony_ci
23305bd8deadSopenharmony_ci    <extendedSwizzle>      ::= <extSwizComp> "," <extSwizComp> "," 
23315bd8deadSopenharmony_ci                                 <extSwizComp> "," <extSwizComp>
23325bd8deadSopenharmony_ci
23335bd8deadSopenharmony_ci    <extSwizComp>          ::= <optionalSign> <extSwizSel>
23345bd8deadSopenharmony_ci
23355bd8deadSopenharmony_ci    <extSwizSel>           ::= "0" 
23365bd8deadSopenharmony_ci                             | "1" 
23375bd8deadSopenharmony_ci                             | <component>
23385bd8deadSopenharmony_ci
23395bd8deadSopenharmony_ci    <srcReg>               ::= <vertexAttribReg>
23405bd8deadSopenharmony_ci                             | <temporaryReg>
23415bd8deadSopenharmony_ci                             | <progParamReg>
23425bd8deadSopenharmony_ci
23435bd8deadSopenharmony_ci    <dstReg>               ::= <temporaryReg>
23445bd8deadSopenharmony_ci                             | <vertexResultReg>
23455bd8deadSopenharmony_ci
23465bd8deadSopenharmony_ci    <vertexAttribReg>      ::= <establishedName>
23475bd8deadSopenharmony_ci                             | <vtxAttribBinding>
23485bd8deadSopenharmony_ci
23495bd8deadSopenharmony_ci    <temporaryReg>         ::= <establishedName>
23505bd8deadSopenharmony_ci
23515bd8deadSopenharmony_ci    <progParamReg>         ::= <progParamSingle>
23525bd8deadSopenharmony_ci                             | <progParamArray> "[" <progParamArrayMem> "]"
23535bd8deadSopenharmony_ci                             | <paramSingleItemUse>
23545bd8deadSopenharmony_ci
23555bd8deadSopenharmony_ci    <progParamSingle>      ::= <establishedName>
23565bd8deadSopenharmony_ci
23575bd8deadSopenharmony_ci    <progParamArray>       ::= <establishedName>
23585bd8deadSopenharmony_ci    
23595bd8deadSopenharmony_ci    <progParamArrayMem>    ::= <progParamArrayAbs>
23605bd8deadSopenharmony_ci                             | <progParamArrayRel>
23615bd8deadSopenharmony_ci                             
23625bd8deadSopenharmony_ci    <progParamArrayAbs>    ::= <integer>
23635bd8deadSopenharmony_ci
23645bd8deadSopenharmony_ci    <progParamArrayRel>    ::= <addrReg> <addrComponent> <addrRegRelOffset>
23655bd8deadSopenharmony_ci
23665bd8deadSopenharmony_ci    <addrRegRelOffset>     ::= ""
23675bd8deadSopenharmony_ci                             | "+" <addrRegPosOffset>
23685bd8deadSopenharmony_ci                             | "-" <addrRegNegOffset>
23695bd8deadSopenharmony_ci
23705bd8deadSopenharmony_ci    <addrRegPosOffset>     ::= <integer> from 0 to 63
23715bd8deadSopenharmony_ci
23725bd8deadSopenharmony_ci    <addrRegNegOffset>     ::= <integer> from 0 to 64
23735bd8deadSopenharmony_ci
23745bd8deadSopenharmony_ci    <vertexResultReg>      ::= <establishedName>
23755bd8deadSopenharmony_ci                             | <resultBinding>
23765bd8deadSopenharmony_ci
23775bd8deadSopenharmony_ci    <addrReg>              ::= <establishedName>
23785bd8deadSopenharmony_ci
23795bd8deadSopenharmony_ci    <addrComponent>        ::= "." "x"
23805bd8deadSopenharmony_ci
23815bd8deadSopenharmony_ci    <addrWriteMask>        ::= "." "x"
23825bd8deadSopenharmony_ci
23835bd8deadSopenharmony_ci    <scalarSuffix>         ::= "." <component>
23845bd8deadSopenharmony_ci
23855bd8deadSopenharmony_ci    <swizzleSuffix>        ::= ""
23865bd8deadSopenharmony_ci                             | "." <component>
23875bd8deadSopenharmony_ci                             | "." <component> <component>
23885bd8deadSopenharmony_ci                                   <component> <component>
23895bd8deadSopenharmony_ci
23905bd8deadSopenharmony_ci    <component>            ::= "x"
23915bd8deadSopenharmony_ci                             | "y"
23925bd8deadSopenharmony_ci                             | "z"
23935bd8deadSopenharmony_ci                             | "w"
23945bd8deadSopenharmony_ci
23955bd8deadSopenharmony_ci    <optionalMask>         ::= ""
23965bd8deadSopenharmony_ci                             | "." "x"
23975bd8deadSopenharmony_ci                             | "." "y"
23985bd8deadSopenharmony_ci                             | "." "xy"
23995bd8deadSopenharmony_ci                             | "." "z"
24005bd8deadSopenharmony_ci                             | "." "xz"
24015bd8deadSopenharmony_ci                             | "." "yz"
24025bd8deadSopenharmony_ci                             | "." "xyz"
24035bd8deadSopenharmony_ci                             | "." "w"
24045bd8deadSopenharmony_ci                             | "." "xw"
24055bd8deadSopenharmony_ci                             | "." "yw"
24065bd8deadSopenharmony_ci                             | "." "xyw"
24075bd8deadSopenharmony_ci                             | "." "zw"
24085bd8deadSopenharmony_ci                             | "." "xzw"
24095bd8deadSopenharmony_ci                             | "." "yzw"
24105bd8deadSopenharmony_ci                             | "." "xyzw"
24115bd8deadSopenharmony_ci
24125bd8deadSopenharmony_ci    <namingStatement>      ::= <ATTRIB_statement>
24135bd8deadSopenharmony_ci                             | <PARAM_statement>
24145bd8deadSopenharmony_ci                             | <TEMP_statement>
24155bd8deadSopenharmony_ci                             | <ADDRESS_statement>
24165bd8deadSopenharmony_ci                             | <OUTPUT_statement>
24175bd8deadSopenharmony_ci                             | <ALIAS_statement>
24185bd8deadSopenharmony_ci
24195bd8deadSopenharmony_ci    <ATTRIB_statement>     ::= "ATTRIB" <establishName> "="
24205bd8deadSopenharmony_ci                                 <vtxAttribBinding>
24215bd8deadSopenharmony_ci
24225bd8deadSopenharmony_ci    <vtxAttribBinding>     ::= "vertex" "." <vtxAttribItem>
24235bd8deadSopenharmony_ci
24245bd8deadSopenharmony_ci    <vtxAttribItem>        ::= "position"
24255bd8deadSopenharmony_ci                             | "weight" <vtxOptWeightNum>
24265bd8deadSopenharmony_ci                             | "normal"
24275bd8deadSopenharmony_ci                             | "color" <optColorType>
24285bd8deadSopenharmony_ci                             | "fogcoord"
24295bd8deadSopenharmony_ci                             | "texcoord" <optTexCoordNum>
24305bd8deadSopenharmony_ci                             | "matrixindex" "[" <vtxWeightNum> "]"
24315bd8deadSopenharmony_ci                             | "attrib" "[" <vtxAttribNum> "]"
24325bd8deadSopenharmony_ci
24335bd8deadSopenharmony_ci    <vtxAttribNum>         ::= <integer> from 0 to MAX_VERTEX_ATTRIBS_ARB-1
24345bd8deadSopenharmony_ci
24355bd8deadSopenharmony_ci    <vtxOptWeightNum>      ::= ""
24365bd8deadSopenharmony_ci                             | "[" <vtxWeightNum> "]"
24375bd8deadSopenharmony_ci
24385bd8deadSopenharmony_ci    <vtxWeightNum>         ::= <integer> from 0 to MAX_VERTEX_UNITS_ARB-1,
24395bd8deadSopenharmony_ci                                 must be divisible by four
24405bd8deadSopenharmony_ci
24415bd8deadSopenharmony_ci    <PARAM_statement>      ::= <PARAM_singleStmt>
24425bd8deadSopenharmony_ci                             | <PARAM_multipleStmt>
24435bd8deadSopenharmony_ci
24445bd8deadSopenharmony_ci    <PARAM_singleStmt>     ::= "PARAM" <establishName> <paramSingleInit>
24455bd8deadSopenharmony_ci
24465bd8deadSopenharmony_ci    <PARAM_multipleStmt>   ::= "PARAM" <establishName> "[" <optArraySize> "]"
24475bd8deadSopenharmony_ci                                   <paramMultipleInit>
24485bd8deadSopenharmony_ci
24495bd8deadSopenharmony_ci    <optArraySize>         ::= ""
24505bd8deadSopenharmony_ci                             | <integer> from 1 to MAX_PROGRAM_PARAMETERS_ARB
24515bd8deadSopenharmony_ci                                 (maximum number of allowed program 
24525bd8deadSopenharmony_ci                                  parameter bindings)
24535bd8deadSopenharmony_ci
24545bd8deadSopenharmony_ci    <paramSingleInit>      ::= "=" <paramSingleItemDecl>
24555bd8deadSopenharmony_ci
24565bd8deadSopenharmony_ci    <paramMultipleInit>    ::= "=" "{" <paramMultInitList> "}"
24575bd8deadSopenharmony_ci
24585bd8deadSopenharmony_ci    <paramMultInitList>    ::= <paramMultipleItem>
24595bd8deadSopenharmony_ci                             | <paramMultipleItem> "," <paramMultiInitList>
24605bd8deadSopenharmony_ci
24615bd8deadSopenharmony_ci    <paramSingleItemDecl>  ::= <stateSingleItem>
24625bd8deadSopenharmony_ci                             | <programSingleItem>
24635bd8deadSopenharmony_ci                             | <paramConstDecl>
24645bd8deadSopenharmony_ci
24655bd8deadSopenharmony_ci    <paramSingleItemUse>   ::= <stateSingleItem>
24665bd8deadSopenharmony_ci                             | <programSingleItem>
24675bd8deadSopenharmony_ci                             | <paramConstUse>
24685bd8deadSopenharmony_ci
24695bd8deadSopenharmony_ci    <paramMultipleItem>    ::= <stateMultipleItem>
24705bd8deadSopenharmony_ci                             | <programMultipleItem>
24715bd8deadSopenharmony_ci                             | <paramConstDecl>
24725bd8deadSopenharmony_ci
24735bd8deadSopenharmony_ci    <stateMultipleItem>    ::= <stateSingleItem>
24745bd8deadSopenharmony_ci                             | "state" "." <stateMatrixRows>
24755bd8deadSopenharmony_ci
24765bd8deadSopenharmony_ci    <stateSingleItem>      ::= "state" "." <stateMaterialItem>
24775bd8deadSopenharmony_ci                             | "state" "." <stateLightItem>
24785bd8deadSopenharmony_ci                             | "state" "." <stateLightModelItem>
24795bd8deadSopenharmony_ci                             | "state" "." <stateLightProdItem>
24805bd8deadSopenharmony_ci                             | "state" "." <stateTexGenItem>
24815bd8deadSopenharmony_ci                             | "state" "." <stateFogItem>
24825bd8deadSopenharmony_ci                             | "state" "." <stateClipPlaneItem>
24835bd8deadSopenharmony_ci                             | "state" "." <statePointItem>
24845bd8deadSopenharmony_ci                             | "state" "." <stateMatrixRow>
24855bd8deadSopenharmony_ci
24865bd8deadSopenharmony_ci    <stateMaterialItem>    ::= "material" <optFaceType> "." <stateMatProperty>
24875bd8deadSopenharmony_ci
24885bd8deadSopenharmony_ci    <stateMatProperty>     ::= "ambient"
24895bd8deadSopenharmony_ci                             | "diffuse"
24905bd8deadSopenharmony_ci                             | "specular"
24915bd8deadSopenharmony_ci                             | "emission"
24925bd8deadSopenharmony_ci                             | "shininess"
24935bd8deadSopenharmony_ci
24945bd8deadSopenharmony_ci    <stateLightItem>       ::= "light" "[" <stateLightNumber> "]" "." 
24955bd8deadSopenharmony_ci                                 <stateLightProperty>
24965bd8deadSopenharmony_ci
24975bd8deadSopenharmony_ci    <stateLightProperty>   ::= "ambient"
24985bd8deadSopenharmony_ci                             | "diffuse" 
24995bd8deadSopenharmony_ci                             | "specular"
25005bd8deadSopenharmony_ci                             | "position"
25015bd8deadSopenharmony_ci                             | "attenuation"
25025bd8deadSopenharmony_ci                             | "spot" "." <stateSpotProperty>
25035bd8deadSopenharmony_ci                             | "half"
25045bd8deadSopenharmony_ci
25055bd8deadSopenharmony_ci    <stateSpotProperty>    ::= "direction" 
25065bd8deadSopenharmony_ci
25075bd8deadSopenharmony_ci    <stateLightModelItem>  ::= "lightmodel" <stateLModProperty>
25085bd8deadSopenharmony_ci
25095bd8deadSopenharmony_ci    <stateLModProperty>    ::= "." "ambient"
25105bd8deadSopenharmony_ci                             | <optFaceType> "." "scenecolor"
25115bd8deadSopenharmony_ci
25125bd8deadSopenharmony_ci    <stateLightProdItem>   ::= "lightprod" "[" <stateLightNumber> "]" 
25135bd8deadSopenharmony_ci                                 <optFaceType> "." <stateLProdProperty>
25145bd8deadSopenharmony_ci
25155bd8deadSopenharmony_ci    <stateLProdProperty>   ::= "ambient"
25165bd8deadSopenharmony_ci                             | "diffuse"
25175bd8deadSopenharmony_ci                             | "specular"
25185bd8deadSopenharmony_ci
25195bd8deadSopenharmony_ci    <stateLightNumber>     ::= <integer> from 0 to MAX_LIGHTS-1
25205bd8deadSopenharmony_ci
25215bd8deadSopenharmony_ci    <stateTexGenItem>      ::= "texgen" <optTexCoordNum> "." 
25225bd8deadSopenharmony_ci                                 <stateTexGenType> "." <stateTexGenCoord>
25235bd8deadSopenharmony_ci
25245bd8deadSopenharmony_ci    <stateTexGenType>      ::= "eye"
25255bd8deadSopenharmony_ci                             | "object"
25265bd8deadSopenharmony_ci
25275bd8deadSopenharmony_ci    <stateTexGenCoord>     ::= "s" 
25285bd8deadSopenharmony_ci                             | "t" 
25295bd8deadSopenharmony_ci                             | "r" 
25305bd8deadSopenharmony_ci                             | "q"
25315bd8deadSopenharmony_ci
25325bd8deadSopenharmony_ci    <stateFogItem>         ::= "fog" "." <stateFogProperty>
25335bd8deadSopenharmony_ci
25345bd8deadSopenharmony_ci    <stateFogProperty>     ::= "color" 
25355bd8deadSopenharmony_ci                             | "params" 
25365bd8deadSopenharmony_ci
25375bd8deadSopenharmony_ci    <stateClipPlaneItem>   ::= "clip" "[" <stateClipPlaneNum> "]" "." "plane"
25385bd8deadSopenharmony_ci
25395bd8deadSopenharmony_ci    <stateClipPlaneNum>    ::= <integer> from 0 to MAX_CLIP_PLANES-1
25405bd8deadSopenharmony_ci
25415bd8deadSopenharmony_ci    <statePointItem>       ::= "point" "." <statePointProperty>
25425bd8deadSopenharmony_ci
25435bd8deadSopenharmony_ci    <statePointProperty>   ::= "size"
25445bd8deadSopenharmony_ci                             | "attenuation"
25455bd8deadSopenharmony_ci
25465bd8deadSopenharmony_ci    <stateMatrixRow>       ::= <stateMatrixItem> "." "row" "[" 
25475bd8deadSopenharmony_ci                                  <stateMatrixRowNum> "]"
25485bd8deadSopenharmony_ci
25495bd8deadSopenharmony_ci    <stateMatrixRows>      ::= <stateMatrixItem> <optMatrixRows>
25505bd8deadSopenharmony_ci
25515bd8deadSopenharmony_ci    <optMatrixRows>        ::= ""
25525bd8deadSopenharmony_ci                             | "." "row" "[" <stateMatrixRowNum> ".." 
25535bd8deadSopenharmony_ci                                  <stateMatrixRowNum> "]"
25545bd8deadSopenharmony_ci
25555bd8deadSopenharmony_ci    <stateMatrixItem>      ::= "matrix" "." <stateMatrixName> 
25565bd8deadSopenharmony_ci                               <stateOptMatModifier>
25575bd8deadSopenharmony_ci
25585bd8deadSopenharmony_ci    <stateOptMatModifier>  ::= ""
25595bd8deadSopenharmony_ci                             | "." <stateMatModifier>
25605bd8deadSopenharmony_ci
25615bd8deadSopenharmony_ci    <stateMatModifier>     ::= "inverse" 
25625bd8deadSopenharmony_ci                             | "transpose" 
25635bd8deadSopenharmony_ci                             | "invtrans"
25645bd8deadSopenharmony_ci
25655bd8deadSopenharmony_ci    <stateMatrixRowNum>    ::= <integer> from 0 to 3
25665bd8deadSopenharmony_ci
25675bd8deadSopenharmony_ci    <stateMatrixName>      ::= "modelview" <stateOptModMatNum>
25685bd8deadSopenharmony_ci                             | "projection"
25695bd8deadSopenharmony_ci                             | "mvp"
25705bd8deadSopenharmony_ci                             | "texture" <optTexCoordNum>
25715bd8deadSopenharmony_ci                             | "palette" "[" <statePaletteMatNum> "]"
25725bd8deadSopenharmony_ci                             | "program" "[" <stateProgramMatNum> "]"
25735bd8deadSopenharmony_ci                             
25745bd8deadSopenharmony_ci    <stateOptModMatNum>    ::= ""
25755bd8deadSopenharmony_ci                             | "[" <stateModMatNum> "]"
25765bd8deadSopenharmony_ci
25775bd8deadSopenharmony_ci    <stateModMatNum>       ::= <integer> from 0 to MAX_VERTEX_UNITS_ARB-1
25785bd8deadSopenharmony_ci
25795bd8deadSopenharmony_ci    <statePaletteMatNum>   ::= <integer> from 0 to MAX_PALETTE_MATRICES_ARB-1
25805bd8deadSopenharmony_ci
25815bd8deadSopenharmony_ci    <stateProgramMatNum>   ::= <integer> from 0 to MAX_PROGRAM_MATRICES_ARB-1
25825bd8deadSopenharmony_ci
25835bd8deadSopenharmony_ci    <programSingleItem>    ::= <progEnvParam>
25845bd8deadSopenharmony_ci                             | <progLocalParam>
25855bd8deadSopenharmony_ci
25865bd8deadSopenharmony_ci    <programMultipleItem>  ::= <progEnvParams>
25875bd8deadSopenharmony_ci                             | <progLocalParams>
25885bd8deadSopenharmony_ci
25895bd8deadSopenharmony_ci    <progEnvParams>        ::= "program" "." "env" 
25905bd8deadSopenharmony_ci                                 "[" <progEnvParamNums> "]"
25915bd8deadSopenharmony_ci
25925bd8deadSopenharmony_ci    <progEnvParamNums>     ::= <progEnvParamNum>
25935bd8deadSopenharmony_ci                             | <progEnvParamNum> ".." <progEnvParamNum>
25945bd8deadSopenharmony_ci
25955bd8deadSopenharmony_ci    <progEnvParam>         ::= "program" "." "env" 
25965bd8deadSopenharmony_ci                                 "[" <progEnvParamNum> "]"
25975bd8deadSopenharmony_ci
25985bd8deadSopenharmony_ci    <progLocalParams>      ::= "program" "." "local" 
25995bd8deadSopenharmony_ci                                 "[" <progLocalParamNums> "]"
26005bd8deadSopenharmony_ci
26015bd8deadSopenharmony_ci    <progLocalParamNums>   ::= <progLocalParamNum>
26025bd8deadSopenharmony_ci                             | <progLocalParamNum> ".." <progLocalParamNum>
26035bd8deadSopenharmony_ci
26045bd8deadSopenharmony_ci    <progLocalParam>       ::= "program" "." "local" 
26055bd8deadSopenharmony_ci                                 "[" <progLocalParamNum> "]"
26065bd8deadSopenharmony_ci
26075bd8deadSopenharmony_ci    <progEnvParamNum>      ::= <integer> from 0 to
26085bd8deadSopenharmony_ci                               MAX_PROGRAM_ENV_PARAMETERS_ARB - 1
26095bd8deadSopenharmony_ci
26105bd8deadSopenharmony_ci    <progLocalParamNum>    ::= <integer> from 0 to
26115bd8deadSopenharmony_ci                               MAX_PROGRAM_LOCAL_PARAMETERS_ARB - 1
26125bd8deadSopenharmony_ci
26135bd8deadSopenharmony_ci    <paramConstDecl>       ::= <paramConstScalarDecl>
26145bd8deadSopenharmony_ci                             | <paramConstVector>
26155bd8deadSopenharmony_ci
26165bd8deadSopenharmony_ci    <paramConstUse>        ::= <paramConstScalarUse>
26175bd8deadSopenharmony_ci                             | <paramConstVector>
26185bd8deadSopenharmony_ci
26195bd8deadSopenharmony_ci    <paramConstScalarDecl> ::= <signedFloatConstant>
26205bd8deadSopenharmony_ci
26215bd8deadSopenharmony_ci    <paramConstScalarUse>  ::= <floatConstant>
26225bd8deadSopenharmony_ci
26235bd8deadSopenharmony_ci    <paramConstVector>     ::= "{" <signedFloatConstant> "}"
26245bd8deadSopenharmony_ci                             | "{" <signedFloatConstant> "," 
26255bd8deadSopenharmony_ci                                   <signedFloatConstant> "}"
26265bd8deadSopenharmony_ci                             | "{" <signedFloatConstant> "," 
26275bd8deadSopenharmony_ci                                   <signedFloatConstant> ","
26285bd8deadSopenharmony_ci                                   <signedFloatConstant> "}"
26295bd8deadSopenharmony_ci                             | "{" <signedFloatConstant> "," 
26305bd8deadSopenharmony_ci                                   <signedFloatConstant> ","
26315bd8deadSopenharmony_ci                                   <signedFloatConstant> "," 
26325bd8deadSopenharmony_ci                                   <signedFloatConstant> "}"
26335bd8deadSopenharmony_ci
26345bd8deadSopenharmony_ci    <signedFloatConstant>  ::= <optionalSign> <floatConstant>
26355bd8deadSopenharmony_ci
26365bd8deadSopenharmony_ci    <floatConstant>        ::= see text
26375bd8deadSopenharmony_ci
26385bd8deadSopenharmony_ci    <optionalSign>         ::= ""
26395bd8deadSopenharmony_ci                             | "-"
26405bd8deadSopenharmony_ci                             | "+"
26415bd8deadSopenharmony_ci
26425bd8deadSopenharmony_ci    <TEMP_statement>       ::= "TEMP" <varNameList>
26435bd8deadSopenharmony_ci
26445bd8deadSopenharmony_ci    <ADDRESS_statement>    ::= "ADDRESS" <varNameList>
26455bd8deadSopenharmony_ci
26465bd8deadSopenharmony_ci    <varNameList>          ::= <establishName>
26475bd8deadSopenharmony_ci                             | <establishName> "," <varNameList>
26485bd8deadSopenharmony_ci
26495bd8deadSopenharmony_ci    <OUTPUT_statement>     ::= "OUTPUT" <establishName> "="
26505bd8deadSopenharmony_ci                                 <resultBinding>
26515bd8deadSopenharmony_ci
26525bd8deadSopenharmony_ci    <resultBinding>        ::= "result" "." "position"
26535bd8deadSopenharmony_ci                             | "result" "." <resultColBinding>
26545bd8deadSopenharmony_ci                             | "result" "." "fogcoord"
26555bd8deadSopenharmony_ci                             | "result" "." "pointsize"
26565bd8deadSopenharmony_ci                             | "result" "." "texcoord" <optTexCoordNum>
26575bd8deadSopenharmony_ci
26585bd8deadSopenharmony_ci    <resultColBinding>     ::= "color" <optFaceType> <optColorType>
26595bd8deadSopenharmony_ci
26605bd8deadSopenharmony_ci    <optFaceType>          ::= ""
26615bd8deadSopenharmony_ci                             | "." "front"
26625bd8deadSopenharmony_ci                             | "." "back"
26635bd8deadSopenharmony_ci
26645bd8deadSopenharmony_ci    <optColorType>         ::= ""
26655bd8deadSopenharmony_ci                             | "." "primary"
26665bd8deadSopenharmony_ci                             | "." "secondary"
26675bd8deadSopenharmony_ci
26685bd8deadSopenharmony_ci    <optTexCoordNum>       ::= ""
26695bd8deadSopenharmony_ci                             | "[" <texCoordNum> "]"
26705bd8deadSopenharmony_ci
26715bd8deadSopenharmony_ci    <texCoordNum>          ::= <integer> from 0 to MAX_TEXTURE_UNITS-1
26725bd8deadSopenharmony_ci
26735bd8deadSopenharmony_ci    <ALIAS_statement>      ::= "ALIAS" <establishName> "="
26745bd8deadSopenharmony_ci                                 <establishedName>
26755bd8deadSopenharmony_ci
26765bd8deadSopenharmony_ci    <establishName>        ::= <identifier>
26775bd8deadSopenharmony_ci
26785bd8deadSopenharmony_ci    <establishedName>      ::= <identifier>
26795bd8deadSopenharmony_ci
26805bd8deadSopenharmony_ci    <identifier>           ::= see text
26815bd8deadSopenharmony_ci
26825bd8deadSopenharmony_ci    The <integer> rule matches an integer constant.  The integer consists
26835bd8deadSopenharmony_ci    of a sequence of one or more digits ("0" through "9").
26845bd8deadSopenharmony_ci
26855bd8deadSopenharmony_ci    The <floatConstant> rule matches a floating-point constant consisting
26865bd8deadSopenharmony_ci    of an integer part, a decimal point, a fraction part, an "e" or
26875bd8deadSopenharmony_ci    "E", and an optionally signed integer exponent.  The integer and
26885bd8deadSopenharmony_ci    fraction parts both consist of a sequence of one or more digits ("0"
26895bd8deadSopenharmony_ci    through "9").  Either the integer part or the fraction parts (not
26905bd8deadSopenharmony_ci    both) may be missing; either the decimal point or the "e" (or "E")
26915bd8deadSopenharmony_ci    and the exponent (not both) may be missing.
26925bd8deadSopenharmony_ci
26935bd8deadSopenharmony_ci    The <identifier> rule matches a sequence of one or more letters ("A"
26945bd8deadSopenharmony_ci    through "Z", "a" through "z"), digits ("0" through "9), underscores ("_"),
26955bd8deadSopenharmony_ci    or dollar signs ("$"); the first character must not be a number.  Upper
26965bd8deadSopenharmony_ci    and lower case letters are considered different (names are
26975bd8deadSopenharmony_ci    case-sensitive).  The following strings are reserved keywords and may not
26985bd8deadSopenharmony_ci    be used as identifiers:
26995bd8deadSopenharmony_ci
27005bd8deadSopenharmony_ci        ABS, ADD, ADDRESS, ALIAS, ARL, ATTRIB, DP3, DP4, DPH, DST, END, EX2,
27015bd8deadSopenharmony_ci        EXP, FLR, FRC, LG2, LIT, LOG, MAD, MAX, MIN, MOV, MUL, OPTION, OUTPUT,
27025bd8deadSopenharmony_ci        PARAM, POW, RCP, RSQ, SGE, SLT, SUB, SWZ, TEMP, XPD, program, result,
27035bd8deadSopenharmony_ci        state, and vertex.
27045bd8deadSopenharmony_ci
27055bd8deadSopenharmony_ci    The error INVALID_OPERATION is generated if a vertex program fails to load
27065bd8deadSopenharmony_ci    because it is not syntactically correct or for one of the semantic
27075bd8deadSopenharmony_ci    restrictions described in the following sections.
27085bd8deadSopenharmony_ci
27095bd8deadSopenharmony_ci    A successfully loaded vertex program is parsed into a sequence of
27105bd8deadSopenharmony_ci    instructions.  Each instruction is identified by its tokenized name.  The
27115bd8deadSopenharmony_ci    operation of these instructions when executed is defined in section
27125bd8deadSopenharmony_ci    2.14.5.  A successfully loaded program string replaces the program string
27135bd8deadSopenharmony_ci    previously loaded into the specified program object.  If the OUT_OF_MEMORY
27145bd8deadSopenharmony_ci    error is generated by ProgramStringARB, no change is made to the previous
27155bd8deadSopenharmony_ci    contents of the current program object.
27165bd8deadSopenharmony_ci
27175bd8deadSopenharmony_ci
27185bd8deadSopenharmony_ci    Section 2.14.3,  Vertex Program Variables
27195bd8deadSopenharmony_ci
27205bd8deadSopenharmony_ci    Vertex programs may access a number of different variables during their
27215bd8deadSopenharmony_ci    execution.  The following sections define the variables that can be
27225bd8deadSopenharmony_ci    declared and used by a vertex program.
27235bd8deadSopenharmony_ci
27245bd8deadSopenharmony_ci    Explicit variable declarations allow a vertex program to establish a
27255bd8deadSopenharmony_ci    variable name that can be used to refer to a specified resource in
27265bd8deadSopenharmony_ci    subsequent instructions.  A vertex program will fail to load if it
27275bd8deadSopenharmony_ci    declares the same variable name more than once or if it refers to a
27285bd8deadSopenharmony_ci    variable name that has not been previously declared in the program string.
27295bd8deadSopenharmony_ci
27305bd8deadSopenharmony_ci    Implicit variable declarations allow a vertex program to use the name of
27315bd8deadSopenharmony_ci    certain available resources by name.
27325bd8deadSopenharmony_ci
27335bd8deadSopenharmony_ci    Section 2.14.3.1,  Vertex Attributes
27345bd8deadSopenharmony_ci
27355bd8deadSopenharmony_ci    Vertex program attribute variables are a set of four-component
27365bd8deadSopenharmony_ci    floating-point vectors holding the attributes of the vertex being
27375bd8deadSopenharmony_ci    processed.  Vertex attribute variables are read-only during vertex program
27385bd8deadSopenharmony_ci    execution.
27395bd8deadSopenharmony_ci
27405bd8deadSopenharmony_ci    Vertex attribute variables can be declared explicitly using the
27415bd8deadSopenharmony_ci    <ATTRIB_statement> grammar rule, or implicitly using the
27425bd8deadSopenharmony_ci    <vtxAttribBinding> grammar rule in an executable instruction.
27435bd8deadSopenharmony_ci
27445bd8deadSopenharmony_ci    Each vertex attribute variable is bound to a single item of vertex state
27455bd8deadSopenharmony_ci    according to the <vtxAttrBinding> grammar rule.  The set of GL state that
27465bd8deadSopenharmony_ci    can be bound to a vertex attribute variable is given in Table X.2.  Vertex
27475bd8deadSopenharmony_ci    attribute variables are initialized at each vertex program invocation with
27485bd8deadSopenharmony_ci    the current values of the bound state.
27495bd8deadSopenharmony_ci
27505bd8deadSopenharmony_ci      Vertex Attribute Binding  Components  Underlying State
27515bd8deadSopenharmony_ci      ------------------------  ----------  ------------------------------
27525bd8deadSopenharmony_ci      vertex.position           (x,y,z,w)   object coordinates
27535bd8deadSopenharmony_ci      vertex.weight             (w,w,w,w)   vertex weights 0-3
27545bd8deadSopenharmony_ci      vertex.weight[n]          (w,w,w,w)   vertex weights n-n+3
27555bd8deadSopenharmony_ci      vertex.normal             (x,y,z,1)   normal
27565bd8deadSopenharmony_ci      vertex.color              (r,g,b,a)   primary color
27575bd8deadSopenharmony_ci      vertex.color.primary      (r,g,b,a)   primary color
27585bd8deadSopenharmony_ci      vertex.color.secondary    (r,g,b,a)   secondary color
27595bd8deadSopenharmony_ci      vertex.fogcoord           (f,0,0,1)   fog coordinate
27605bd8deadSopenharmony_ci      vertex.texcoord           (s,t,r,q)   texture coordinate, unit 0
27615bd8deadSopenharmony_ci      vertex.texcoord[n]        (s,t,r,q)   texture coordinate, unit n
27625bd8deadSopenharmony_ci      vertex.matrixindex        (i,i,i,i)   vertex matrix indices 0-3
27635bd8deadSopenharmony_ci      vertex.matrixindex[n]     (i,i,i,i)   vertex matrix indices n-n+3
27645bd8deadSopenharmony_ci      vertex.attrib[n]          (x,y,z,w)   generic vertex attribute n
27655bd8deadSopenharmony_ci
27665bd8deadSopenharmony_ci      Table X.2:  Vertex Attribute Bindings.  The "Components" column
27675bd8deadSopenharmony_ci      indicates the mapping of the state in the "Underlying State" column.
27685bd8deadSopenharmony_ci      Values of "0" or "1" in the "Components" column indicate the constants
27695bd8deadSopenharmony_ci      0.0 and 1.0, respectively.  Bindings containing "[n]" require an integer
27705bd8deadSopenharmony_ci      value of <n> to select an individual item.
27715bd8deadSopenharmony_ci
27725bd8deadSopenharmony_ci    If a vertex attribute binding matches "vertex.position", the "x", "y", "z"
27735bd8deadSopenharmony_ci    and "w" components of the vertex attribute variable are filled with the
27745bd8deadSopenharmony_ci    "x", "y", "z", and "w" components, respectively, of the vertex position.
27755bd8deadSopenharmony_ci
27765bd8deadSopenharmony_ci    If a vertex attribute binding matches "vertex.normal", the "x", "y", and
27775bd8deadSopenharmony_ci    "z" components of the vertex attribute variable are filled with the "x",
27785bd8deadSopenharmony_ci    "y", and "z" components, respectively, of the vertex normal.  The "w"
27795bd8deadSopenharmony_ci    component is filled with 1.
27805bd8deadSopenharmony_ci
27815bd8deadSopenharmony_ci    If a vertex attribute binding matches "vertex.color" or
27825bd8deadSopenharmony_ci    "vertex.color.primary", the "x", "y", "z", and "w" components of the
27835bd8deadSopenharmony_ci    vertex attribute variable are filled with the "r", "g", "b", and "a"
27845bd8deadSopenharmony_ci    components, respectively, of the vertex color.
27855bd8deadSopenharmony_ci
27865bd8deadSopenharmony_ci    If a vertex attribute binding matches "vertex.color.secondary", the "x",
27875bd8deadSopenharmony_ci    "y", "z", and "w" components of the vertex attribute variable are filled
27885bd8deadSopenharmony_ci    with the "r", "g", "b", and "a" components, respectively, of the vertex
27895bd8deadSopenharmony_ci    secondary color.
27905bd8deadSopenharmony_ci
27915bd8deadSopenharmony_ci    If a vertex attribute binding matches "vertex.fogcoord", the "x" component
27925bd8deadSopenharmony_ci    of the vertex attribute variable is filled with the vertex fog coordinate.
27935bd8deadSopenharmony_ci    The "y", "z", and "w" coordinates are filled with 0, 0, and 1,
27945bd8deadSopenharmony_ci    respectively.
27955bd8deadSopenharmony_ci
27965bd8deadSopenharmony_ci    If a vertex attribute binding matches "vertex.texcoord" or
27975bd8deadSopenharmony_ci    "vertex.texcoord[n]", the "x", "y", "z", and "w" components of the vertex
27985bd8deadSopenharmony_ci    attribute variable are filled with the "s", "t", "r", and "q" components,
27995bd8deadSopenharmony_ci    respectively, of the vertex texture coordinates for texture unit <n>.  If
28005bd8deadSopenharmony_ci    "[n]" is omitted, texture unit zero is used.
28015bd8deadSopenharmony_ci
28025bd8deadSopenharmony_ci    If a vertex attribute binding matches "vertex.weight" or
28035bd8deadSopenharmony_ci    "vertex.weight[n]", the "x", "y", "z", and "w" components of the vertex
28045bd8deadSopenharmony_ci    attribute variable are filled with vertex weights <n> through <n>+3,
28055bd8deadSopenharmony_ci    respectively.  If "[n]" is omitted, weights zero through three are used.
28065bd8deadSopenharmony_ci    For the purposes of this binding, all weights supported by the
28075bd8deadSopenharmony_ci    implementation but not set by the application are set to zero, including
28085bd8deadSopenharmony_ci    the extra derived weight corresponding to the fixed-function
28095bd8deadSopenharmony_ci    WEIGHT_SUM_UNITY_ARB enable.  For components whose corresponding weight is
28105bd8deadSopenharmony_ci    not supported by the implementation (i.e., numbered MAX_VERTEX_UNITS_ARB
28115bd8deadSopenharmony_ci    or larger), "y" and "z" components are set to 0.0 and "w" components are
28125bd8deadSopenharmony_ci    set to 1.0.  A vertex program will fail to load if a vertex attribute
28135bd8deadSopenharmony_ci    binding specifies a weight number <n> that is greater than or equal to
28145bd8deadSopenharmony_ci    MAX_VERTEX_UNITS_ARB or is not divisible by four.
28155bd8deadSopenharmony_ci
28165bd8deadSopenharmony_ci    If a vertex attribute binding matches "vertex.matrixindex" or
28175bd8deadSopenharmony_ci    "vertex.matrixindex[n]", the "x", "y", "z", and "w" components of the
28185bd8deadSopenharmony_ci    vertex attribute variable are filled with matrix indices <n> through <n>+3
28195bd8deadSopenharmony_ci    of the vertex, respectively.  If "[n]" is omitted, matrix indices zero
28205bd8deadSopenharmony_ci    through three are used.  For components whose corresponding matrix index
28215bd8deadSopenharmony_ci    is not supported by the implementation (i.e., numbered
28225bd8deadSopenharmony_ci    MAX_VERTEX_UNITS_ARB or larger), "y", and "z" components are set to 0.0
28235bd8deadSopenharmony_ci    and "w" components are set to 1.0.  A vertex program will fail to load if
28245bd8deadSopenharmony_ci    an attribute binding specifies a matrix index number <n> that is greater
28255bd8deadSopenharmony_ci    than or equal MAX_VERTEX_UNITS_ARB or is not divisible by four.
28265bd8deadSopenharmony_ci
28275bd8deadSopenharmony_ci    If a vertex attribute binding matches "vertex.attrib[n]", the "x", "y",
28285bd8deadSopenharmony_ci    "z" and "w" components of the vertex attribute variable are filled with
28295bd8deadSopenharmony_ci    the "x", "y", "z", and "w" components, respectively, of generic vertex
28305bd8deadSopenharmony_ci    attribute <n>.  Note that "vertex.attrib[0]" and "vertex.position" are
28315bd8deadSopenharmony_ci    equivalent.
28325bd8deadSopenharmony_ci
28335bd8deadSopenharmony_ci    As described in section 2.7, setting a generic vertex attribute may leave
28345bd8deadSopenharmony_ci    a corresponding conventional vertex attribute undefined, and vice versa.
28355bd8deadSopenharmony_ci    To prevent inadvertent use of attribute pairs with undefined attributes, a
28365bd8deadSopenharmony_ci    vertex program will fail to load if it binds both a conventional vertex
28375bd8deadSopenharmony_ci    attribute and a generic vertex attribute listed in the same row of Table
28385bd8deadSopenharmony_ci    X.2.1.
28395bd8deadSopenharmony_ci
28405bd8deadSopenharmony_ci      Conventional Attribute Binding      Generic Attribute Binding
28415bd8deadSopenharmony_ci      ------------------------------      -------------------------
28425bd8deadSopenharmony_ci      vertex.position                     vertex.attrib[0]
28435bd8deadSopenharmony_ci      vertex.weight                       vertex.attrib[1]
28445bd8deadSopenharmony_ci      vertex.weight[0]                    vertex.attrib[1]
28455bd8deadSopenharmony_ci      vertex.normal                       vertex.attrib[2]
28465bd8deadSopenharmony_ci      vertex.color                        vertex.attrib[3]
28475bd8deadSopenharmony_ci      vertex.color.primary                vertex.attrib[3]
28485bd8deadSopenharmony_ci      vertex.color.secondary              vertex.attrib[4]        
28495bd8deadSopenharmony_ci      vertex.fogcoord                     vertex.attrib[5]
28505bd8deadSopenharmony_ci      vertex.texcoord                     vertex.attrib[8]
28515bd8deadSopenharmony_ci      vertex.texcoord[0]                  vertex.attrib[8]
28525bd8deadSopenharmony_ci      vertex.texcoord[1]                  vertex.attrib[9]
28535bd8deadSopenharmony_ci      vertex.texcoord[2]                  vertex.attrib[10]
28545bd8deadSopenharmony_ci      vertex.texcoord[3]                  vertex.attrib[11]
28555bd8deadSopenharmony_ci      vertex.texcoord[4]                  vertex.attrib[12]
28565bd8deadSopenharmony_ci      vertex.texcoord[5]                  vertex.attrib[13]
28575bd8deadSopenharmony_ci      vertex.texcoord[6]                  vertex.attrib[14]
28585bd8deadSopenharmony_ci      vertex.texcoord[7]                  vertex.attrib[15]
28595bd8deadSopenharmony_ci      vertex.texcoord[n]                  vertex.attrib[8+n]
28605bd8deadSopenharmony_ci
28615bd8deadSopenharmony_ci      Table X.2.1:  Invalid Vertex Attribute Binding Pairs.  Vertex programs
28625bd8deadSopenharmony_ci      may not bind both attributes listed in any row.  The <n> in the last row
28635bd8deadSopenharmony_ci      matches the number of any valid texture unit.
28645bd8deadSopenharmony_ci
28655bd8deadSopenharmony_ci
28665bd8deadSopenharmony_ci    Section 2.14.3.2,  Vertex Program Parameters
28675bd8deadSopenharmony_ci
28685bd8deadSopenharmony_ci    Vertex program parameter variables are a set of four-component
28695bd8deadSopenharmony_ci    floating-point vectors used as constants during vertex program execution.
28705bd8deadSopenharmony_ci    Vertex program parameters retain their values across vertex program
28715bd8deadSopenharmony_ci    invocations, although their values can change between invocations due to
28725bd8deadSopenharmony_ci    GL state changes.
28735bd8deadSopenharmony_ci
28745bd8deadSopenharmony_ci    Single program parameter variables and arrays of program parameter
28755bd8deadSopenharmony_ci    variables can be declared explicitly using the <PARAM_statement> grammar
28765bd8deadSopenharmony_ci    rule.  Single program parameter variables can also be declared implicitly
28775bd8deadSopenharmony_ci    using the <paramSingleItemUse> grammar rule in an executable instruction.
28785bd8deadSopenharmony_ci
28795bd8deadSopenharmony_ci    Each single program parameter variable is bound to a constant vector or to
28805bd8deadSopenharmony_ci    a GL state vector according to the <paramSingleInit> grammar rule.
28815bd8deadSopenharmony_ci    Individual items of a program parameter array are bound to constant
28825bd8deadSopenharmony_ci    vectors or GL state vectors according to the <programMultipleInit> grammar
28835bd8deadSopenharmony_ci    rule.  The set of GL state that can be bound to program parameter
28845bd8deadSopenharmony_ci    variables are given in Tables X.3.1 through X.3.8.
28855bd8deadSopenharmony_ci
28865bd8deadSopenharmony_ci
28875bd8deadSopenharmony_ci    Constant Bindings
28885bd8deadSopenharmony_ci
28895bd8deadSopenharmony_ci    A program parameter variable can be bound to a scalar or vector constant
28905bd8deadSopenharmony_ci    using the <paramConstDecl> grammar rule (explicit declarations) or the
28915bd8deadSopenharmony_ci    <paramConstUse> grammar rule (implicit declarations).  
28925bd8deadSopenharmony_ci
28935bd8deadSopenharmony_ci    If a program parameter binding matches the <paramConstScalarDecl> or
28945bd8deadSopenharmony_ci    <paramConstScalarUse> grammar rules, the corresponding program parameter
28955bd8deadSopenharmony_ci    variable is bound to the vector (X,X,X,X), where X is the value of the
28965bd8deadSopenharmony_ci    specified constant.  Note that the <paramConstScalarUse> grammar rule,
28975bd8deadSopenharmony_ci    used only in implicit declarations, allows only non-negative constants.
28985bd8deadSopenharmony_ci    This disambiguates cases like "-2", which could conceivably be taken to
28995bd8deadSopenharmony_ci    mean either the vector "(2,2,2,2)" with all components negated or
29005bd8deadSopenharmony_ci    "(-2,-2,-2,-2)" without negation.  Only the former interpretation is
29015bd8deadSopenharmony_ci    allowed by the grammar.
29025bd8deadSopenharmony_ci
29035bd8deadSopenharmony_ci    If a program parameter binding matches <paramConstVector>, the
29045bd8deadSopenharmony_ci    corresponding program parameter variable is bound to the vector (X,Y,Z,W),
29055bd8deadSopenharmony_ci    where X, Y, Z, and W are the values corresponding to the first, second,
29065bd8deadSopenharmony_ci    third, and fourth match of <signedFloatConstant>.  If fewer than four
29075bd8deadSopenharmony_ci    constants are specified, Y, Z, and W assume the values 0.0, 0.0, and 1.0,
29085bd8deadSopenharmony_ci    if their respective constants are not specified.
29095bd8deadSopenharmony_ci
29105bd8deadSopenharmony_ci    Program parameter variables initialized to constant values can never be
29115bd8deadSopenharmony_ci    modified.
29125bd8deadSopenharmony_ci
29135bd8deadSopenharmony_ci
29145bd8deadSopenharmony_ci    Program Environment/Local Parameter Bindings
29155bd8deadSopenharmony_ci
29165bd8deadSopenharmony_ci      Binding                        Components  Underlying State
29175bd8deadSopenharmony_ci      -----------------------------  ----------  ----------------------------
29185bd8deadSopenharmony_ci      program.env[a]                 (x,y,z,w)   program environment 
29195bd8deadSopenharmony_ci                                                 parameter a
29205bd8deadSopenharmony_ci      program.local[a]               (x,y,z,w)   program local parameter a
29215bd8deadSopenharmony_ci      program.env[a..b]              (x,y,z,w)   program environment
29225bd8deadSopenharmony_ci                                                 parameters a through b
29235bd8deadSopenharmony_ci      program.local[a..b]            (x,y,z,w)   program local parameters
29245bd8deadSopenharmony_ci                                                 a through b
29255bd8deadSopenharmony_ci
29265bd8deadSopenharmony_ci      Table X.3.1:  Program Environment/Local Parameter Bindings.  <a> and <b>
29275bd8deadSopenharmony_ci      indicate parameter numbers, where <a> must be less than or equal to <b>.
29285bd8deadSopenharmony_ci
29295bd8deadSopenharmony_ci    If a program parameter binding matches "program.env[a]" or
29305bd8deadSopenharmony_ci    "program.local[a]", the four components of the program parameter variable
29315bd8deadSopenharmony_ci    are filled with the four components of program environment parameter <a>
29325bd8deadSopenharmony_ci    or program local parameter <a>, respectively.
29335bd8deadSopenharmony_ci
29345bd8deadSopenharmony_ci    Additionally, for program parameter array bindings, "program.env[a..b]"
29355bd8deadSopenharmony_ci    and "program.local[a..b]" are equivalent to specifying program environment
29365bd8deadSopenharmony_ci    parameters <a> through <b> in order or program local parameters <a>
29375bd8deadSopenharmony_ci    through <b> in order, respectively.  In either case, a program will fail
29385bd8deadSopenharmony_ci    to load if <a> is greater than <b>.
29395bd8deadSopenharmony_ci
29405bd8deadSopenharmony_ci
29415bd8deadSopenharmony_ci    Material Property Bindings
29425bd8deadSopenharmony_ci
29435bd8deadSopenharmony_ci      Binding                        Components  Underlying State
29445bd8deadSopenharmony_ci      -----------------------------  ----------  ----------------------------
29455bd8deadSopenharmony_ci      state.material.ambient         (r,g,b,a)   front ambient material color
29465bd8deadSopenharmony_ci      state.material.diffuse         (r,g,b,a)   front diffuse material color
29475bd8deadSopenharmony_ci      state.material.specular        (r,g,b,a)   front specular material color
29485bd8deadSopenharmony_ci      state.material.emission        (r,g,b,a)   front emissive material color
29495bd8deadSopenharmony_ci      state.material.shininess       (s,0,0,1)   front material shininess
29505bd8deadSopenharmony_ci      state.material.front.ambient   (r,g,b,a)   front ambient material color
29515bd8deadSopenharmony_ci      state.material.front.diffuse   (r,g,b,a)   front diffuse material color
29525bd8deadSopenharmony_ci      state.material.front.specular  (r,g,b,a)   front specular material color
29535bd8deadSopenharmony_ci      state.material.front.emission  (r,g,b,a)   front emissive material color
29545bd8deadSopenharmony_ci      state.material.front.shininess (s,0,0,1)   front material shininess
29555bd8deadSopenharmony_ci      state.material.back.ambient    (r,g,b,a)   back ambient material color
29565bd8deadSopenharmony_ci      state.material.back.diffuse    (r,g,b,a)   back diffuse material color
29575bd8deadSopenharmony_ci      state.material.back.specular   (r,g,b,a)   back specular material color
29585bd8deadSopenharmony_ci      state.material.back.emission   (r,g,b,a)   back emissive material color
29595bd8deadSopenharmony_ci      state.material.back.shininess  (s,0,0,1)   back material shininess
29605bd8deadSopenharmony_ci
29615bd8deadSopenharmony_ci      Table X.3.2:  Material Property Bindings.  If a material face is not
29625bd8deadSopenharmony_ci      specified in the binding, the front property is used.
29635bd8deadSopenharmony_ci
29645bd8deadSopenharmony_ci    If a program parameter binding matches any of the material properties
29655bd8deadSopenharmony_ci    listed in Table X.3.2, the program parameter variable is filled according
29665bd8deadSopenharmony_ci    to the table.  For ambient, diffuse, specular, or emissive colors, the
29675bd8deadSopenharmony_ci    "x", "y", "z", and "w" components are filled with the "r", "g", "b", and
29685bd8deadSopenharmony_ci    "a" components, respectively, of the corresponding material color.  For
29695bd8deadSopenharmony_ci    material shininess, the "x" component is filled with the material's
29705bd8deadSopenharmony_ci    specular exponent, and the "y", "z", and "w" components are filled with 0,
29715bd8deadSopenharmony_ci    0, and 1, respectively.  Bindings containing ".back" refer to the back
29725bd8deadSopenharmony_ci    material; all other bindings refer to the front material.
29735bd8deadSopenharmony_ci
29745bd8deadSopenharmony_ci    Material properties can be changed inside a Begin/End pair, either
29755bd8deadSopenharmony_ci    directly by calling Material, or indirectly through color material.
29765bd8deadSopenharmony_ci    However, such property changes are not guaranteed to update program
29775bd8deadSopenharmony_ci    parameter bindings until the following End command.  Program parameter
29785bd8deadSopenharmony_ci    variables bound to material properties changed inside a Begin/End pair are
29795bd8deadSopenharmony_ci    undefined until the following End command.
29805bd8deadSopenharmony_ci
29815bd8deadSopenharmony_ci
29825bd8deadSopenharmony_ci    Light Property Bindings
29835bd8deadSopenharmony_ci
29845bd8deadSopenharmony_ci      Binding                        Components  Underlying State
29855bd8deadSopenharmony_ci      -----------------------------  ----------  ----------------------------
29865bd8deadSopenharmony_ci      state.light[n].ambient         (r,g,b,a)   light n ambient color
29875bd8deadSopenharmony_ci      state.light[n].diffuse         (r,g,b,a)   light n diffuse color
29885bd8deadSopenharmony_ci      state.light[n].specular        (r,g,b,a)   light n specular color
29895bd8deadSopenharmony_ci      state.light[n].position        (x,y,z,w)   light n position
29905bd8deadSopenharmony_ci      state.light[n].attenuation     (a,b,c,e)   light n attenuation constants
29915bd8deadSopenharmony_ci                                                 and spot light exponent
29925bd8deadSopenharmony_ci      state.light[n].spot.direction  (x,y,z,c)   light n spot direction and
29935bd8deadSopenharmony_ci                                                 cutoff angle cosine
29945bd8deadSopenharmony_ci      state.light[n].half            (x,y,z,1)   light n infinite half-angle
29955bd8deadSopenharmony_ci      state.lightmodel.ambient       (r,g,b,a)   light model ambient color
29965bd8deadSopenharmony_ci      state.lightmodel.scenecolor    (r,g,b,a)   light model front scene color
29975bd8deadSopenharmony_ci      state.lightmodel.              (r,g,b,a)   light model front scene color
29985bd8deadSopenharmony_ci               front.scenecolor
29995bd8deadSopenharmony_ci      state.lightmodel.              (r,g,b,a)   light model back scene color
30005bd8deadSopenharmony_ci               back.scenecolor
30015bd8deadSopenharmony_ci      state.lightprod[n].ambient     (r,g,b,a)   light n / front material
30025bd8deadSopenharmony_ci                                                 ambient color product
30035bd8deadSopenharmony_ci      state.lightprod[n].diffuse     (r,g,b,a)   light n / front material
30045bd8deadSopenharmony_ci                                                 diffuse color product
30055bd8deadSopenharmony_ci      state.lightprod[n].specular    (r,g,b,a)   light n / front material
30065bd8deadSopenharmony_ci                                                 specular color product
30075bd8deadSopenharmony_ci      state.lightprod[n].            (r,g,b,a)   light n / front material
30085bd8deadSopenharmony_ci              front.ambient                      ambient color product
30095bd8deadSopenharmony_ci      state.lightprod[n].            (r,g,b,a)   light n / front material
30105bd8deadSopenharmony_ci              front.diffuse                      diffuse color product
30115bd8deadSopenharmony_ci      state.lightprod[n].            (r,g,b,a)   light n / front material
30125bd8deadSopenharmony_ci              front.specular                     specular color product
30135bd8deadSopenharmony_ci      state.lightprod[n].            (r,g,b,a)   light n / back material
30145bd8deadSopenharmony_ci              back.ambient                       ambient color product
30155bd8deadSopenharmony_ci      state.lightprod[n].            (r,g,b,a)   light n / back material
30165bd8deadSopenharmony_ci              back.diffuse                       diffuse color product
30175bd8deadSopenharmony_ci      state.lightprod[n].            (r,g,b,a)   light n / back material
30185bd8deadSopenharmony_ci              back.specular                      specular color product
30195bd8deadSopenharmony_ci
30205bd8deadSopenharmony_ci      Table X.3.3: Light Property Bindings.  <n> indicates a light number.
30215bd8deadSopenharmony_ci
30225bd8deadSopenharmony_ci    If a program parameter binding matches "state.light[n].ambient",
30235bd8deadSopenharmony_ci    "state.light[n].diffuse", or "state.light[n].specular", the "x", "y", "z",
30245bd8deadSopenharmony_ci    and "w" components of the program parameter variable are filled with the
30255bd8deadSopenharmony_ci    "r", "g", "b", and "a" components, respectively, of the corresponding
30265bd8deadSopenharmony_ci    light color.
30275bd8deadSopenharmony_ci
30285bd8deadSopenharmony_ci    If a program parameter binding matches "state.light[n].position", the "x",
30295bd8deadSopenharmony_ci    "y", "z", and "w" components of the program parameter variable are filled
30305bd8deadSopenharmony_ci    with the "x", "y", "z", and "w" components, respectively, of the light
30315bd8deadSopenharmony_ci    position.
30325bd8deadSopenharmony_ci    
30335bd8deadSopenharmony_ci    If a program parameter binding matches "state.light[n].attenuation", the
30345bd8deadSopenharmony_ci    "x", "y", and "z" components of the program parameter variable are filled
30355bd8deadSopenharmony_ci    with the constant, linear, and quadratic attenuation parameters of the
30365bd8deadSopenharmony_ci    specified light, respectively (section 2.13.1).  The "w" component of the
30375bd8deadSopenharmony_ci    program parameter variable is filled with the spot light exponent of the
30385bd8deadSopenharmony_ci    specified light.
30395bd8deadSopenharmony_ci
30405bd8deadSopenharmony_ci    If a program parameter binding matches "state.light[n].spot.direction",
30415bd8deadSopenharmony_ci    the "x", "y", and "z" components of the program parameter variable are
30425bd8deadSopenharmony_ci    filled with the "x", "y", and "z" components of the spot light direction
30435bd8deadSopenharmony_ci    of the specified light, respectively (section 2.13.1).  The "w" component
30445bd8deadSopenharmony_ci    of the program parameter variable is filled with the cosine of the spot
30455bd8deadSopenharmony_ci    light cutoff angle of the specified light.
30465bd8deadSopenharmony_ci
30475bd8deadSopenharmony_ci    If a program parameter binding matches "state.light[n].half", the "x",
30485bd8deadSopenharmony_ci    "y", and "z" components of the program parameter variable are filled with
30495bd8deadSopenharmony_ci    the x, y, and z components, respectively, of the normalized infinite
30505bd8deadSopenharmony_ci    half-angle vector
30515bd8deadSopenharmony_ci
30525bd8deadSopenharmony_ci      h_inf = || P + (0, 0, 1) ||.
30535bd8deadSopenharmony_ci
30545bd8deadSopenharmony_ci    The "w" component is filled with 1.  In the computation of h_inf, P
30555bd8deadSopenharmony_ci    consists of the x, y, and z coordinates of the normalized vector from the
30565bd8deadSopenharmony_ci    eye position P_e to the eye-space light position P_pli (section 2.13.1).
30575bd8deadSopenharmony_ci    h_inf is defined to correspond to the normalized half-angle vector when
30585bd8deadSopenharmony_ci    using an infinite light (w coordinate of the position is zero) and an
30595bd8deadSopenharmony_ci    infinite viewer (v_bs is FALSE).  For local lights or a local viewer,
30605bd8deadSopenharmony_ci    h_inf is well-defined but does not match the normalized half-angle vector,
30615bd8deadSopenharmony_ci    which will vary depending on the vertex position.
30625bd8deadSopenharmony_ci
30635bd8deadSopenharmony_ci    If a program parameter binding matches "state.lightmodel.ambient", the
30645bd8deadSopenharmony_ci    "x", "y", "z", and "w" components of the program parameter variable are
30655bd8deadSopenharmony_ci    filled with the "r", "g", "b", and "a" components of the light model
30665bd8deadSopenharmony_ci    ambient color, respectively.
30675bd8deadSopenharmony_ci
30685bd8deadSopenharmony_ci    If a program parameter binding matches "state.lightmodel.scenecolor" or
30695bd8deadSopenharmony_ci    "state.lightmodel.front.scenecolor", the "x", "y", and "z" components of
30705bd8deadSopenharmony_ci    the program parameter variable are filled with the "r", "g", and "b"
30715bd8deadSopenharmony_ci    components respectively of the "front scene color"
30725bd8deadSopenharmony_ci
30735bd8deadSopenharmony_ci      c_scene = a_cs * a_cm + e_cm,
30745bd8deadSopenharmony_ci
30755bd8deadSopenharmony_ci    where a_cs is the light model ambient color, a_cm is the front ambient
30765bd8deadSopenharmony_ci    material color, and e_cm is the front emissive material color.  The "w"
30775bd8deadSopenharmony_ci    component of the program parameter variable is filled with the alpha
30785bd8deadSopenharmony_ci    component of the front diffuse material color.  If a program parameter
30795bd8deadSopenharmony_ci    binding matches "state.lightmodel.back.scenecolor", a similar back scene
30805bd8deadSopenharmony_ci    color, computed using back-facing material properties, is used.  The front
30815bd8deadSopenharmony_ci    and back scene colors match the values that would be assigned to vertices
30825bd8deadSopenharmony_ci    using conventional lighting if all lights were disabled.
30835bd8deadSopenharmony_ci
30845bd8deadSopenharmony_ci    If a program parameter binding matches anything beginning with
30855bd8deadSopenharmony_ci    "state.lightprod[n]", the "x", "y", and "z" components of the program
30865bd8deadSopenharmony_ci    parameter variable are filled with the "r", "g", and "b" components,
30875bd8deadSopenharmony_ci    respectively, of the corresponding light product.  The three light product
30885bd8deadSopenharmony_ci    components are the products of the corresponding color components of the
30895bd8deadSopenharmony_ci    specified material property and the light color of the specified light
30905bd8deadSopenharmony_ci    (see Table X.3.3).  The "w" component of the program parameter variable is
30915bd8deadSopenharmony_ci    filled with the alpha component of the specified material property.
30925bd8deadSopenharmony_ci
30935bd8deadSopenharmony_ci    Light products depend on material properties, which can be changed inside
30945bd8deadSopenharmony_ci    a Begin/End pair.  Such property changes are not guaranteed to take effect
30955bd8deadSopenharmony_ci    until the following End command.  Program parameter variables bound to
30965bd8deadSopenharmony_ci    light products whose corresponding material property changes inside a
30975bd8deadSopenharmony_ci    Begin/End pair are undefined until the following End command.
30985bd8deadSopenharmony_ci
30995bd8deadSopenharmony_ci
31005bd8deadSopenharmony_ci    Texture Coordinate Generation Property Bindings
31015bd8deadSopenharmony_ci
31025bd8deadSopenharmony_ci      Binding                    Components  Underlying State
31035bd8deadSopenharmony_ci      -------------------------  ----------  ----------------------------
31045bd8deadSopenharmony_ci      state.texgen[n].eye.s      (a,b,c,d)   TexGen eye linear plane
31055bd8deadSopenharmony_ci                                             coefficients, s coord, unit n
31065bd8deadSopenharmony_ci      state.texgen[n].eye.t      (a,b,c,d)   TexGen eye linear plane
31075bd8deadSopenharmony_ci                                             coefficients, t coord, unit n
31085bd8deadSopenharmony_ci      state.texgen[n].eye.r      (a,b,c,d)   TexGen eye linear plane
31095bd8deadSopenharmony_ci                                             coefficients, r coord, unit n
31105bd8deadSopenharmony_ci      state.texgen[n].eye.q      (a,b,c,d)   TexGen eye linear plane
31115bd8deadSopenharmony_ci                                             coefficients, q coord, unit n
31125bd8deadSopenharmony_ci      state.texgen[n].object.s   (a,b,c,d)   TexGen object linear plane
31135bd8deadSopenharmony_ci                                             coefficients, s coord, unit n
31145bd8deadSopenharmony_ci      state.texgen[n].object.t   (a,b,c,d)   TexGen object linear plane
31155bd8deadSopenharmony_ci                                             coefficients, t coord, unit n
31165bd8deadSopenharmony_ci      state.texgen[n].object.r   (a,b,c,d)   TexGen object linear plane
31175bd8deadSopenharmony_ci                                             coefficients, r coord, unit n
31185bd8deadSopenharmony_ci      state.texgen[n].object.q   (a,b,c,d)   TexGen object linear plane
31195bd8deadSopenharmony_ci                                             coefficients, q coord, unit n
31205bd8deadSopenharmony_ci
31215bd8deadSopenharmony_ci      Table X.3.4:  Texture Coordinate Generation Property Bindings.  "[n]" is
31225bd8deadSopenharmony_ci      optional -- texture unit <n> is used if specified; texture unit 0 is
31235bd8deadSopenharmony_ci      used otherwise.
31245bd8deadSopenharmony_ci
31255bd8deadSopenharmony_ci    If a program parameter binding matches a set of TexGen plane coefficients,
31265bd8deadSopenharmony_ci    the "x", "y", "z", and "w" components of the program parameter variable
31275bd8deadSopenharmony_ci    are filled with the coefficients p1, p2, p3, and p4, respectively, for
31285bd8deadSopenharmony_ci    object linear coefficients, and the coefficents p1', p2', p3', and p4',
31295bd8deadSopenharmony_ci    respectively, for eye linear coefficients (section 2.10.4).
31305bd8deadSopenharmony_ci
31315bd8deadSopenharmony_ci
31325bd8deadSopenharmony_ci    Fog Property Bindings
31335bd8deadSopenharmony_ci
31345bd8deadSopenharmony_ci      Binding                        Components  Underlying State
31355bd8deadSopenharmony_ci      -----------------------------  ----------  ----------------------------
31365bd8deadSopenharmony_ci      state.fog.color                (r,g,b,a)   RGB fog color (section 3.10)
31375bd8deadSopenharmony_ci      state.fog.params               (d,s,e,r)   fog density, linear start
31385bd8deadSopenharmony_ci                                                 and end, and 1/(end-start)
31395bd8deadSopenharmony_ci                                                 (section 3.10) 
31405bd8deadSopenharmony_ci
31415bd8deadSopenharmony_ci      Table X.3.5:  Fog Property Bindings
31425bd8deadSopenharmony_ci
31435bd8deadSopenharmony_ci    If a program parameter binding matches "state.fog.color", the "x", "y",
31445bd8deadSopenharmony_ci    "z", and "w" components of the program parameter variable are filled with
31455bd8deadSopenharmony_ci    the "r", "g", "b", and "a" components, respectively, of the fog color
31465bd8deadSopenharmony_ci    (section 3.10).
31475bd8deadSopenharmony_ci
31485bd8deadSopenharmony_ci    If a program parameter binding matches "state.fog.params", the "x", "y",
31495bd8deadSopenharmony_ci    and "z" components of the program parameter variable are filled with the
31505bd8deadSopenharmony_ci    fog density, linear fog start, and linear fog end parameters (section
31515bd8deadSopenharmony_ci    3.10), respectively.  The "w" component is filled with 1/(end-start),
31525bd8deadSopenharmony_ci    where end and start are the linear fog end and start parameters,
31535bd8deadSopenharmony_ci    respectively.
31545bd8deadSopenharmony_ci
31555bd8deadSopenharmony_ci
31565bd8deadSopenharmony_ci    Clip Plane Property Bindings
31575bd8deadSopenharmony_ci
31585bd8deadSopenharmony_ci      Binding                        Components  Underlying State
31595bd8deadSopenharmony_ci      -----------------------------  ----------  ----------------------------
31605bd8deadSopenharmony_ci      state.clip[n].plane            (a,b,c,d)   clip plane n coefficients
31615bd8deadSopenharmony_ci
31625bd8deadSopenharmony_ci      Table X.3.6:  Clip Plane Property Bindings.  <n> specifies the clip
31635bd8deadSopenharmony_ci      plane number, and is required.
31645bd8deadSopenharmony_ci
31655bd8deadSopenharmony_ci    If a program parameter binding matches "state.clip[n].plane", the "x",
31665bd8deadSopenharmony_ci    "y", "z", and "w" components of the program parameter variable are filled
31675bd8deadSopenharmony_ci    with the coefficients p1', p2', p3', and p4', respectively, of clip plane
31685bd8deadSopenharmony_ci    <n> (section 2.11).
31695bd8deadSopenharmony_ci
31705bd8deadSopenharmony_ci
31715bd8deadSopenharmony_ci    Point Property Bindings
31725bd8deadSopenharmony_ci
31735bd8deadSopenharmony_ci      Binding                        Components  Underlying State
31745bd8deadSopenharmony_ci      -----------------------------  ----------  ----------------------------
31755bd8deadSopenharmony_ci      state.point.size               (s,n,x,f)   point size, min and max size
31765bd8deadSopenharmony_ci                                                 clamps, and fade threshold
31775bd8deadSopenharmony_ci                                                 (section 3.3) 
31785bd8deadSopenharmony_ci      state.point.attenuation        (a,b,c,1)   point size attenuation consts
31795bd8deadSopenharmony_ci
31805bd8deadSopenharmony_ci      Table X.3.7:  Point Property Bindings
31815bd8deadSopenharmony_ci
31825bd8deadSopenharmony_ci    If a program parameter binding matches "state.point.size", the "x", "y",
31835bd8deadSopenharmony_ci    "z", and "w" components of the program parameter variable are filled with
31845bd8deadSopenharmony_ci    the point size, minimum point size, maximum point size, and fade
31855bd8deadSopenharmony_ci    threshold, respectively (section 3.3).
31865bd8deadSopenharmony_ci
31875bd8deadSopenharmony_ci    If a program parameter binding matches "state.point.attenuation", the "x",
31885bd8deadSopenharmony_ci    "y", and "z" components of the program parameter variable are filled with
31895bd8deadSopenharmony_ci    the constant, linear, and quadratic point size attenuation parameters (a,
31905bd8deadSopenharmony_ci    b, and c), respectively (section 3.3).  The "w" component is filled with
31915bd8deadSopenharmony_ci    1.
31925bd8deadSopenharmony_ci
31935bd8deadSopenharmony_ci
31945bd8deadSopenharmony_ci    Matrix Property Bindings
31955bd8deadSopenharmony_ci
31965bd8deadSopenharmony_ci      Binding                               Underlying State
31975bd8deadSopenharmony_ci      ------------------------------------  ---------------------------
31985bd8deadSopenharmony_ci      * state.matrix.modelview[n]           modelview matrix n
31995bd8deadSopenharmony_ci        state.matrix.projection             projection matrix
32005bd8deadSopenharmony_ci        state.matrix.mvp                    modelview-projection matrix
32015bd8deadSopenharmony_ci      * state.matrix.texture[n]             texture matrix n
32025bd8deadSopenharmony_ci        state.matrix.palette[n]             modelview palette matrix n
32035bd8deadSopenharmony_ci        state.matrix.program[n]             program matrix n
32045bd8deadSopenharmony_ci
32055bd8deadSopenharmony_ci      Table X.3.8:  Base Matrix Property Bindings.  The "[n]" syntax indicates
32065bd8deadSopenharmony_ci      a specific matrix number.  For modelview and texture matrices, a matrix
32075bd8deadSopenharmony_ci      number is optional, and matrix zero will be used if the matrix number is
32085bd8deadSopenharmony_ci      omitted.  These base bindings may further be modified by a
32095bd8deadSopenharmony_ci      inverse/transpose selector and a row selector.
32105bd8deadSopenharmony_ci
32115bd8deadSopenharmony_ci    If the beginning of a program parameter binding matches any of the matrix
32125bd8deadSopenharmony_ci    binding names listed in Table X.3.8, the binding corresponds to a 4x4
32135bd8deadSopenharmony_ci    matrix.  If the parameter binding is followed by ".inverse", ".transpose",
32145bd8deadSopenharmony_ci    or ".invtrans" (<stateMatModifier> grammar rule), the inverse, transpose,
32155bd8deadSopenharmony_ci    or transpose of the inverse, respectively, of the matrix specified in
32165bd8deadSopenharmony_ci    Table X.3.8 is selected.  Otherwise, the matrix specified in Table X.3.8
32175bd8deadSopenharmony_ci    is selected.  If the specified matrix is poorly-conditioned (singular or
32185bd8deadSopenharmony_ci    nearly so), its inverse matrix is undefined.  The binding name
32195bd8deadSopenharmony_ci    "state.matrix.mvp" refers to the product of modelview matrix zero and the
32205bd8deadSopenharmony_ci    projection matrix, defined as
32215bd8deadSopenharmony_ci
32225bd8deadSopenharmony_ci       MVP = P * M0,
32235bd8deadSopenharmony_ci
32245bd8deadSopenharmony_ci    where P is the projection matrix and M0 is modelview matrix zero.
32255bd8deadSopenharmony_ci
32265bd8deadSopenharmony_ci    If the selected matrix is followed by ".row[<a>]" (matching the
32275bd8deadSopenharmony_ci    <stateMatrixRow> grammar rule), the "x", "y", "z", and "w" components of
32285bd8deadSopenharmony_ci    the program parameter variable are filled with the four entries of row <a>
32295bd8deadSopenharmony_ci    of the selected matrix.  In the example,
32305bd8deadSopenharmony_ci
32315bd8deadSopenharmony_ci      PARAM m0 = state.matrix.modelview[1].row[0];
32325bd8deadSopenharmony_ci      PARAM m1 = state.matrix.projection.transpose.row[3];
32335bd8deadSopenharmony_ci
32345bd8deadSopenharmony_ci    the variable "m0" is set to the first row (row 0) of modelview matrix 1
32355bd8deadSopenharmony_ci    and "m1" is set to the last row (row 3) of the transpose of the projection
32365bd8deadSopenharmony_ci    matrix.
32375bd8deadSopenharmony_ci
32385bd8deadSopenharmony_ci    For program parameter array bindings, multiple rows of the selected matrix
32395bd8deadSopenharmony_ci    can be bound via the <stateMatrixRows> grammar rule.  If the selected
32405bd8deadSopenharmony_ci    matrix binding is followed by ".row[<a>..<b>]", the result is equivalent
32415bd8deadSopenharmony_ci    to specifying matrix rows <a> through <b>, in order.  A program will fail
32425bd8deadSopenharmony_ci    to load if <a> is greater than <b>.  If no row selection is specified
32435bd8deadSopenharmony_ci    (<optMatrixRows> matches ""), matrix rows 0 through 3 are bound in order.
32445bd8deadSopenharmony_ci    In the example,
32455bd8deadSopenharmony_ci
32465bd8deadSopenharmony_ci      PARAM m2[] = { state.matrix.program[0].row[1..2] };
32475bd8deadSopenharmony_ci      PARAM m3[] = { state.matrix.program[0].transpose };
32485bd8deadSopenharmony_ci
32495bd8deadSopenharmony_ci    the array "m2" has two entries, containing rows 1 and 2 of program matrix
32505bd8deadSopenharmony_ci    zero, and "m3" has four entries, containing all four rows of the transpose
32515bd8deadSopenharmony_ci    of program matrix zero.
32525bd8deadSopenharmony_ci
32535bd8deadSopenharmony_ci
32545bd8deadSopenharmony_ci    Program Parameter Arrays
32555bd8deadSopenharmony_ci
32565bd8deadSopenharmony_ci    A program parameter array variable can be declared explicitly by matching
32575bd8deadSopenharmony_ci    the <PARAM_multipleStmt> grammar rule.  Programs can optionally specify
32585bd8deadSopenharmony_ci    the number of individual program parameters in the array, using the
32595bd8deadSopenharmony_ci    <optArraySize> grammar rule.  Program parameter arrays may not be declared
32605bd8deadSopenharmony_ci    implicity.
32615bd8deadSopenharmony_ci
32625bd8deadSopenharmony_ci    Individual parameter variables in a program parameter array are bound to
32635bd8deadSopenharmony_ci    GL state vectors or constant vectors as specified by the grammar rule
32645bd8deadSopenharmony_ci    <paramMultInitList>.  Each individual parameter in the array is bound in
32655bd8deadSopenharmony_ci    turn as described above.  
32665bd8deadSopenharmony_ci
32675bd8deadSopenharmony_ci    The total number of entries in the array is equal to the number of
32685bd8deadSopenharmony_ci    parameters bound in the initializer list.  A vertex program that specifies
32695bd8deadSopenharmony_ci    an array size (<optArraySize> matches <integer>) that does not match the
32705bd8deadSopenharmony_ci    number of parameter bindings in the initialization list will fail to load.
32715bd8deadSopenharmony_ci
32725bd8deadSopenharmony_ci    Program parameter array variables may be accessed using absolute
32735bd8deadSopenharmony_ci    addressing by matching the <progParamArrayAbs> grammar rule, or relative
32745bd8deadSopenharmony_ci    addressing by matching the <progParamArrayRel> grammar rule.
32755bd8deadSopenharmony_ci
32765bd8deadSopenharmony_ci    Array accesses using absolute addressing are checked against the limits of
32775bd8deadSopenharmony_ci    the array.  If any vertex program instruction accesses a program parameter
32785bd8deadSopenharmony_ci    array using absolute addressing with an out-of-range index (greater than
32795bd8deadSopenharmony_ci    or equal to the size of the array), the vertex program will fail to load.
32805bd8deadSopenharmony_ci
32815bd8deadSopenharmony_ci    Individual state vectors can have no more than one unique binding in any
32825bd8deadSopenharmony_ci    given program.  The GL will automatically combine multiple bindings of the
32835bd8deadSopenharmony_ci    same state vector into a single unique binding, except for the case where
32845bd8deadSopenharmony_ci    a state vector is bound multiple times in program parameter arrays
32855bd8deadSopenharmony_ci    accessed using relative addressing.  A vertex program will fail to load if
32865bd8deadSopenharmony_ci    any GL state vector is bound multiple times in a single array accessed
32875bd8deadSopenharmony_ci    using relative addressing or bound once in two or more arrays accessed
32885bd8deadSopenharmony_ci    using relative addressing.
32895bd8deadSopenharmony_ci
32905bd8deadSopenharmony_ci
32915bd8deadSopenharmony_ci    Section 2.14.3.3,  Vertex Program Temporaries
32925bd8deadSopenharmony_ci
32935bd8deadSopenharmony_ci    Vertex program temporary variables are a set of four-component
32945bd8deadSopenharmony_ci    floating-point vectors used to hold temporary results during vertex
32955bd8deadSopenharmony_ci    program execution.  Temporaries do not persist between program
32965bd8deadSopenharmony_ci    invocations, and are undefined at the beginning of each vertex program
32975bd8deadSopenharmony_ci    invocation.
32985bd8deadSopenharmony_ci
32995bd8deadSopenharmony_ci    Vertex program temporary variables can be declared explicitly using the
33005bd8deadSopenharmony_ci    <TEMP_statement> grammar rule.  Each such statement can declare one or
33015bd8deadSopenharmony_ci    more temporaries.  Vertex program temporary variables can not be declared
33025bd8deadSopenharmony_ci    implicitly.
33035bd8deadSopenharmony_ci
33045bd8deadSopenharmony_ci
33055bd8deadSopenharmony_ci    Section 2.14.3.4,  Vertex Program Results
33065bd8deadSopenharmony_ci
33075bd8deadSopenharmony_ci    Vertex program result variables are a set of four-component floating-point
33085bd8deadSopenharmony_ci    vectors used to hold the final results of a vertex program.  Vertex
33095bd8deadSopenharmony_ci    program result variables are write-only during vertex program execution.
33105bd8deadSopenharmony_ci
33115bd8deadSopenharmony_ci    Vertex program result variables can be declared explicitly using the
33125bd8deadSopenharmony_ci    <OUTPUT_statement> grammar rule, or implicitly using the <resultBinding>
33135bd8deadSopenharmony_ci    grammar rule in an executable instruction.  Each vertex program result
33145bd8deadSopenharmony_ci    variable is bound to a transformed vertex attribute used during primitive
33155bd8deadSopenharmony_ci    assembly and rasterization.  The set of vertex program result variable
33165bd8deadSopenharmony_ci    bindings is given in Table X.4.
33175bd8deadSopenharmony_ci
33185bd8deadSopenharmony_ci      Binding                        Components  Description
33195bd8deadSopenharmony_ci      -----------------------------  ----------  ----------------------------
33205bd8deadSopenharmony_ci      result.position                (x,y,z,w)   position in clip coordinates
33215bd8deadSopenharmony_ci      result.color                   (r,g,b,a)   front-facing primary color
33225bd8deadSopenharmony_ci      result.color.primary           (r,g,b,a)   front-facing primary color
33235bd8deadSopenharmony_ci      result.color.secondary         (r,g,b,a)   front-facing secondary color
33245bd8deadSopenharmony_ci      result.color.front             (r,g,b,a)   front-facing primary color
33255bd8deadSopenharmony_ci      result.color.front.primary     (r,g,b,a)   front-facing primary color
33265bd8deadSopenharmony_ci      result.color.front.secondary   (r,g,b,a)   front-facing secondary color
33275bd8deadSopenharmony_ci      result.color.back              (r,g,b,a)   back-facing primary color
33285bd8deadSopenharmony_ci      result.color.back.primary      (r,g,b,a)   back-facing primary color
33295bd8deadSopenharmony_ci      result.color.back.secondary    (r,g,b,a)   back-facing secondary color
33305bd8deadSopenharmony_ci      result.fogcoord                (f,*,*,*)   fog coordinate
33315bd8deadSopenharmony_ci      result.pointsize               (s,*,*,*)   point size
33325bd8deadSopenharmony_ci      result.texcoord                (s,t,r,q)   texture coordinate, unit 0
33335bd8deadSopenharmony_ci      result.texcoord[n]             (s,t,r,q)   texture coordinate, unit n
33345bd8deadSopenharmony_ci
33355bd8deadSopenharmony_ci      Table X.4:  Vertex Result Variable Bindings.  Components labeled "*" are
33365bd8deadSopenharmony_ci      unused.
33375bd8deadSopenharmony_ci
33385bd8deadSopenharmony_ci    If a result variable binding matches "result.position", updates to the
33395bd8deadSopenharmony_ci    "x", "y", "z", and "w" components of the result variable modify the "x",
33405bd8deadSopenharmony_ci    "y", "z", and "w" components, respectively, of the transformed vertex's
33415bd8deadSopenharmony_ci    clip coordinates.  Final window coordinates will be generated for the
33425bd8deadSopenharmony_ci    vertex as described in section 2.14.4.4.
33435bd8deadSopenharmony_ci
33445bd8deadSopenharmony_ci    If a result variable binding match begins with "result.color", updates to
33455bd8deadSopenharmony_ci    the "x", "y", "z", and "w" components of the result variable modify the
33465bd8deadSopenharmony_ci    "r", "g", "b", and "a" components, respectively, of the corresponding
33475bd8deadSopenharmony_ci    vertex color attribute in Table X.4.  Color bindings that do not specify
33485bd8deadSopenharmony_ci    "front" or "back" are consided to refer to front-facing colors.  Color
33495bd8deadSopenharmony_ci    bindings that do not specify "primary" or "secondary" are considered to
33505bd8deadSopenharmony_ci    refer to primary colors.
33515bd8deadSopenharmony_ci
33525bd8deadSopenharmony_ci    If a result variable binding matches "result.fogcoord", updates to the "x"
33535bd8deadSopenharmony_ci    component of the result variable set the transformed vertex's fog
33545bd8deadSopenharmony_ci    coordinate.  Updates to the "y", "z", and "w" components of the result
33555bd8deadSopenharmony_ci    variable have no effect.
33565bd8deadSopenharmony_ci
33575bd8deadSopenharmony_ci    If a result variable binding matches "result.pointsize", updates to the
33585bd8deadSopenharmony_ci    "x" component of the result variable set the transformed vertex's point
33595bd8deadSopenharmony_ci    size.  Updates to the "y", "z", and "w" components of the result variable
33605bd8deadSopenharmony_ci    have no effect.
33615bd8deadSopenharmony_ci
33625bd8deadSopenharmony_ci    If a result variable binding matches "result.texcoord" or
33635bd8deadSopenharmony_ci    "result.texcoord[n]", updates to the "x", "y", "z", and "w" components of
33645bd8deadSopenharmony_ci    the result variable set the "s", "t", "r" and "q" components,
33655bd8deadSopenharmony_ci    respectively, of the transformed vertex's texture coordinates for texture
33665bd8deadSopenharmony_ci    unit <n>.  If "[n]" is omitted, texture unit zero is selected.
33675bd8deadSopenharmony_ci
33685bd8deadSopenharmony_ci    When in vertex program mode, all attributes of a transformed vertex are
33695bd8deadSopenharmony_ci    undefined at each vertex program invocation.  Any results, or even
33705bd8deadSopenharmony_ci    individual components of results, that are not written to during vertex
33715bd8deadSopenharmony_ci    program execution remain undefined.
33725bd8deadSopenharmony_ci
33735bd8deadSopenharmony_ci
33745bd8deadSopenharmony_ci    Section 2.14.3.5,  Vertex Program Address Registers
33755bd8deadSopenharmony_ci
33765bd8deadSopenharmony_ci    Vertex program address register variables are a set of four-component
33775bd8deadSopenharmony_ci    signed integer vectors where only the "x" component of the address
33785bd8deadSopenharmony_ci    registers is currently accessible.  Address registers are used as indices
33795bd8deadSopenharmony_ci    when performing relative addressing in program parameter arrays (section
33805bd8deadSopenharmony_ci    2.14.4.2).
33815bd8deadSopenharmony_ci
33825bd8deadSopenharmony_ci    Vertex program address registers can be declared explicitly using the
33835bd8deadSopenharmony_ci    <ADDRESS_statement> grammar rule.  Each such statement can declare one or
33845bd8deadSopenharmony_ci    more address registers.  Vertex program address registers can not be
33855bd8deadSopenharmony_ci    declared implicitly.
33865bd8deadSopenharmony_ci
33875bd8deadSopenharmony_ci    Vertex program address register variables are undefined at each vertex
33885bd8deadSopenharmony_ci    program invocation.  Address registers can be written by the ARL
33895bd8deadSopenharmony_ci    instruction (section 2.14.5.3), and will be read when a program uses
33905bd8deadSopenharmony_ci    relative addressing in program parameter arrays.
33915bd8deadSopenharmony_ci
33925bd8deadSopenharmony_ci
33935bd8deadSopenharmony_ci    Section 2.14.3.6, Vertex Program Aliases
33945bd8deadSopenharmony_ci
33955bd8deadSopenharmony_ci    Vertex programs can create aliases by matching the <ALIAS_statement>
33965bd8deadSopenharmony_ci    grammar rule.  Aliases allow programs to use multiple variable names to
33975bd8deadSopenharmony_ci    refer to a single underlying variable.  For example, the statement
33985bd8deadSopenharmony_ci
33995bd8deadSopenharmony_ci      ALIAS var1 = var0
34005bd8deadSopenharmony_ci
34015bd8deadSopenharmony_ci    establishes a variable name named "var1".  Subsequent references to "var1"
34025bd8deadSopenharmony_ci    in the program text are treated as references to "var0".  The left hand
34035bd8deadSopenharmony_ci    side of an ALIAS statement must be a new variable name, and the right hand
34045bd8deadSopenharmony_ci    side must be an established variable name.
34055bd8deadSopenharmony_ci
34065bd8deadSopenharmony_ci    Aliases are not considered variable declarations, so do not count against
34075bd8deadSopenharmony_ci    the limits on the number of variable declarations allowed in the program
34085bd8deadSopenharmony_ci    text.
34095bd8deadSopenharmony_ci
34105bd8deadSopenharmony_ci
34115bd8deadSopenharmony_ci    Section 2.14.3.7, Vertex Program Resource Limits
34125bd8deadSopenharmony_ci
34135bd8deadSopenharmony_ci    The vertex program execution environment provides implementation-dependent
34145bd8deadSopenharmony_ci    resource limits on the number of instructions, temporary variable
34155bd8deadSopenharmony_ci    declarations, vertex attribute bindings, address register declarations,
34165bd8deadSopenharmony_ci    and program parameter bindings.  A program that exceeds any of these
34175bd8deadSopenharmony_ci    resource limits will fail to load.  The resource limits for vertex
34185bd8deadSopenharmony_ci    programs can be queried by calling GetProgramiv (section 6.1.12) with a
34195bd8deadSopenharmony_ci    target of VERTEX_PROGRAM_ARB.
34205bd8deadSopenharmony_ci
34215bd8deadSopenharmony_ci    The limit on vertex program instructions can be queried with a <pname> of
34225bd8deadSopenharmony_ci    MAX_PROGRAM_INSTRUCTIONS_ARB, and must be at least 128.  Each instruction
34235bd8deadSopenharmony_ci    in the program (matching the <instruction> grammar rule) counts against
34245bd8deadSopenharmony_ci    this limit.
34255bd8deadSopenharmony_ci
34265bd8deadSopenharmony_ci    The limit on vertex program temporary variable declarations can be queried
34275bd8deadSopenharmony_ci    with a <pname> of MAX_PROGRAM_TEMPORARIES_ARB, and must be at least 12.
34285bd8deadSopenharmony_ci    Each temporary declared in the program, using the <TEMP_statement> grammar
34295bd8deadSopenharmony_ci    rule, counts against this limit.  Aliases of declared temporaries do not.
34305bd8deadSopenharmony_ci    
34315bd8deadSopenharmony_ci    The limit on vertex program attribute bindings can be queried with a
34325bd8deadSopenharmony_ci    <pname> of MAX_PROGRAM_ATTRIBS_ARB and must be at least 16.  Each distinct
34335bd8deadSopenharmony_ci    vertex attribute bound explicitly or implicitly in the program counts
34345bd8deadSopenharmony_ci    against this limit; vertex attributes bound multiple times count only
34355bd8deadSopenharmony_ci    once.
34365bd8deadSopenharmony_ci
34375bd8deadSopenharmony_ci    The limit on vertex program address register declarations can be queried
34385bd8deadSopenharmony_ci    with a <pname> of MAX_PROGRAM_ADDRESS_REGISTERS_ARB, and must be at least
34395bd8deadSopenharmony_ci    1.  Each address register declared in the program, using the
34405bd8deadSopenharmony_ci    <ADDRESS_statement> grammar rule, counts against this limit.
34415bd8deadSopenharmony_ci    
34425bd8deadSopenharmony_ci    The limit on vertex program parameter bindings can be queried with a
34435bd8deadSopenharmony_ci    <pname> of MAX_PROGRAM_PARAMETERS_ARB, and must be at least 96.  Each
34445bd8deadSopenharmony_ci    distinct GL state vector bound explicitly or implicitly in the program
34455bd8deadSopenharmony_ci    counts against this limit; GL state vectors bound multiple times count
34465bd8deadSopenharmony_ci    only once.  Each constant vector bound to an array accessed using relative
34475bd8deadSopenharmony_ci    addressing counts against this limit, even if the same constant vector is
34485bd8deadSopenharmony_ci    bound multiple times or in multiple arrays.  Every other constant vector
34495bd8deadSopenharmony_ci    bound in the program is counted if and only if an identical constant
34505bd8deadSopenharmony_ci    vector has not already been counted.  Two constant vectors are considered
34515bd8deadSopenharmony_ci    identical if the four component values are numerically equivalent.  Recall
34525bd8deadSopenharmony_ci    that scalar constants bound in a program are treated as vector constants
34535bd8deadSopenharmony_ci    with the scalar value replicated.  In the following code
34545bd8deadSopenharmony_ci
34555bd8deadSopenharmony_ci           PARAM arr1[4] = { {1,2,3,4}, {1,2,3,4}, {4,4,4,4}, {5,6,7,8} };
34565bd8deadSopenharmony_ci           PARAM arr2[3] = { {1,2,3,4}, {5,6,7,8}, {0,1,2,3} };
34575bd8deadSopenharmony_ci           PARAM x = {4,3,2,1};
34585bd8deadSopenharmony_ci           PARAM y = {1,2,3,4};
34595bd8deadSopenharmony_ci           PARAM z = 4;
34605bd8deadSopenharmony_ci           PARAM r = {4,3,2,1};
34615bd8deadSopenharmony_ci
34625bd8deadSopenharmony_ci    assume that arr1 is accessed using relative addressing but arr2 is not.
34635bd8deadSopenharmony_ci    The four constants in arr1 all count against the limit.  Only two other
34645bd8deadSopenharmony_ci    constants, {0,1,2,3} in arr2, and {4,3,2,1} in x, are counted; the other
34655bd8deadSopenharmony_ci    constants are identical to constants that had been previously counted.
34665bd8deadSopenharmony_ci
34675bd8deadSopenharmony_ci    In addition to the limits described above, the GL provides a similar set
34685bd8deadSopenharmony_ci    of implementation-dependent native resource limits.  These limits,
34695bd8deadSopenharmony_ci    specified in section 6.1.12, provide guidance as to whether the program is
34705bd8deadSopenharmony_ci    small enough to use a "native" mode where vertex programs may be executed
34715bd8deadSopenharmony_ci    with higher performance.  The native resource limits and usage counts are
34725bd8deadSopenharmony_ci    implementation-dependent and may not exactly correspond to limits and
34735bd8deadSopenharmony_ci    counts described above.  In particular, native resource consumption may be
34745bd8deadSopenharmony_ci    reduced by program optimizations performed by the GL, or increased due to
34755bd8deadSopenharmony_ci    emulation of non-native instructions.  Programs that satisfy the program
34765bd8deadSopenharmony_ci    resource limits described above, but whose native resource usage exceeds
34775bd8deadSopenharmony_ci    one or more native resource limits, are guaranteed to load but may execute
34785bd8deadSopenharmony_ci    suboptimally.
34795bd8deadSopenharmony_ci
34805bd8deadSopenharmony_ci    To assist in resource counting, the GL additionally provides GetProgram
34815bd8deadSopenharmony_ci    queries to determine the resource usage and native resource usage of the
34825bd8deadSopenharmony_ci    currently bound program, and to determine whether the bound program
34835bd8deadSopenharmony_ci    exceeds any native resource limit.
34845bd8deadSopenharmony_ci
34855bd8deadSopenharmony_ci
34865bd8deadSopenharmony_ci    Section 2.14.4,  Vertex Program Execution Environment
34875bd8deadSopenharmony_ci
34885bd8deadSopenharmony_ci    If vertex program mode is enabled, the currently bound vertex program is
34895bd8deadSopenharmony_ci    executed when a vertex is specified directly through the Vertex command,
34905bd8deadSopenharmony_ci    indirectly through vertex arrays or evaluators (section 5.1), or when the
34915bd8deadSopenharmony_ci    current raster position is updated.  
34925bd8deadSopenharmony_ci
34935bd8deadSopenharmony_ci    If vertex program mode is enabled and the currently bound program object
34945bd8deadSopenharmony_ci    does not contain a valid vertex program, the error INVALID_OPERATION will
34955bd8deadSopenharmony_ci    be generated by Begin, RasterPos, and any command that implicitly calls
34965bd8deadSopenharmony_ci    Begin (e.g., DrawArrays).
34975bd8deadSopenharmony_ci
34985bd8deadSopenharmony_ci    Vertex programs execute a sequence of instructions without
34995bd8deadSopenharmony_ci    branching.  Vertex programs begin by executing the first instruction in
35005bd8deadSopenharmony_ci    the program, and execute instructions in the order specified in the
35015bd8deadSopenharmony_ci    program until the last instruction is completed.
35025bd8deadSopenharmony_ci    
35035bd8deadSopenharmony_ci    There are twenty-seven vertex program instructions.  The instructions and
35045bd8deadSopenharmony_ci    their respective input and output parameters are summarized in Table X.5.
35055bd8deadSopenharmony_ci
35065bd8deadSopenharmony_ci      Instruction    Inputs  Output   Description
35075bd8deadSopenharmony_ci      -----------    ------  ------   --------------------------------
35085bd8deadSopenharmony_ci      ABS            v       v        absolute value
35095bd8deadSopenharmony_ci      ADD            v,v     v        add
35105bd8deadSopenharmony_ci      ARL            s       a        address register load
35115bd8deadSopenharmony_ci      DP3            v,v     ssss     3-component dot product
35125bd8deadSopenharmony_ci      DP4            v,v     ssss     4-component dot product
35135bd8deadSopenharmony_ci      DPH            v,v     ssss     homogeneous dot product
35145bd8deadSopenharmony_ci      DST            v,v     v        distance vector
35155bd8deadSopenharmony_ci      EX2            s       ssss     exponential base 2
35165bd8deadSopenharmony_ci      EXP            s       v        exponential base 2 (approximate)
35175bd8deadSopenharmony_ci      FLR            v       v        floor
35185bd8deadSopenharmony_ci      FRC            v       v        fraction
35195bd8deadSopenharmony_ci      LG2            s       ssss     logarithm base 2
35205bd8deadSopenharmony_ci      LIT            v       v        compute light coefficients
35215bd8deadSopenharmony_ci      LOG            s       v        logarithm base 2 (approximate)
35225bd8deadSopenharmony_ci      MAD            v,v,v   v        multiply and add
35235bd8deadSopenharmony_ci      MAX            v,v     v        maximum
35245bd8deadSopenharmony_ci      MIN            v,v     v        minimum
35255bd8deadSopenharmony_ci      MOV            v       v        move
35265bd8deadSopenharmony_ci      MUL            v,v     v        multiply
35275bd8deadSopenharmony_ci      POW            s,s     ssss     exponentiate
35285bd8deadSopenharmony_ci      RCP            s       ssss     reciprocal
35295bd8deadSopenharmony_ci      RSQ            s       ssss     reciprocal square root
35305bd8deadSopenharmony_ci      SGE            v,v     v        set on greater than or equal
35315bd8deadSopenharmony_ci      SLT            v,v     v        set on less than
35325bd8deadSopenharmony_ci      SUB            v,v     v        subtract
35335bd8deadSopenharmony_ci      SWZ            v       v        extended swizzle
35345bd8deadSopenharmony_ci      XPD            v,v     v        cross product
35355bd8deadSopenharmony_ci
35365bd8deadSopenharmony_ci      Table X.5:  Summary of vertex program instructions.  "v" indicates a
35375bd8deadSopenharmony_ci      floating-point vector input or output, "s" indicates a floating-point
35385bd8deadSopenharmony_ci      scalar input, "ssss" indicates a scalar output replicated across a
35395bd8deadSopenharmony_ci      4-component result vector, and "a" indicates a single address register
35405bd8deadSopenharmony_ci      component.
35415bd8deadSopenharmony_ci
35425bd8deadSopenharmony_ci
35435bd8deadSopenharmony_ci    Section 2.14.4.1, Vertex Program Operands
35445bd8deadSopenharmony_ci
35455bd8deadSopenharmony_ci    Most vertex program instructions operate on floating-point vectors or
35465bd8deadSopenharmony_ci    scalars, as indicated by the grammar rules <swizzleSrcReg> and
35475bd8deadSopenharmony_ci    <scalarSrcReg>, respectively.
35485bd8deadSopenharmony_ci
35495bd8deadSopenharmony_ci    Vector and scalar operands can be obtained from vertex attribute, program
35505bd8deadSopenharmony_ci    parameter, or temporary registers, as indicated by the <srcReg> rule.  For
35515bd8deadSopenharmony_ci    scalar operands, a single vector component is selected by the
35525bd8deadSopenharmony_ci    <scalarSuffix> rule, where the characters "x", "y", "z", and "w" select
35535bd8deadSopenharmony_ci    the x, y, z, and w components, respectively, of the vector.
35545bd8deadSopenharmony_ci
35555bd8deadSopenharmony_ci    Vector operands can be swizzled according to the <swizzleSuffix> rule.  In
35565bd8deadSopenharmony_ci    its most general form, the <swizzleSuffix> rule matches the pattern
35575bd8deadSopenharmony_ci    ".????" where each question mark is replaced with one of "x", "y", "z", or
35585bd8deadSopenharmony_ci    "w".  For such patterns, the x, y, z, and w components of the operand are
35595bd8deadSopenharmony_ci    taken from the vector components named by the first, second, third, and
35605bd8deadSopenharmony_ci    fourth character of the pattern, respectively.  For example, if the
35615bd8deadSopenharmony_ci    swizzle suffix is ".yzzx" and the specified source contains {2,8,9,0}, the
35625bd8deadSopenharmony_ci    swizzled operand used by the instruction is {8,9,9,2}.
35635bd8deadSopenharmony_ci
35645bd8deadSopenharmony_ci    If the <swizzleSuffix> rule matches "", it is treated as though it were
35655bd8deadSopenharmony_ci    ".xyzw".  If the <swizzleSuffix> rule matches (ignoring whitespace) ".x",
35665bd8deadSopenharmony_ci    ".y", ".z", or ".w", these are treated the same as ".xxxx", ".yyyy",
35675bd8deadSopenharmony_ci    ".zzzz", and ".wwww" respectively.
35685bd8deadSopenharmony_ci
35695bd8deadSopenharmony_ci    Floating-point scalar or vector operands can optionally be negated
35705bd8deadSopenharmony_ci    according to the <optionalSign> rule in <scalarSrcReg> and
35715bd8deadSopenharmony_ci    <swizzleSrcReg>.  If the <optionalSign> matches "-", each operand or
35725bd8deadSopenharmony_ci    operand component is negated.
35735bd8deadSopenharmony_ci
35745bd8deadSopenharmony_ci    The following pseudo-code spells out the operand generation process.  In
35755bd8deadSopenharmony_ci    the example, "float" is a floating-point scalar type, while "floatVec" is
35765bd8deadSopenharmony_ci    a four-component vector.  "source" refers to the register used for the
35775bd8deadSopenharmony_ci    operand, matching the <srcReg> rule.  "negate" is TRUE if the
35785bd8deadSopenharmony_ci    <optionalSign> rule in <scalarSrcReg> or <swizzleSrcReg> matches "-" and
35795bd8deadSopenharmony_ci    FALSE otherwise.  The ".c***", ".*c**", ".**c*", ".***c" modifiers refer
35805bd8deadSopenharmony_ci    to the x, y, z, and w components obtained by the swizzle operation; the
35815bd8deadSopenharmony_ci    ".c" modifier refers to the single component selected for a scalar load.
35825bd8deadSopenharmony_ci
35835bd8deadSopenharmony_ci      floatVec VectorLoad(floatVec source)
35845bd8deadSopenharmony_ci      {
35855bd8deadSopenharmony_ci          floatVec operand;
35865bd8deadSopenharmony_ci
35875bd8deadSopenharmony_ci          operand.x = source.c***;
35885bd8deadSopenharmony_ci          operand.y = source.*c**;
35895bd8deadSopenharmony_ci          operand.z = source.**c*;
35905bd8deadSopenharmony_ci          operand.w = source.***c;
35915bd8deadSopenharmony_ci          if (negate) {
35925bd8deadSopenharmony_ci             operand.x = -operand.x;
35935bd8deadSopenharmony_ci             operand.y = -operand.y;
35945bd8deadSopenharmony_ci             operand.z = -operand.z;
35955bd8deadSopenharmony_ci             operand.w = -operand.w;
35965bd8deadSopenharmony_ci          }
35975bd8deadSopenharmony_ci
35985bd8deadSopenharmony_ci          return operand;
35995bd8deadSopenharmony_ci      }
36005bd8deadSopenharmony_ci
36015bd8deadSopenharmony_ci      float ScalarLoad(floatVec source) 
36025bd8deadSopenharmony_ci      {
36035bd8deadSopenharmony_ci          float operand;
36045bd8deadSopenharmony_ci
36055bd8deadSopenharmony_ci          operand = source.c;
36065bd8deadSopenharmony_ci          if (negate) {
36075bd8deadSopenharmony_ci            operand = -operand;
36085bd8deadSopenharmony_ci          }
36095bd8deadSopenharmony_ci
36105bd8deadSopenharmony_ci          return operand;
36115bd8deadSopenharmony_ci      }
36125bd8deadSopenharmony_ci
36135bd8deadSopenharmony_ci    Section 2.14.4.2,  Vertex Program Parameter Arrays
36145bd8deadSopenharmony_ci
36155bd8deadSopenharmony_ci    A vertex program can load a single element of a program parameter array
36165bd8deadSopenharmony_ci    using either absolute or relative addressing.  Program parameter arrays
36175bd8deadSopenharmony_ci    are accessed when the <progParamArray> rule is matched.
36185bd8deadSopenharmony_ci
36195bd8deadSopenharmony_ci    Absolute addressing is used when the <progParamArrayMem> grammar rule
36205bd8deadSopenharmony_ci    matches <progParamArrayAbs>.  When using absolute addressing, the offset
36215bd8deadSopenharmony_ci    of the selected entry in the array is given by the number matching
36225bd8deadSopenharmony_ci    <progParamRegNum>.
36235bd8deadSopenharmony_ci
36245bd8deadSopenharmony_ci    Relative addressing is used when the <progParamArrayMem> grammar rule
36255bd8deadSopenharmony_ci    matches <progParamArrayRel>.  When using relative addressing, the offset
36265bd8deadSopenharmony_ci    of the selected entry in the array is computed by adding the address
36275bd8deadSopenharmony_ci    register component specified by the <addrReg> and <addrComponent> rules to
36285bd8deadSopenharmony_ci    the positive or negative offset specified by the <addrRegRelOffset> rule.
36295bd8deadSopenharmony_ci    If <addrRegRelOffset> matches "", no fixed offset is added to the address
36305bd8deadSopenharmony_ci    register component.  If the computed offset is negative or exceeds the
36315bd8deadSopenharmony_ci    size of the array, the results of the access are undefined, but may not
36325bd8deadSopenharmony_ci    lead to program or GL termination.
36335bd8deadSopenharmony_ci
36345bd8deadSopenharmony_ci    The following pseudo-code spells out the process of loading a program
36355bd8deadSopenharmony_ci    parameter from an array.  "addrReg" refers to the address register
36365bd8deadSopenharmony_ci    component used for relative addressing, "absolute" is TRUE if the operand
36375bd8deadSopenharmony_ci    uses absolute addressing and FALSE otherwise.  "paramNumber" is the
36385bd8deadSopenharmony_ci    program parameter number for absolute addressing; "paramOffset" is the
36395bd8deadSopenharmony_ci    constant program parameter offset for relative addressing.  "paramArray"
36405bd8deadSopenharmony_ci    is the parameter array that matches the <progParamArray> rule.
36415bd8deadSopenharmony_ci
36425bd8deadSopenharmony_ci      floatVec ProgramParameterLoad(int addrReg)
36435bd8deadSopenharmony_ci      {
36445bd8deadSopenharmony_ci        int index;
36455bd8deadSopenharmony_ci        
36465bd8deadSopenharmony_ci        if (absolute) {
36475bd8deadSopenharmony_ci          index = paramNumber;
36485bd8deadSopenharmony_ci        } else {
36495bd8deadSopenharmony_ci          index = addrReg + paramOffset
36505bd8deadSopenharmony_ci        }
36515bd8deadSopenharmony_ci
36525bd8deadSopenharmony_ci        return paramArray[index];
36535bd8deadSopenharmony_ci      }
36545bd8deadSopenharmony_ci
36555bd8deadSopenharmony_ci    Relative addressing can only be used for accessing program parameter
36565bd8deadSopenharmony_ci    arrays.
36575bd8deadSopenharmony_ci
36585bd8deadSopenharmony_ci
36595bd8deadSopenharmony_ci    Section 2.14.4.3,  Vertex Program Destination Register Update
36605bd8deadSopenharmony_ci
36615bd8deadSopenharmony_ci    Most vertex program instructions write a 4-component result vector to a
36625bd8deadSopenharmony_ci    single temporary or vertex result register.  Writes to individual
36635bd8deadSopenharmony_ci    components of the destination register are controlled by individual
36645bd8deadSopenharmony_ci    component write masks specified as part of the instruction.
36655bd8deadSopenharmony_ci
36665bd8deadSopenharmony_ci    The component write mask is specified by the <optionalMask> rule found in
36675bd8deadSopenharmony_ci    the <maskedDstReg> rule.  If the optional mask is "", all components are
36685bd8deadSopenharmony_ci    enabled.  Otherwise, the optional mask names the individual components to
36695bd8deadSopenharmony_ci    enable.  The characters "x", "y", "z", and "w" match the x, y, z, and w
36705bd8deadSopenharmony_ci    components respectively.  For example, an optional mask of ".xzw"
36715bd8deadSopenharmony_ci    indicates that the x, z, and w components should be enabled for writing
36725bd8deadSopenharmony_ci    but the y component should not.  The grammar requires that the destination
36735bd8deadSopenharmony_ci    register mask components must be listed in "xyzw" order.
36745bd8deadSopenharmony_ci
36755bd8deadSopenharmony_ci    Each component of the destination register is updated with the result of
36765bd8deadSopenharmony_ci    the vertex program instruction if and only if the component is enabled for
36775bd8deadSopenharmony_ci    writes by the component write mask.  Otherwise, the component of the
36785bd8deadSopenharmony_ci    destination register remains unchanged.
36795bd8deadSopenharmony_ci
36805bd8deadSopenharmony_ci    The following pseudocode illustrates the process of writing a result
36815bd8deadSopenharmony_ci    vector to the destination register.  In the pseudocode, "instrmask" refers
36825bd8deadSopenharmony_ci    to the component write mask given by the <optionalMask> rule.  "result"
36835bd8deadSopenharmony_ci    and "destination" refer to the result vector and the register selected by
36845bd8deadSopenharmony_ci    <dstReg>, respectively.
36855bd8deadSopenharmony_ci
36865bd8deadSopenharmony_ci      void UpdateDestination(floatVec destination, floatVec result)
36875bd8deadSopenharmony_ci      {
36885bd8deadSopenharmony_ci          floatVec merged;
36895bd8deadSopenharmony_ci
36905bd8deadSopenharmony_ci          // Merge the converted result into the destination register, under
36915bd8deadSopenharmony_ci          // control of the compile-time write mask.
36925bd8deadSopenharmony_ci          merged = destination;
36935bd8deadSopenharmony_ci          if (instrMask.x) {
36945bd8deadSopenharmony_ci              merged.x = result.x;
36955bd8deadSopenharmony_ci          }
36965bd8deadSopenharmony_ci          if (instrMask.y) {
36975bd8deadSopenharmony_ci              merged.y = result.y;
36985bd8deadSopenharmony_ci          }
36995bd8deadSopenharmony_ci          if (instrMask.z) {
37005bd8deadSopenharmony_ci              merged.z = result.z;
37015bd8deadSopenharmony_ci          }
37025bd8deadSopenharmony_ci          if (instrMask.w) {
37035bd8deadSopenharmony_ci              merged.w = result.w;
37045bd8deadSopenharmony_ci          }
37055bd8deadSopenharmony_ci
37065bd8deadSopenharmony_ci          // Write out the new destination register.
37075bd8deadSopenharmony_ci          destination = merged;
37085bd8deadSopenharmony_ci      }
37095bd8deadSopenharmony_ci
37105bd8deadSopenharmony_ci    The "ARL" instruction updates the single address register component
37115bd8deadSopenharmony_ci    similarly; the grammar is designed so that it writes to only the "x"
37125bd8deadSopenharmony_ci    component of an address register variable.
37135bd8deadSopenharmony_ci
37145bd8deadSopenharmony_ci
37155bd8deadSopenharmony_ci    Section 2.14.4.4,  Vertex Program Result Processing
37165bd8deadSopenharmony_ci
37175bd8deadSopenharmony_ci    As a vertex program executes, it will write to one or more result
37185bd8deadSopenharmony_ci    registers that are mapped to transformed vertex attributes.  When a vertex
37195bd8deadSopenharmony_ci    program completes, the transformed vertex attributes are used to generate
37205bd8deadSopenharmony_ci    primitives.
37215bd8deadSopenharmony_ci
37225bd8deadSopenharmony_ci    The clip coordinates written to "result.position" are used to generate
37235bd8deadSopenharmony_ci    normalized device coordinates and window coordinates for the vertex in the
37245bd8deadSopenharmony_ci    manner described section 2.10.
37255bd8deadSopenharmony_ci
37265bd8deadSopenharmony_ci    Transformed vertices are then assembled into primitives and clipped as
37275bd8deadSopenharmony_ci    described in section 2.11.
37285bd8deadSopenharmony_ci
37295bd8deadSopenharmony_ci    The selection between front-facing and back-facing color attributes
37305bd8deadSopenharmony_ci    depends on the primitive to which the vertex belongs.  If the primitive is
37315bd8deadSopenharmony_ci    a point or a line segment, or if vertex program two-sided color mode is
37325bd8deadSopenharmony_ci    disabled, the front-facing colors are always selected.  If it is a polygon
37335bd8deadSopenharmony_ci    and two-sided color mode is enabled, then the selection is performed in
37345bd8deadSopenharmony_ci    exactly the same way as in two-sided lighting mode (section 2.13.1).
37355bd8deadSopenharmony_ci    Vertex program two-sided color mode is enabled and disabled by calling
37365bd8deadSopenharmony_ci    Enable or Disable with the symbolic value VERTEX_PROGRAM_TWO_SIDE_ARB.
37375bd8deadSopenharmony_ci
37385bd8deadSopenharmony_ci    Finally, as primitives are assembled, color clamping (section 2.13.6),
37395bd8deadSopenharmony_ci    flatshading (section 2.13.7), color, attribute clipping (section 2.13.8),
37405bd8deadSopenharmony_ci    and final color processing (section 2.13.9) operations are applied to the
37415bd8deadSopenharmony_ci    transformed vertices.
37425bd8deadSopenharmony_ci
37435bd8deadSopenharmony_ci
37445bd8deadSopenharmony_ci    Section 2.14.4.5,  Vertex Program Options
37455bd8deadSopenharmony_ci
37465bd8deadSopenharmony_ci    The <optionSequence> grammar rule provides a mechanism for programs to
37475bd8deadSopenharmony_ci    indicate that one or more extended language features are used by the
37485bd8deadSopenharmony_ci    program.  All program options used by the program must be declared at the
37495bd8deadSopenharmony_ci    beginning of the program string.  Each program option specified in a
37505bd8deadSopenharmony_ci    program string will modify the syntactic or semantic rules used to
37515bd8deadSopenharmony_ci    interpet the program and the execution environment used to execute the
37525bd8deadSopenharmony_ci    program.  Program options not present in the program string are ignored,
37535bd8deadSopenharmony_ci    even if they are supported by the GL.
37545bd8deadSopenharmony_ci
37555bd8deadSopenharmony_ci    The <identifier> token in the <option> rule must match the name of a
37565bd8deadSopenharmony_ci    program option supported by the implementation.  To avoid option name
37575bd8deadSopenharmony_ci    conflicts, option identifiers are required to begin with a vendor prefix.
37585bd8deadSopenharmony_ci    A program will fail to load if it specifies a program option not supported
37595bd8deadSopenharmony_ci    by the GL.
37605bd8deadSopenharmony_ci
37615bd8deadSopenharmony_ci    Vertex program options should confine their semantic changes to the domain
37625bd8deadSopenharmony_ci    of vertex programs.  Support for a vertex program option should not change
37635bd8deadSopenharmony_ci    the specification and behavior of vertex programs not requesting use of
37645bd8deadSopenharmony_ci    that option.
37655bd8deadSopenharmony_ci
37665bd8deadSopenharmony_ci    2.14.4.5.1,  Position-Invariant Vertex Program Option
37675bd8deadSopenharmony_ci
37685bd8deadSopenharmony_ci    If a vertex program specifies the "ARB_position_invariant" option, the
37695bd8deadSopenharmony_ci    program is used to generate all transformed vertex attributes except for
37705bd8deadSopenharmony_ci    position.  Instead, clip coordinates are computed as specified in section
37715bd8deadSopenharmony_ci    2.10.  Additionally, user clipping is performed as described in section
37725bd8deadSopenharmony_ci    2.11.  Use of position-invariant vertex programs should generally
37735bd8deadSopenharmony_ci    guarantee that the transformed position of a vertex should be the same
37745bd8deadSopenharmony_ci    whether vertex program mode is enabled or disabled, allowing for correct
37755bd8deadSopenharmony_ci    mixed multi-pass rendering semantics.
37765bd8deadSopenharmony_ci
37775bd8deadSopenharmony_ci    When the position-invariant option is specified in a vertex program,
37785bd8deadSopenharmony_ci    vertex programs can no longer produced a transformed position.  The
37795bd8deadSopenharmony_ci    <resultBinding> rule is modified to remove "result.position" from the list
37805bd8deadSopenharmony_ci    of token sequences matching the rule.  A semantic restriction is added to
37815bd8deadSopenharmony_ci    indicate that a vertex program will fail to load if the number of
37825bd8deadSopenharmony_ci    instructions it contains exceeds the implementation-dependent limit minus
37835bd8deadSopenharmony_ci    four.
37845bd8deadSopenharmony_ci
37855bd8deadSopenharmony_ci
37865bd8deadSopenharmony_ci    Section 2.14.5,  Vertex Program Instruction Set
37875bd8deadSopenharmony_ci
37885bd8deadSopenharmony_ci    The following sections describe the set of supported vertex program
37895bd8deadSopenharmony_ci    instructions.  Each section contains pseudocode describing the
37905bd8deadSopenharmony_ci    instruction.  Instructions will have up to three operands, referred to as
37915bd8deadSopenharmony_ci    "op0", "op1", and "op2".  The operands are loaded using the mechanisms
37925bd8deadSopenharmony_ci    specified in section 2.14.4.1.  The variables "tmp", "tmp0", "tmp1", and
37935bd8deadSopenharmony_ci    "tmp2" describe scalars or vectors used to hold intermediate results in
37945bd8deadSopenharmony_ci    the instruction.  Most instructions will generate a result vector called
37955bd8deadSopenharmony_ci    "result".  The result vector is then written to the destination register
37965bd8deadSopenharmony_ci    specified in the instruction as described in section 2.14.4.3.
37975bd8deadSopenharmony_ci
37985bd8deadSopenharmony_ci
37995bd8deadSopenharmony_ci    Section 2.14.5.1,  ABS:  Absolute Value
38005bd8deadSopenharmony_ci
38015bd8deadSopenharmony_ci    The ABS instruction performs a component-wise absolute value operation on
38025bd8deadSopenharmony_ci    the single operand to yield a result vector.
38035bd8deadSopenharmony_ci
38045bd8deadSopenharmony_ci      tmp = VectorLoad(op0); 
38055bd8deadSopenharmony_ci      result.x = fabs(tmp.x);
38065bd8deadSopenharmony_ci      result.y = fabs(tmp.y);
38075bd8deadSopenharmony_ci      result.z = fabs(tmp.z);
38085bd8deadSopenharmony_ci      result.w = fabs(tmp.w);
38095bd8deadSopenharmony_ci
38105bd8deadSopenharmony_ci
38115bd8deadSopenharmony_ci    Section 2.14.5.2,  ADD:  Add
38125bd8deadSopenharmony_ci
38135bd8deadSopenharmony_ci    The ADD instruction performs a component-wise add of the two operands to
38145bd8deadSopenharmony_ci    yield a result vector.
38155bd8deadSopenharmony_ci
38165bd8deadSopenharmony_ci      tmp0 = VectorLoad(op0);
38175bd8deadSopenharmony_ci      tmp1 = VectorLoad(op1);
38185bd8deadSopenharmony_ci      result.x = tmp0.x + tmp1.x;
38195bd8deadSopenharmony_ci      result.y = tmp0.y + tmp1.y;
38205bd8deadSopenharmony_ci      result.z = tmp0.z + tmp1.z;
38215bd8deadSopenharmony_ci      result.w = tmp0.w + tmp1.w;
38225bd8deadSopenharmony_ci
38235bd8deadSopenharmony_ci    The following rules apply to addition:
38245bd8deadSopenharmony_ci
38255bd8deadSopenharmony_ci      1. <x> + <y> == <y> + <x>, for all <x> and <y>.
38265bd8deadSopenharmony_ci      2. <x> + 0.0 == <x>, for all <x>.
38275bd8deadSopenharmony_ci
38285bd8deadSopenharmony_ci
38295bd8deadSopenharmony_ci    Section 2.14.5.3,  ARL:  Address Register Load
38305bd8deadSopenharmony_ci
38315bd8deadSopenharmony_ci    The ARL instruction loads a single scalar operand and performs a floor
38325bd8deadSopenharmony_ci    operation to generate a signed integer scalar result:
38335bd8deadSopenharmony_ci
38345bd8deadSopenharmony_ci        result = floor(ScalarLoad(op0));
38355bd8deadSopenharmony_ci
38365bd8deadSopenharmony_ci    The floor operation returns the largest integer less than or equal to the
38375bd8deadSopenharmony_ci    operand.  For example floor(-1.7) = -2.0, floor(+1.0) = +1.0, and
38385bd8deadSopenharmony_ci    floor(+3.7) = +3.0.
38395bd8deadSopenharmony_ci
38405bd8deadSopenharmony_ci
38415bd8deadSopenharmony_ci    Section 2.14.5.4,  DP3:  Three-Component Dot Product
38425bd8deadSopenharmony_ci
38435bd8deadSopenharmony_ci    The DP3 instruction computes a three-component dot product of the two
38445bd8deadSopenharmony_ci    operands (using the x, y, and z components) and replicates the dot product
38455bd8deadSopenharmony_ci    to all four components of the result vector.
38465bd8deadSopenharmony_ci
38475bd8deadSopenharmony_ci      tmp0 = VectorLoad(op0);
38485bd8deadSopenharmony_ci      tmp1 = VectorLoad(op1);
38495bd8deadSopenharmony_ci      dot = (tmp0.x * tmp1.x) + (tmp0.y * tmp1.y) + 
38505bd8deadSopenharmony_ci            (tmp0.z * tmp1.z);
38515bd8deadSopenharmony_ci      result.x = dot;
38525bd8deadSopenharmony_ci      result.y = dot;
38535bd8deadSopenharmony_ci      result.z = dot;
38545bd8deadSopenharmony_ci      result.w = dot;
38555bd8deadSopenharmony_ci
38565bd8deadSopenharmony_ci
38575bd8deadSopenharmony_ci    Section 2.14.5.5,  DP4:  Four-Component Dot Product
38585bd8deadSopenharmony_ci
38595bd8deadSopenharmony_ci    The DP4 instruction computes a four-component dot product of the two
38605bd8deadSopenharmony_ci    operands and replicates the dot product to all four components of the
38615bd8deadSopenharmony_ci    result vector.
38625bd8deadSopenharmony_ci
38635bd8deadSopenharmony_ci      tmp0 = VectorLoad(op0);
38645bd8deadSopenharmony_ci      tmp1 = VectorLoad(op1):
38655bd8deadSopenharmony_ci      dot = (tmp0.x * tmp1.x) + (tmp0.y * tmp1.y) + 
38665bd8deadSopenharmony_ci            (tmp0.z * tmp1.z) + (tmp0.w * tmp1.w);
38675bd8deadSopenharmony_ci      result.x = dot;
38685bd8deadSopenharmony_ci      result.y = dot;
38695bd8deadSopenharmony_ci      result.z = dot;
38705bd8deadSopenharmony_ci      result.w = dot;
38715bd8deadSopenharmony_ci
38725bd8deadSopenharmony_ci
38735bd8deadSopenharmony_ci    Section 2.14.5.6,  DPH:  Homogeneous Dot Product
38745bd8deadSopenharmony_ci
38755bd8deadSopenharmony_ci    The DPH instruction computes a three-component dot product of the two
38765bd8deadSopenharmony_ci    operands (using the x, y, and z components), adds the w component of the
38775bd8deadSopenharmony_ci    second operand, and replicates the sum to all four components of the
38785bd8deadSopenharmony_ci    result vector.  This is equivalent to a four-component dot product where
38795bd8deadSopenharmony_ci    the w component of the first operand is forced to 1.0.
38805bd8deadSopenharmony_ci
38815bd8deadSopenharmony_ci      tmp0 = VectorLoad(op0);
38825bd8deadSopenharmony_ci      tmp1 = VectorLoad(op1):
38835bd8deadSopenharmony_ci      dot = (tmp0.x * tmp1.x) + (tmp0.y * tmp1.y) + 
38845bd8deadSopenharmony_ci            (tmp0.z * tmp1.z) + tmp1.w;
38855bd8deadSopenharmony_ci      result.x = dot;
38865bd8deadSopenharmony_ci      result.y = dot;
38875bd8deadSopenharmony_ci      result.z = dot;
38885bd8deadSopenharmony_ci      result.w = dot;
38895bd8deadSopenharmony_ci
38905bd8deadSopenharmony_ci
38915bd8deadSopenharmony_ci    Section 2.14.5.7,  DST:  Distance Vector
38925bd8deadSopenharmony_ci
38935bd8deadSopenharmony_ci    The DST instruction computes a distance vector from two specially-
38945bd8deadSopenharmony_ci    formatted operands.  The first operand should be of the form [NA, d^2,
38955bd8deadSopenharmony_ci    d^2, NA] and the second operand should be of the form [NA, 1/d, NA, 1/d],
38965bd8deadSopenharmony_ci    where NA values are not relevant to the calculation and d is a vector
38975bd8deadSopenharmony_ci    length.  If both vectors satisfy these conditions, the result vector will
38985bd8deadSopenharmony_ci    be of the form [1.0, d, d^2, 1/d].
38995bd8deadSopenharmony_ci
39005bd8deadSopenharmony_ci    The exact behavior is specified in the following pseudo-code:
39015bd8deadSopenharmony_ci
39025bd8deadSopenharmony_ci      tmp0 = VectorLoad(op0);
39035bd8deadSopenharmony_ci      tmp1 = VectorLoad(op1);
39045bd8deadSopenharmony_ci      result.x = 1.0;
39055bd8deadSopenharmony_ci      result.y = tmp0.y * tmp1.y;
39065bd8deadSopenharmony_ci      result.z = tmp0.z;
39075bd8deadSopenharmony_ci      result.w = tmp1.w;
39085bd8deadSopenharmony_ci
39095bd8deadSopenharmony_ci    Given an arbitrary vector, d^2 can be obtained using the DP3 instruction
39105bd8deadSopenharmony_ci    (using the same vector for both operands) and 1/d can be obtained from d^2
39115bd8deadSopenharmony_ci    using the RSQ instruction.
39125bd8deadSopenharmony_ci
39135bd8deadSopenharmony_ci    This distance vector is useful for per-vertex light attenuation
39145bd8deadSopenharmony_ci    calculations:  a DP3 operation using the distance vector and an
39155bd8deadSopenharmony_ci    attenuation constants vector as operands will yield the attenuation
39165bd8deadSopenharmony_ci    factor.
39175bd8deadSopenharmony_ci
39185bd8deadSopenharmony_ci
39195bd8deadSopenharmony_ci    Section 2.14.5.8,  EX2:  Exponential Base 2
39205bd8deadSopenharmony_ci
39215bd8deadSopenharmony_ci    The EX2 instruction approximates 2 raised to the power of the scalar
39225bd8deadSopenharmony_ci    operand and replicates the approximation to all four components of the
39235bd8deadSopenharmony_ci    result vector.
39245bd8deadSopenharmony_ci
39255bd8deadSopenharmony_ci      tmp = ScalarLoad(op0);
39265bd8deadSopenharmony_ci      result.x = Approx2ToX(tmp);
39275bd8deadSopenharmony_ci      result.y = Approx2ToX(tmp);
39285bd8deadSopenharmony_ci      result.z = Approx2ToX(tmp);
39295bd8deadSopenharmony_ci      result.w = Approx2ToX(tmp);
39305bd8deadSopenharmony_ci
39315bd8deadSopenharmony_ci
39325bd8deadSopenharmony_ci    Section 2.14.5.9,  EXP:  Exponential Base 2 (approximate)
39335bd8deadSopenharmony_ci
39345bd8deadSopenharmony_ci    The EXP instruction computes a rough approximation of 2 raised to the
39355bd8deadSopenharmony_ci    power of the scalar operand.  The approximation is returned in the "z"
39365bd8deadSopenharmony_ci    component of the result vector.  A vertex program can also use the "x" and
39375bd8deadSopenharmony_ci    "y" components of the result vector to generate a more accurate
39385bd8deadSopenharmony_ci    approximation by evaluating
39395bd8deadSopenharmony_ci
39405bd8deadSopenharmony_ci        result.x * f(result.y),
39415bd8deadSopenharmony_ci    
39425bd8deadSopenharmony_ci    where f(x) is a user-defined function that approximates 2^x over the
39435bd8deadSopenharmony_ci    domain [0.0, 1.0).  The "w" component of the result vector is always 1.0.
39445bd8deadSopenharmony_ci    
39455bd8deadSopenharmony_ci    The exact behavior is specified in the following pseudo-code:
39465bd8deadSopenharmony_ci
39475bd8deadSopenharmony_ci      tmp = ScalarLoad(op0);
39485bd8deadSopenharmony_ci      result.x = 2^floor(tmp);
39495bd8deadSopenharmony_ci      result.y = tmp - floor(tmp);
39505bd8deadSopenharmony_ci      result.z = RoughApprox2ToX(tmp);
39515bd8deadSopenharmony_ci      result.w = 1.0;
39525bd8deadSopenharmony_ci
39535bd8deadSopenharmony_ci    The approximation function is accurate to at least 10 bits:
39545bd8deadSopenharmony_ci
39555bd8deadSopenharmony_ci      | RoughApprox2ToX(x) - 2^x | < 1.0 / 2^11, if 0.0 <= x < 1.0,
39565bd8deadSopenharmony_ci
39575bd8deadSopenharmony_ci    and, in general,
39585bd8deadSopenharmony_ci   
39595bd8deadSopenharmony_ci      | RoughApprox2ToX(x) - 2^x | < (1.0 / 2^11) * (2^floor(x)).
39605bd8deadSopenharmony_ci
39615bd8deadSopenharmony_ci
39625bd8deadSopenharmony_ci    Section 2.14.5.10,  FLR:  Floor
39635bd8deadSopenharmony_ci
39645bd8deadSopenharmony_ci    The FLR instruction performs a component-wise floor operation on the
39655bd8deadSopenharmony_ci    operand to generate a result vector.  The floor of a value is defined as
39665bd8deadSopenharmony_ci    the largest integer less than or equal to the value.  The floor of 2.3 is
39675bd8deadSopenharmony_ci    2.0; the floor of -3.6 is -4.0.
39685bd8deadSopenharmony_ci
39695bd8deadSopenharmony_ci      tmp = VectorLoad(op0);
39705bd8deadSopenharmony_ci      result.x = floor(tmp.x);
39715bd8deadSopenharmony_ci      result.y = floor(tmp.y);
39725bd8deadSopenharmony_ci      result.z = floor(tmp.z);
39735bd8deadSopenharmony_ci      result.w = floor(tmp.w);
39745bd8deadSopenharmony_ci
39755bd8deadSopenharmony_ci
39765bd8deadSopenharmony_ci    Section 2.14.5.11,  FRC:  Fraction
39775bd8deadSopenharmony_ci
39785bd8deadSopenharmony_ci    The FRC instruction extracts the fractional portion of each component of
39795bd8deadSopenharmony_ci    the operand to generate a result vector.  The fractional portion of a
39805bd8deadSopenharmony_ci    component is defined as the result after subtracting off the floor of the
39815bd8deadSopenharmony_ci    component (see FLR), and is always in the range [0.0, 1.0).
39825bd8deadSopenharmony_ci
39835bd8deadSopenharmony_ci    For negative values, the fractional portion is NOT the number written to
39845bd8deadSopenharmony_ci    the right of the decimal point -- the fractional portion of -1.7 is not
39855bd8deadSopenharmony_ci    0.7 -- it is 0.3.  0.3 is produced by subtracting the floor of -1.7 (-2.0)
39865bd8deadSopenharmony_ci    from -1.7.
39875bd8deadSopenharmony_ci
39885bd8deadSopenharmony_ci      tmp = VectorLoad(op0);
39895bd8deadSopenharmony_ci      result.x = fraction(tmp.x);
39905bd8deadSopenharmony_ci      result.y = fraction(tmp.y);
39915bd8deadSopenharmony_ci      result.z = fraction(tmp.z);
39925bd8deadSopenharmony_ci      result.w = fraction(tmp.w);
39935bd8deadSopenharmony_ci
39945bd8deadSopenharmony_ci
39955bd8deadSopenharmony_ci    Section 2.14.5.12,  LG2:  Logarithm Base 2
39965bd8deadSopenharmony_ci
39975bd8deadSopenharmony_ci    The LG2 instruction approximates the base 2 logarithm of the scalar
39985bd8deadSopenharmony_ci    operand and replicates it to all four components of the result vector.
39995bd8deadSopenharmony_ci
40005bd8deadSopenharmony_ci      tmp = ScalarLoad(op0);
40015bd8deadSopenharmony_ci      result.x = ApproxLog2(tmp);
40025bd8deadSopenharmony_ci      result.y = ApproxLog2(tmp);
40035bd8deadSopenharmony_ci      result.z = ApproxLog2(tmp);
40045bd8deadSopenharmony_ci      result.w = ApproxLog2(tmp);
40055bd8deadSopenharmony_ci
40065bd8deadSopenharmony_ci    If the scalar operand is zero or negative, the result is undefined.
40075bd8deadSopenharmony_ci
40085bd8deadSopenharmony_ci
40095bd8deadSopenharmony_ci    Section 2.14.5.13,  LIT:  Light Coefficients
40105bd8deadSopenharmony_ci
40115bd8deadSopenharmony_ci    The LIT instruction accelerates per-vertex lighting by computing lighting
40125bd8deadSopenharmony_ci    coefficients for ambient, diffuse, and specular light contributions.  The
40135bd8deadSopenharmony_ci    "x" component of the single operand is assumed to hold a diffuse dot
40145bd8deadSopenharmony_ci    product (n dot VP_pli, as in the vertex lighting equations in Section
40155bd8deadSopenharmony_ci    2.13.1).  The "y" component of the operand is assumed to hold a specular
40165bd8deadSopenharmony_ci    dot product (n dot h_i).  The "w" component of the operand is assumed to
40175bd8deadSopenharmony_ci    hold the specular exponent of the material (s_rm), and is clamped to the
40185bd8deadSopenharmony_ci    range (-128, +128) exclusive.
40195bd8deadSopenharmony_ci
40205bd8deadSopenharmony_ci    The "x" component of the result vector receives the value that should be
40215bd8deadSopenharmony_ci    multiplied by the ambient light/material product (always 1.0).  The "y"
40225bd8deadSopenharmony_ci    component of the result vector receives the value that should be
40235bd8deadSopenharmony_ci    multiplied by the diffuse light/material product (n dot VP_pli).  The "z"
40245bd8deadSopenharmony_ci    component of the result vector receives the value that should be
40255bd8deadSopenharmony_ci    multiplied by the specular light/material product (f_i * (n dot h_i) ^
40265bd8deadSopenharmony_ci    s_rm).  The "w" component of the result is the constant 1.0.
40275bd8deadSopenharmony_ci
40285bd8deadSopenharmony_ci    Negative diffuse and specular dot products are clamped to 0.0, as is done
40295bd8deadSopenharmony_ci    in the standard per-vertex lighting operations.  In addition, if the
40305bd8deadSopenharmony_ci    diffuse dot product is zero or negative, the specular coefficient is
40315bd8deadSopenharmony_ci    forced to zero.
40325bd8deadSopenharmony_ci
40335bd8deadSopenharmony_ci      tmp = VectorLoad(op0);
40345bd8deadSopenharmony_ci      if (tmp.x < 0) tmp.x = 0;
40355bd8deadSopenharmony_ci      if (tmp.y < 0) tmp.y = 0;
40365bd8deadSopenharmony_ci      if (tmp.w < -(128.0-epsilon)) tmp.w = -(128.0-epsilon);
40375bd8deadSopenharmony_ci      else if (tmp.w > 128-epsilon) tmp.w = 128-epsilon;
40385bd8deadSopenharmony_ci      result.x = 1.0;
40395bd8deadSopenharmony_ci      result.y = tmp.x;
40405bd8deadSopenharmony_ci      result.z = (tmp.x > 0) ? RoughApproxPower(tmp.y, tmp.w) : 0.0;
40415bd8deadSopenharmony_ci      result.w = 1.0;
40425bd8deadSopenharmony_ci
40435bd8deadSopenharmony_ci    The exponentiation approximation function may be defined in terms of the
40445bd8deadSopenharmony_ci    base 2 exponentiation and logarithm approximation operations in the EXP
40455bd8deadSopenharmony_ci    and LOG instructions, where
40465bd8deadSopenharmony_ci
40475bd8deadSopenharmony_ci      RoughApproxPower(a,b) = RoughApproxExp2(b * RoughApproxLog2(a)).
40485bd8deadSopenharmony_ci
40495bd8deadSopenharmony_ci    In particular, the approximation may not be any more accurate than the
40505bd8deadSopenharmony_ci    underlying EXP and LOG operations.
40515bd8deadSopenharmony_ci
40525bd8deadSopenharmony_ci    Also, since 0^0 is defined to be 1, RoughApproxPower(0.0, 0.0) will
40535bd8deadSopenharmony_ci    produce 1.0.
40545bd8deadSopenharmony_ci
40555bd8deadSopenharmony_ci
40565bd8deadSopenharmony_ci    Section 2.14.5.14,  LOG:  Logarithm Base 2 (approximate)
40575bd8deadSopenharmony_ci
40585bd8deadSopenharmony_ci    The LOG instruction computes a rough approximation of the base 2 logarithm
40595bd8deadSopenharmony_ci    of the absolute value of the scalar operand.  The approximation is
40605bd8deadSopenharmony_ci    returned in the "z" component of the result vector.  A vertex program can
40615bd8deadSopenharmony_ci    also use the "x" and "y" components of the result vector to generate a
40625bd8deadSopenharmony_ci    more accurate approximation by evaluating
40635bd8deadSopenharmony_ci
40645bd8deadSopenharmony_ci        result.x + f(result.y),
40655bd8deadSopenharmony_ci    
40665bd8deadSopenharmony_ci    where f(x) is a user-defined function that approximates 2^x over the
40675bd8deadSopenharmony_ci    domain [1.0, 2.0).  The "w" component of the result vector is always 1.0.
40685bd8deadSopenharmony_ci
40695bd8deadSopenharmony_ci    The exact behavior is specified in the following pseudo-code:
40705bd8deadSopenharmony_ci
40715bd8deadSopenharmony_ci      tmp = fabs(ScalarLoad(op0));
40725bd8deadSopenharmony_ci      result.x = floor(log2(tmp));
40735bd8deadSopenharmony_ci      result.y = tmp / 2^(floor(log2(tmp)));
40745bd8deadSopenharmony_ci      result.z = RoughApproxLog2(tmp);
40755bd8deadSopenharmony_ci      result.w = 1.0;
40765bd8deadSopenharmony_ci   
40775bd8deadSopenharmony_ci    Here, "floor(log2(tmp))" refers to the floor of the exact logarithm, which
40785bd8deadSopenharmony_ci    can be easily computed for standard floating-point representations.  The
40795bd8deadSopenharmony_ci    approximation function is accurate to at least 10 bits:
40805bd8deadSopenharmony_ci
40815bd8deadSopenharmony_ci      | RoughApproxLog2(x) - log_2(x) | < 1.0 / 2^11.
40825bd8deadSopenharmony_ci
40835bd8deadSopenharmony_ci
40845bd8deadSopenharmony_ci    Section 2.14.5.15,  MAD:  Multiply and Add
40855bd8deadSopenharmony_ci
40865bd8deadSopenharmony_ci    The MAD instruction performs a component-wise multiply of the first two
40875bd8deadSopenharmony_ci    operands, and then does a component-wise add of the product to the third
40885bd8deadSopenharmony_ci    operand to yield a result vector.
40895bd8deadSopenharmony_ci
40905bd8deadSopenharmony_ci      tmp0 = VectorLoad(op0);
40915bd8deadSopenharmony_ci      tmp1 = VectorLoad(op1);
40925bd8deadSopenharmony_ci      tmp2 = VectorLoad(op2);
40935bd8deadSopenharmony_ci      result.x = tmp0.x * tmp1.x + tmp2.x;
40945bd8deadSopenharmony_ci      result.y = tmp0.y * tmp1.y + tmp2.y;
40955bd8deadSopenharmony_ci      result.z = tmp0.z * tmp1.z + tmp2.z;
40965bd8deadSopenharmony_ci      result.w = tmp0.w * tmp1.w + tmp2.w;
40975bd8deadSopenharmony_ci
40985bd8deadSopenharmony_ci    The multiplication and addition operations in this instruction are subject
40995bd8deadSopenharmony_ci    to the same rules as described for the MUL and ADD instructions.
41005bd8deadSopenharmony_ci
41015bd8deadSopenharmony_ci
41025bd8deadSopenharmony_ci    Section 2.14.5.16,  MAX:  Maximum
41035bd8deadSopenharmony_ci
41045bd8deadSopenharmony_ci    The MAX instruction computes component-wise maximums of the values in the
41055bd8deadSopenharmony_ci    two operands to yield a result vector.
41065bd8deadSopenharmony_ci
41075bd8deadSopenharmony_ci      tmp0 = VectorLoad(op0);
41085bd8deadSopenharmony_ci      tmp1 = VectorLoad(op1);
41095bd8deadSopenharmony_ci      result.x = (tmp0.x > tmp1.x) ? tmp0.x : tmp1.x;
41105bd8deadSopenharmony_ci      result.y = (tmp0.y > tmp1.y) ? tmp0.y : tmp1.y;
41115bd8deadSopenharmony_ci      result.z = (tmp0.z > tmp1.z) ? tmp0.z : tmp1.z;
41125bd8deadSopenharmony_ci      result.w = (tmp0.w > tmp1.w) ? tmp0.w : tmp1.w;
41135bd8deadSopenharmony_ci
41145bd8deadSopenharmony_ci
41155bd8deadSopenharmony_ci    Section 2.14.5.17,  MIN:  Minimum
41165bd8deadSopenharmony_ci
41175bd8deadSopenharmony_ci    The MIN instruction computes component-wise minimums of the values in the
41185bd8deadSopenharmony_ci    two operands to yield a result vector.
41195bd8deadSopenharmony_ci
41205bd8deadSopenharmony_ci      tmp0 = VectorLoad(op0);
41215bd8deadSopenharmony_ci      tmp1 = VectorLoad(op1);
41225bd8deadSopenharmony_ci      result.x = (tmp0.x > tmp1.x) ? tmp1.x : tmp0.x;
41235bd8deadSopenharmony_ci      result.y = (tmp0.y > tmp1.y) ? tmp1.y : tmp0.y;
41245bd8deadSopenharmony_ci      result.z = (tmp0.z > tmp1.z) ? tmp1.z : tmp0.z;
41255bd8deadSopenharmony_ci      result.w = (tmp0.w > tmp1.w) ? tmp1.w : tmp0.w;
41265bd8deadSopenharmony_ci
41275bd8deadSopenharmony_ci
41285bd8deadSopenharmony_ci    Section 2.14.5.18,  MOV:  Move
41295bd8deadSopenharmony_ci
41305bd8deadSopenharmony_ci    The MOV instruction copies the value of the operand to yield a result
41315bd8deadSopenharmony_ci    vector.
41325bd8deadSopenharmony_ci
41335bd8deadSopenharmony_ci      result = VectorLoad(op0);
41345bd8deadSopenharmony_ci
41355bd8deadSopenharmony_ci
41365bd8deadSopenharmony_ci    Section 2.14.5.19,  MUL:  Multiply
41375bd8deadSopenharmony_ci
41385bd8deadSopenharmony_ci    The MUL instruction performs a component-wise multiply of the two operands
41395bd8deadSopenharmony_ci    to yield a result vector.
41405bd8deadSopenharmony_ci
41415bd8deadSopenharmony_ci      tmp0 = VectorLoad(op0);
41425bd8deadSopenharmony_ci      tmp1 = VectorLoad(op1);
41435bd8deadSopenharmony_ci      result.x = tmp0.x * tmp1.x;
41445bd8deadSopenharmony_ci      result.y = tmp0.y * tmp1.y;
41455bd8deadSopenharmony_ci      result.z = tmp0.z * tmp1.z;
41465bd8deadSopenharmony_ci      result.w = tmp0.w * tmp1.w;
41475bd8deadSopenharmony_ci
41485bd8deadSopenharmony_ci    The following rules apply to multiplication:
41495bd8deadSopenharmony_ci
41505bd8deadSopenharmony_ci      1. <x> * <y> == <y> * <x>, for all <x> and <y>.
41515bd8deadSopenharmony_ci      2. +/-0.0 * <x> = +/-0.0, at least for all <x> that correspond to
41525bd8deadSopenharmony_ci         representable numbers (IEEE "not a number" and "infinity" encodings
41535bd8deadSopenharmony_ci         may be exceptions).
41545bd8deadSopenharmony_ci      3. +1.0 * <x> = <x>, for all <x>.
41555bd8deadSopenharmony_ci
41565bd8deadSopenharmony_ci    Multiplication by zero and one should be invariant, as it may be used to
41575bd8deadSopenharmony_ci    evaluate conditional expressions without branching.
41585bd8deadSopenharmony_ci
41595bd8deadSopenharmony_ci
41605bd8deadSopenharmony_ci    Section 2.14.5.20,  POW:  Exponentiate
41615bd8deadSopenharmony_ci
41625bd8deadSopenharmony_ci    The POW instruction approximates the value of the first scalar operand
41635bd8deadSopenharmony_ci    raised to the power of the second scalar operand and replicates it to all
41645bd8deadSopenharmony_ci    four components of the result vector.
41655bd8deadSopenharmony_ci
41665bd8deadSopenharmony_ci      tmp0 = ScalarLoad(op0);
41675bd8deadSopenharmony_ci      tmp1 = ScalarLoad(op1);
41685bd8deadSopenharmony_ci      result.x = ApproxPower(tmp0, tmp1);
41695bd8deadSopenharmony_ci      result.y = ApproxPower(tmp0, tmp1);
41705bd8deadSopenharmony_ci      result.z = ApproxPower(tmp0, tmp1);
41715bd8deadSopenharmony_ci      result.w = ApproxPower(tmp0, tmp1);
41725bd8deadSopenharmony_ci
41735bd8deadSopenharmony_ci    The exponentiation approximation function may be implemented using the
41745bd8deadSopenharmony_ci    base 2 exponentiation and logarithm approximation operations in the EX2
41755bd8deadSopenharmony_ci    and LG2 instructions.  In particular,
41765bd8deadSopenharmony_ci
41775bd8deadSopenharmony_ci      ApproxPower(a,b) = ApproxExp2(b * ApproxLog2(a)).
41785bd8deadSopenharmony_ci
41795bd8deadSopenharmony_ci    Note that a logarithm may be involved even for cases where the exponent is
41805bd8deadSopenharmony_ci    an integer.  This means that it may not be possible to exponentiate
41815bd8deadSopenharmony_ci    correctly with a negative base.  In constrast, it is possible in a
41825bd8deadSopenharmony_ci    "normal" mathematical formulation to raise negative numbers to integral
41835bd8deadSopenharmony_ci    powers (e.g., (-3)^2== 9, and (-0.5)^-2==4).
41845bd8deadSopenharmony_ci
41855bd8deadSopenharmony_ci
41865bd8deadSopenharmony_ci    Section 2.14.5.21,  RCP:  Reciprocal
41875bd8deadSopenharmony_ci
41885bd8deadSopenharmony_ci    The RCP instruction approximates the reciprocal of the scalar operand and
41895bd8deadSopenharmony_ci    replicates it to all four components of the result vector.
41905bd8deadSopenharmony_ci
41915bd8deadSopenharmony_ci      tmp = ScalarLoad(op0);
41925bd8deadSopenharmony_ci      result.x = ApproxReciprocal(tmp);
41935bd8deadSopenharmony_ci      result.y = ApproxReciprocal(tmp);
41945bd8deadSopenharmony_ci      result.z = ApproxReciprocal(tmp);
41955bd8deadSopenharmony_ci      result.w = ApproxReciprocal(tmp);
41965bd8deadSopenharmony_ci
41975bd8deadSopenharmony_ci    The following rule applies to reciprocation:
41985bd8deadSopenharmony_ci
41995bd8deadSopenharmony_ci      1. ApproxReciprocal(+1.0) = +1.0.
42005bd8deadSopenharmony_ci
42015bd8deadSopenharmony_ci
42025bd8deadSopenharmony_ci    Section 2.14.5.22,  RSQ:  Reciprocal Square Root
42035bd8deadSopenharmony_ci
42045bd8deadSopenharmony_ci    The RSQ instruction approximates the reciprocal of the square root of the
42055bd8deadSopenharmony_ci    absolute value of the scalar operand and replicates it to all four
42065bd8deadSopenharmony_ci    components of the result vector.
42075bd8deadSopenharmony_ci
42085bd8deadSopenharmony_ci      tmp = fabs(ScalarLoad(op0));
42095bd8deadSopenharmony_ci      result.x = ApproxRSQRT(tmp);
42105bd8deadSopenharmony_ci      result.y = ApproxRSQRT(tmp);
42115bd8deadSopenharmony_ci      result.z = ApproxRSQRT(tmp);
42125bd8deadSopenharmony_ci      result.w = ApproxRSQRT(tmp);
42135bd8deadSopenharmony_ci
42145bd8deadSopenharmony_ci
42155bd8deadSopenharmony_ci    Section 2.14.5.23,  SGE:  Set On Greater or Equal Than
42165bd8deadSopenharmony_ci
42175bd8deadSopenharmony_ci    The SGE instruction performs a component-wise comparison of the two
42185bd8deadSopenharmony_ci    operands.  Each component of the result vector is 1.0 if the corresponding
42195bd8deadSopenharmony_ci    component of the first operands is greater than or equal that of the
42205bd8deadSopenharmony_ci    second, and 0.0 otherwise.
42215bd8deadSopenharmony_ci
42225bd8deadSopenharmony_ci      tmp0 = VectorLoad(op0);
42235bd8deadSopenharmony_ci      tmp1 = VectorLoad(op1);
42245bd8deadSopenharmony_ci      result.x = (tmp0.x >= tmp1.x) ? 1.0 : 0.0;
42255bd8deadSopenharmony_ci      result.y = (tmp0.y >= tmp1.y) ? 1.0 : 0.0;
42265bd8deadSopenharmony_ci      result.z = (tmp0.z >= tmp1.z) ? 1.0 : 0.0;
42275bd8deadSopenharmony_ci      result.w = (tmp0.w >= tmp1.w) ? 1.0 : 0.0;
42285bd8deadSopenharmony_ci
42295bd8deadSopenharmony_ci
42305bd8deadSopenharmony_ci    Section 2.14.5.24,  SLT:  Set On Less Than
42315bd8deadSopenharmony_ci
42325bd8deadSopenharmony_ci    The SLT instruction performs a component-wise comparison of the two
42335bd8deadSopenharmony_ci    operands.  Each component of the result vector is 1.0 if the corresponding
42345bd8deadSopenharmony_ci    component of the first operand is less than that of the second, and 0.0
42355bd8deadSopenharmony_ci    otherwise.
42365bd8deadSopenharmony_ci
42375bd8deadSopenharmony_ci      tmp0 = VectorLoad(op0);
42385bd8deadSopenharmony_ci      tmp1 = VectorLoad(op1);
42395bd8deadSopenharmony_ci      result.x = (tmp0.x < tmp1.x) ? 1.0 : 0.0;
42405bd8deadSopenharmony_ci      result.y = (tmp0.y < tmp1.y) ? 1.0 : 0.0;
42415bd8deadSopenharmony_ci      result.z = (tmp0.z < tmp1.z) ? 1.0 : 0.0;
42425bd8deadSopenharmony_ci      result.w = (tmp0.w < tmp1.w) ? 1.0 : 0.0;
42435bd8deadSopenharmony_ci
42445bd8deadSopenharmony_ci
42455bd8deadSopenharmony_ci    Section 2.14.5.25,  SUB:  Subtract
42465bd8deadSopenharmony_ci
42475bd8deadSopenharmony_ci    The SUB instruction performs a component-wise subtraction of the second
42485bd8deadSopenharmony_ci    operand from the first to yield a result vector.
42495bd8deadSopenharmony_ci
42505bd8deadSopenharmony_ci      tmp0 = VectorLoad(op0);
42515bd8deadSopenharmony_ci      tmp1 = VectorLoad(op1);
42525bd8deadSopenharmony_ci      result.x = tmp0.x - tmp1.x;
42535bd8deadSopenharmony_ci      result.y = tmp0.y - tmp1.y;
42545bd8deadSopenharmony_ci      result.z = tmp0.z - tmp1.z;
42555bd8deadSopenharmony_ci      result.w = tmp0.w - tmp1.w;
42565bd8deadSopenharmony_ci
42575bd8deadSopenharmony_ci
42585bd8deadSopenharmony_ci    Section 2.14.5.26,  SWZ:  Extended Swizzle
42595bd8deadSopenharmony_ci
42605bd8deadSopenharmony_ci    The SWZ instruction loads the single vector operand, and performs a
42615bd8deadSopenharmony_ci    swizzle operation more powerful than that provided for loading normal
42625bd8deadSopenharmony_ci    vector operands to yield an instruction vector.
42635bd8deadSopenharmony_ci
42645bd8deadSopenharmony_ci    After the operand is loaded, the "x", "y", "z", and "w" components of the
42655bd8deadSopenharmony_ci    result vector are selected by the first, second, third, and fourth matches
42665bd8deadSopenharmony_ci    of the <extSwizComp> pattern in the <extendedSwizzle> rule.
42675bd8deadSopenharmony_ci
42685bd8deadSopenharmony_ci    A result component can be selected from any of the four components of the
42695bd8deadSopenharmony_ci    operand or the constants 0.0 and 1.0.  The result component can also be
42705bd8deadSopenharmony_ci    optionally negated.  The following pseudocode describes the component
42715bd8deadSopenharmony_ci    selection method.  "operand" refers to the vector operand, "select" is an
42725bd8deadSopenharmony_ci    enumerant where the values ZERO, ONE, X, Y, Z, and W correspond to the
42735bd8deadSopenharmony_ci    <extSwizSel> rule matching "0", "1", "x", "y", "z", and "w", respectively.
42745bd8deadSopenharmony_ci    "negate" is TRUE if and only if the <optionalSign> rule in <extSwizComp>
42755bd8deadSopenharmony_ci    matches "-".
42765bd8deadSopenharmony_ci
42775bd8deadSopenharmony_ci      float ExtSwizComponent(floatVec operand, enum select, boolean negate)
42785bd8deadSopenharmony_ci      {
42795bd8deadSopenharmony_ci          float result;
42805bd8deadSopenharmony_ci          switch (select) {
42815bd8deadSopenharmony_ci            case ZERO:  result = 0.0; break;
42825bd8deadSopenharmony_ci            case ONE:   result = 1.0; break;
42835bd8deadSopenharmony_ci            case X:     result = operand.x; break;
42845bd8deadSopenharmony_ci            case Y:     result = operand.y; break;
42855bd8deadSopenharmony_ci            case Z:     result = operand.z; break;
42865bd8deadSopenharmony_ci            case W:     result = operand.w; break;
42875bd8deadSopenharmony_ci          }
42885bd8deadSopenharmony_ci          if (negate) {
42895bd8deadSopenharmony_ci            result = -result;
42905bd8deadSopenharmony_ci          }
42915bd8deadSopenharmony_ci          return result;
42925bd8deadSopenharmony_ci      }
42935bd8deadSopenharmony_ci
42945bd8deadSopenharmony_ci    The entire extended swizzle operation is then defined using the following
42955bd8deadSopenharmony_ci    pseudocode:
42965bd8deadSopenharmony_ci
42975bd8deadSopenharmony_ci      tmp = VectorLoad(op0);
42985bd8deadSopenharmony_ci      result.x = ExtSwizComponent(tmp, xSelect, xNegate);
42995bd8deadSopenharmony_ci      result.y = ExtSwizComponent(tmp, ySelect, yNegate);
43005bd8deadSopenharmony_ci      result.z = ExtSwizComponent(tmp, zSelect, zNegate);
43015bd8deadSopenharmony_ci      result.w = ExtSwizComponent(tmp, wSelect, wNegate);
43025bd8deadSopenharmony_ci
43035bd8deadSopenharmony_ci    "xSelect", "xNegate", "ySelect", "yNegate", "zSelect", "zNegate",
43045bd8deadSopenharmony_ci    "wSelect", and "wNegate" correspond to the "select" and "negate" values
43055bd8deadSopenharmony_ci    above for the four <extSwizComp> matches.  
43065bd8deadSopenharmony_ci
43075bd8deadSopenharmony_ci    Since this instruction allows for component selection and negation for
43085bd8deadSopenharmony_ci    each individual component, the grammar does not allow the use of the
43095bd8deadSopenharmony_ci    normal swizzle and negation operations allowed for vector operands in
43105bd8deadSopenharmony_ci    other instructions.
43115bd8deadSopenharmony_ci
43125bd8deadSopenharmony_ci
43135bd8deadSopenharmony_ci    Section 2.14.5.27,  XPD:  Cross Product
43145bd8deadSopenharmony_ci
43155bd8deadSopenharmony_ci    The XPD instruction computes the cross product using the first three
43165bd8deadSopenharmony_ci    components of its two vector operands to generate the x, y, and z
43175bd8deadSopenharmony_ci    components of the result vector.  The w component of the result vector is
43185bd8deadSopenharmony_ci    undefined.
43195bd8deadSopenharmony_ci
43205bd8deadSopenharmony_ci      tmp0 = VectorLoad(op0);
43215bd8deadSopenharmony_ci      tmp1 = VectorLoad(op1);
43225bd8deadSopenharmony_ci      result.x = tmp0.y * tmp1.z - tmp0.z * tmp1.y;
43235bd8deadSopenharmony_ci      result.y = tmp0.z * tmp1.x - tmp0.x * tmp1.z;
43245bd8deadSopenharmony_ci      result.z = tmp0.x * tmp1.y - tmp0.y * tmp1.x;
43255bd8deadSopenharmony_ci
43265bd8deadSopenharmony_ci
43275bd8deadSopenharmony_ci    Section 2.14.6,  Program Matrices
43285bd8deadSopenharmony_ci
43295bd8deadSopenharmony_ci    In addition to GL's conventional matrices, several additional program
43305bd8deadSopenharmony_ci    matrices are available for use as program parameters.  These matrices have
43315bd8deadSopenharmony_ci    names of the form MATRIX<i>_ARB where <i> is between zero and <n>-1 where
43325bd8deadSopenharmony_ci    <n> is the value of the implementation-dependent constant
43335bd8deadSopenharmony_ci    MAX_PROGRAM_MATRICES_ARB.  The MATRIX<i>_ARB constants obey MATRIX<i>_ARB
43345bd8deadSopenharmony_ci    = MATRIX0_ARB + <i>.  The value of MAX_PROGRAM_MATRICES_ARB must be at
43355bd8deadSopenharmony_ci    least eight.  The maximum stack depth for program matrices is defined by
43365bd8deadSopenharmony_ci    the MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB and must be at least 1.
43375bd8deadSopenharmony_ci
43385bd8deadSopenharmony_ci
43395bd8deadSopenharmony_ci    Section 2.14.7  Required Vertex Program State 
43405bd8deadSopenharmony_ci
43415bd8deadSopenharmony_ci    The state required to support program objects of all targets consists of:
43425bd8deadSopenharmony_ci
43435bd8deadSopenharmony_ci      an integer for the program error position, initially -1;
43445bd8deadSopenharmony_ci
43455bd8deadSopenharmony_ci      an array of ubytes for the program error string, initially empty;
43465bd8deadSopenharmony_ci
43475bd8deadSopenharmony_ci      and the state that must be maintained to indicate which integers are
43485bd8deadSopenharmony_ci      currently in use as program object names.
43495bd8deadSopenharmony_ci
43505bd8deadSopenharmony_ci    The state required to support the vertex program target consists of:
43515bd8deadSopenharmony_ci
43525bd8deadSopenharmony_ci      a bit indicating whether or not program mode is enabled, initially
43535bd8deadSopenharmony_ci      disabled;
43545bd8deadSopenharmony_ci
43555bd8deadSopenharmony_ci      a bit indicating whether or not vertex program two-sided color mode is
43565bd8deadSopenharmony_ci      enabled, initially disabled;
43575bd8deadSopenharmony_ci
43585bd8deadSopenharmony_ci      a bit indicating whether or not vertex program point size mode is
43595bd8deadSopenharmony_ci      enabled, initially disabled;
43605bd8deadSopenharmony_ci
43615bd8deadSopenharmony_ci      a set of MAX_PROGRAM_ENV_PARAMETERS_ARB four-component floating-point
43625bd8deadSopenharmony_ci      program environment parameters, initially set to (0,0,0,0);
43635bd8deadSopenharmony_ci
43645bd8deadSopenharmony_ci      and an unsigned integer naming the currently bound vertex program,
43655bd8deadSopenharmony_ci      initially zero.
43665bd8deadSopenharmony_ci
43675bd8deadSopenharmony_ci   The state required for each vertex program object consists of:
43685bd8deadSopenharmony_ci
43695bd8deadSopenharmony_ci      an unsigned integer indicating the program object name;
43705bd8deadSopenharmony_ci
43715bd8deadSopenharmony_ci      an array of type ubyte containing the program string, initially empty;
43725bd8deadSopenharmony_ci
43735bd8deadSopenharmony_ci      an unsigned integer holding the length of the program string, initially
43745bd8deadSopenharmony_ci      zero;
43755bd8deadSopenharmony_ci
43765bd8deadSopenharmony_ci      an enum indicating the program string format, initially
43775bd8deadSopenharmony_ci      PROGRAM_FORMAT_ASCII_ARB;
43785bd8deadSopenharmony_ci
43795bd8deadSopenharmony_ci      five unsigned integers holding the number of instruction, temporary
43805bd8deadSopenharmony_ci      variable, vertex attribute binding, address register, and program
43815bd8deadSopenharmony_ci      parameter binding resources used by the program, initially all zero;
43825bd8deadSopenharmony_ci
43835bd8deadSopenharmony_ci      five unsigned integers holding the number of native instruction,
43845bd8deadSopenharmony_ci      temporary variable, vertex attribute binding, address register, and
43855bd8deadSopenharmony_ci      program parameter binding resources used by the program, initially all
43865bd8deadSopenharmony_ci      zero;
43875bd8deadSopenharmony_ci
43885bd8deadSopenharmony_ci      and a set of MAX_PROGRAM_LOCAL_PARAMETERS_ARB four-component
43895bd8deadSopenharmony_ci      floating-point program local parameters, initially set to (0,0,0,0).
43905bd8deadSopenharmony_ci
43915bd8deadSopenharmony_ci   Initially, no vertex program objects exist.
43925bd8deadSopenharmony_ci
43935bd8deadSopenharmony_ci
43945bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 1.3 Specification (Rasterization) 
43955bd8deadSopenharmony_ci
43965bd8deadSopenharmony_ci    Modify Section 3.3, Points (p. 63)
43975bd8deadSopenharmony_ci
43985bd8deadSopenharmony_ci    (replace the first paragraph) When vertex program mode and vertex progam
43995bd8deadSopenharmony_ci    point size mode are both enabled, the point size used for point
44005bd8deadSopenharmony_ci    rasterization is taken from the transformed vertex's point size attribute.
44015bd8deadSopenharmony_ci    Otherwise, it is controlled with
44025bd8deadSopenharmony_ci
44035bd8deadSopenharmony_ci     void PointSize(float size);
44045bd8deadSopenharmony_ci
44055bd8deadSopenharmony_ci    size specifies the width or diameter of a point.  The initial point size
44065bd8deadSopenharmony_ci    value is 1.0.  A value less than or equal to zero results in the error
44075bd8deadSopenharmony_ci    INVALID_VALUE.
44085bd8deadSopenharmony_ci
44095bd8deadSopenharmony_ci    Vertex program point size mode is enabled and disabled by calling Enable
44105bd8deadSopenharmony_ci    or Disable with the symbolic value VERTEX_PROGRAM_POINT_SIZE_ARB.
44115bd8deadSopenharmony_ci
44125bd8deadSopenharmony_ci
44135bd8deadSopenharmony_ci    Modify Section 3.9, Color Sum (p. 154)
44145bd8deadSopenharmony_ci
44155bd8deadSopenharmony_ci    After texturing, a fragment has two RGBA colors: a primary color c_pri
44165bd8deadSopenharmony_ci    (which texturing, if enabled, may have modified) and a secondary color
44175bd8deadSopenharmony_ci    c_sec.  If color sum is enabled, the R, G, and B components of these two
44185bd8deadSopenharmony_ci    colors are summed, and with the A component of the primary color produce a
44195bd8deadSopenharmony_ci    single post-texturing RGBA color c. The components of c are then clamped
44205bd8deadSopenharmony_ci    to the range [0,1].  If color sum is disabled, then c_pri is assigned to
44215bd8deadSopenharmony_ci    the post-texturing color.
44225bd8deadSopenharmony_ci
44235bd8deadSopenharmony_ci    Color sum is enabled or disabled using the generic Enable and Disable
44245bd8deadSopenharmony_ci    commands, respectively, with the symbolic constant COLOR_SUM_ARB.  If
44255bd8deadSopenharmony_ci    vertex program mode is disabled and lighting is enabled, the color sum
44265bd8deadSopenharmony_ci    stage is always applied, ignoring the value of COLOR_SUM_ARB.
44275bd8deadSopenharmony_ci
44285bd8deadSopenharmony_ci    The state required is a single bit indicating whether color sum is enabled
44295bd8deadSopenharmony_ci    or disabled. In the initial state, color sum is disabled.
44305bd8deadSopenharmony_ci
44315bd8deadSopenharmony_ci
44325bd8deadSopenharmony_ci    Modify Section 3.10, Fog (p. 154)
44335bd8deadSopenharmony_ci
44345bd8deadSopenharmony_ci    (modify second paragraph) This factor f may be computed according to one
44355bd8deadSopenharmony_ci    of three equations:
44365bd8deadSopenharmony_ci
44375bd8deadSopenharmony_ci            f = exp(-d*c),                               (3.24)
44385bd8deadSopenharmony_ci            f = exp(-(d*c)^2), or                        (3.25)
44395bd8deadSopenharmony_ci            f = (e-c)/(e-s)                              (3.26)
44405bd8deadSopenharmony_ci
44415bd8deadSopenharmony_ci    If vertex program mode is enabled or if the fog source (as defined below)
44425bd8deadSopenharmony_ci    is FOG_COORDINATE_EXT, then c is the fragment's fog coordinate.
44435bd8deadSopenharmony_ci    Otherwise, the c is the eye-coordinate distance from the eye, (0,0,0,1) in
44445bd8deadSopenharmony_ci    eye-coordinates, to the fragment center. ...
44455bd8deadSopenharmony_ci
44465bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 1.3 Specification (Per-Fragment
44475bd8deadSopenharmony_ciOperations and the Framebuffer) 
44485bd8deadSopenharmony_ci
44495bd8deadSopenharmony_ci    None
44505bd8deadSopenharmony_ci
44515bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 1.3 Specification (Special Functions) 
44525bd8deadSopenharmony_ci
44535bd8deadSopenharmony_ci    Modify Section 5.1, Evaluators (p. 181)
44545bd8deadSopenharmony_ci
44555bd8deadSopenharmony_ci    (modify next-to-last paragraph, p. 184) For MAP VERTEX 3, let q = p. For
44565bd8deadSopenharmony_ci    MAP VERTEX 4, let q=(x/w,y/w,z/w), where (x; y; z;w) = p. Then let 
44575bd8deadSopenharmony_ci
44585bd8deadSopenharmony_ci            dq   dq
44595bd8deadSopenharmony_ci        m = -- x --.
44605bd8deadSopenharmony_ci            du   dv
44615bd8deadSopenharmony_ci
44625bd8deadSopenharmony_ci    The the generated analytic normal, n, is given by n=m if vertex program
44635bd8deadSopenharmony_ci    mode is enabled or by n=m/|m| if vertex program mode is disabled.
44645bd8deadSopenharmony_ci
44655bd8deadSopenharmony_ci
44665bd8deadSopenharmony_ci    Modify Section 5.4, Display Lists (p. 191)
44675bd8deadSopenharmony_ci
44685bd8deadSopenharmony_ci    (modify third paragraph, p. 195) ... These are IsList, GenLists, ...,
44695bd8deadSopenharmony_ci    IsProgramARB, GenProgramsARB, DeleteProgramsARB, and
44705bd8deadSopenharmony_ci    VertexAttribPointerARB, EnableVertexAttribArrayARB,
44715bd8deadSopenharmony_ci    DisableVertexAttribArrayARB, as well as IsEnabled and all the Get commands
44725bd8deadSopenharmony_ci    (chapter 6).
44735bd8deadSopenharmony_ci
44745bd8deadSopenharmony_ci
44755bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 1.3 Specification (State and State
44765bd8deadSopenharmony_ciRequests)
44775bd8deadSopenharmony_ci
44785bd8deadSopenharmony_ci    Modify Section 6.1.2, Data Conversions (p. 198)
44795bd8deadSopenharmony_ci
44805bd8deadSopenharmony_ci    (add before last paragraph, p. 198) The matrix selected by the current
44815bd8deadSopenharmony_ci    matrix mode can be queried by calling GetBooleanv, GetIntegerv, GetFloatv,
44825bd8deadSopenharmony_ci    and GetDoublev with <pname> set to CURRENT_MATRIX_ARB; the matrix will be
44835bd8deadSopenharmony_ci    returned in transposed form with <pname> set to
44845bd8deadSopenharmony_ci    TRANSPOSE_CURRENT_MATRIX_ARB.  The depth of the selected matrix stack can
44855bd8deadSopenharmony_ci    be queried with <pname> set to CURRENT_MATRIX_STACK_DEPTH_ARB.  Querying
44865bd8deadSopenharmony_ci    CURRENT_MATRIX_ARB and CURRENT_MATRIX_STACK_DEPTH_ARB is the only means
44875bd8deadSopenharmony_ci    for querying the matrix and matrix stack depth of the program matrices
44885bd8deadSopenharmony_ci    described in section 2.14.6.
44895bd8deadSopenharmony_ci
44905bd8deadSopenharmony_ci
44915bd8deadSopenharmony_ci    Modify Section 6.1.11, Pointer and String Queries (p. 206)
44925bd8deadSopenharmony_ci
44935bd8deadSopenharmony_ci    (modify last paragraph, p. 206) ... The possible values for <name> are
44945bd8deadSopenharmony_ci    VENDOR, RENDERER, VERSION, EXTENSIONS, and PROGRAM_ERROR_STRING_ARB.
44955bd8deadSopenharmony_ci
44965bd8deadSopenharmony_ci    (add after last paragraph of section, p. 207) Queries of
44975bd8deadSopenharmony_ci    PROGRAM_ERROR_STRING_ARB return a pointer to an implementation-dependent
44985bd8deadSopenharmony_ci    program load error string.  If the last call to ProgramStringARB failed to
44995bd8deadSopenharmony_ci    load a program, the returned string describes at least one reason why the
45005bd8deadSopenharmony_ci    program failed to load.  If the last call to ProgramStringARB successfully
45015bd8deadSopenharmony_ci    loaded a program, the returned string may be empty (containing only a zero
45025bd8deadSopenharmony_ci    terminator) or may contain one or more implementation-dependent warning
45035bd8deadSopenharmony_ci    messages.  The contents of the error string are guaranteed to remain
45045bd8deadSopenharmony_ci    constant only until the next ProgramStringARB command, which may overwrite
45055bd8deadSopenharmony_ci    the error string.
45065bd8deadSopenharmony_ci
45075bd8deadSopenharmony_ci
45085bd8deadSopenharmony_ci    Insert a new Section 6.1.12, Program Queries (p. 207), between existing
45095bd8deadSopenharmony_ci    sections 6.1.11 and 6.1.12.
45105bd8deadSopenharmony_ci
45115bd8deadSopenharmony_ci    Section 6.1.12, Program Queries
45125bd8deadSopenharmony_ci
45135bd8deadSopenharmony_ci    The commands
45145bd8deadSopenharmony_ci
45155bd8deadSopenharmony_ci      void GetProgramEnvParameterdvARB(enum target, uint index,
45165bd8deadSopenharmony_ci                                       double *params);
45175bd8deadSopenharmony_ci      void GetProgramEnvParameterfvARB(enum target, uint index,
45185bd8deadSopenharmony_ci                                       float *params);
45195bd8deadSopenharmony_ci
45205bd8deadSopenharmony_ci    obtain the current value for the program environment parameter numbered
45215bd8deadSopenharmony_ci    <index> for the given program target <target>, and places the information
45225bd8deadSopenharmony_ci    in the array <params>.  The error INVALID_ENUM is generated if <target>
45235bd8deadSopenharmony_ci    specifies a nonexistent program target or a program target that does not
45245bd8deadSopenharmony_ci    support program environment parameters.  The error INVALID_VALUE is
45255bd8deadSopenharmony_ci    generated if <index> is greater than or equal to the
45265bd8deadSopenharmony_ci    implementation-dependent number of supported program environment
45275bd8deadSopenharmony_ci    parameters for the program target.
45285bd8deadSopenharmony_ci
45295bd8deadSopenharmony_ci    When <target> is VERTEX_PROGRAM_ARB, each program parameter returned is an
45305bd8deadSopenharmony_ci    array of four values.
45315bd8deadSopenharmony_ci
45325bd8deadSopenharmony_ci    The commands
45335bd8deadSopenharmony_ci
45345bd8deadSopenharmony_ci      void GetProgramLocalParameterdvARB(enum target, uint index,
45355bd8deadSopenharmony_ci                                         double *params);
45365bd8deadSopenharmony_ci      void GetProgramLocalParameterfvARB(enum target, uint index,
45375bd8deadSopenharmony_ci                                         float *params);
45385bd8deadSopenharmony_ci
45395bd8deadSopenharmony_ci    obtain the current value for the program local parameter numbered <index>
45405bd8deadSopenharmony_ci    belonging to the program object currently bound to <target>, and places
45415bd8deadSopenharmony_ci    the information in the array <params>.  The error INVALID_ENUM is
45425bd8deadSopenharmony_ci    generated if <target> specifies a nonexistent program target or a program
45435bd8deadSopenharmony_ci    target that does not support program local parameters.  The error
45445bd8deadSopenharmony_ci    INVALID_VALUE is generated if <index> is greater than or equal to the
45455bd8deadSopenharmony_ci    implementation-dependent number of supported program local parameters for
45465bd8deadSopenharmony_ci    the program target.
45475bd8deadSopenharmony_ci
45485bd8deadSopenharmony_ci    When the program target type is VERTEX_PROGRAM_ARB, each program
45495bd8deadSopenharmony_ci    local parameter returned is an array of four values.
45505bd8deadSopenharmony_ci
45515bd8deadSopenharmony_ci    The command
45525bd8deadSopenharmony_ci
45535bd8deadSopenharmony_ci      void GetProgramivARB(enum target, enum pname, int *params);
45545bd8deadSopenharmony_ci
45555bd8deadSopenharmony_ci    obtains program state for the program target <target>, writing the state
45565bd8deadSopenharmony_ci    into the array given by <params>.  GetProgramivARB can be used to
45575bd8deadSopenharmony_ci    determine the properties of the currently bound program object or
45585bd8deadSopenharmony_ci    implementation limits for <target>.
45595bd8deadSopenharmony_ci
45605bd8deadSopenharmony_ci    If <pname> is PROGRAM_LENGTH_ARB, PROGRAM_FORMAT_ARB, or
45615bd8deadSopenharmony_ci    PROGRAM_BINDING_ARB, GetProgramivARB returns one integer holding the
45625bd8deadSopenharmony_ci    program string length (in bytes), program string format, and program name,
45635bd8deadSopenharmony_ci    respectively, for the program object currently bound to <target>.
45645bd8deadSopenharmony_ci
45655bd8deadSopenharmony_ci    If <pname> is MAX_PROGRAM_LOCAL_PARAMETERS_ARB or
45665bd8deadSopenharmony_ci    MAX_PROGRAM_ENV_PARAMETERS_ARB, GetProgramivARB returns one integer
45675bd8deadSopenharmony_ci    holding the maximum number of program local parameters or program
45685bd8deadSopenharmony_ci    environment parameters, respectively, supported for the program target
45695bd8deadSopenharmony_ci    <target>.
45705bd8deadSopenharmony_ci
45715bd8deadSopenharmony_ci    If <pname> is MAX_PROGRAM_INSTRUCTIONS_ARB, MAX_PROGRAM_TEMPORARIES_ARB,
45725bd8deadSopenharmony_ci    MAX_PROGRAM_PARAMETERS_ARB, MAX_PROGRAM_ATTRIBS_ARB, or
45735bd8deadSopenharmony_ci    MAX_PROGRAM_ADDRESS_REGISTERS_ARB, GetProgramivARB returns a single
45745bd8deadSopenharmony_ci    integer giving the maximum number of instructions, temporaries,
45755bd8deadSopenharmony_ci    parameters, attributes, and address registers that can be used by a
45765bd8deadSopenharmony_ci    program of type <target>.  If <pname> is PROGRAM_INSTRUCTIONS_ARB,
45775bd8deadSopenharmony_ci    PROGRAM_TEMPORARIES_ARB, PROGRAM_PARAMETERS_ARB, PROGRAM_ATTRIBS_ARB, or
45785bd8deadSopenharmony_ci    PROGRAM_ADDRESS_REGISTERS_ARB, GetProgramivARB returns a single integer
45795bd8deadSopenharmony_ci    giving the number of instructions, temporaries, parameters, attributes,
45805bd8deadSopenharmony_ci    and address registers used by the current program for <target>.
45815bd8deadSopenharmony_ci
45825bd8deadSopenharmony_ci    If <pname> is MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB,
45835bd8deadSopenharmony_ci    MAX_PROGRAM_NATIVE_TEMPORARIES_ARB, MAX_PROGRAM_NATIVE_PARAMETERS_ARB,
45845bd8deadSopenharmony_ci    MAX_PROGRAM_NATIVE_ATTRIBS_ARB, or
45855bd8deadSopenharmony_ci    MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB, GetProgramivARB returns a single
45865bd8deadSopenharmony_ci    integer giving the maximum number of native instruction, temporary,
45875bd8deadSopenharmony_ci    parameter, attribute, and address register resources available to a
45885bd8deadSopenharmony_ci    program of type <target>.  If <pname> is PROGRAM_NATIVE_INSTRUCTIONS_ARB,
45895bd8deadSopenharmony_ci    PROGRAM_NATIVE_TEMPORARIES_ARB, PROGRAM_NATIVE_PARAMETERS_ARB,
45905bd8deadSopenharmony_ci    PROGRAM_NATIVE_ATTRIBS_ARB, or PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB,
45915bd8deadSopenharmony_ci    GetProgramivARB returns a single integer giving the number of native
45925bd8deadSopenharmony_ci    instruction, temporary, parameter, attribute, and address register
45935bd8deadSopenharmony_ci    resources consumed by the program currently bound to <target>.  Native
45945bd8deadSopenharmony_ci    resource counts will reflect the results of implementation-dependent
45955bd8deadSopenharmony_ci    scheduling and optimization algorithms applied by the GL, as well as
45965bd8deadSopenharmony_ci    emulation of non-native features.  If <pname> is
45975bd8deadSopenharmony_ci    PROGRAM_UNDER_NATIVE_LIMITS_ARB, GetProgramivARB returns 0 if the native
45985bd8deadSopenharmony_ci    resource consumption of the program currently bound to <target> exceeds
45995bd8deadSopenharmony_ci    the number of available resources for any resource type, and 1 otherwise.
46005bd8deadSopenharmony_ci
46015bd8deadSopenharmony_ci    The command
46025bd8deadSopenharmony_ci
46035bd8deadSopenharmony_ci      void GetProgramStringARB(enum target, enum pname, void *string);
46045bd8deadSopenharmony_ci
46055bd8deadSopenharmony_ci    obtains the program string for the program object bound to <target> and
46065bd8deadSopenharmony_ci    places the information in the array <string>.  <pname> must be
46075bd8deadSopenharmony_ci    PROGRAM_STRING_ARB.  <n> ubytes are returned into the array program where
46085bd8deadSopenharmony_ci    <n> is the length of the program in ubytes, as returned by GetProgramivARB
46095bd8deadSopenharmony_ci    when <pname> is PROGRAM_LENGTH_ARB.  The program string is always returned
46105bd8deadSopenharmony_ci    using the format given when the program string was specified.
46115bd8deadSopenharmony_ci
46125bd8deadSopenharmony_ci    The commands
46135bd8deadSopenharmony_ci
46145bd8deadSopenharmony_ci      void GetVertexAttribdvARB(uint index, enum pname, double *params);
46155bd8deadSopenharmony_ci      void GetVertexAttribfvARB(uint index, enum pname, float *params);
46165bd8deadSopenharmony_ci      void GetVertexAttribivARB(uint index, enum pname, int *params);
46175bd8deadSopenharmony_ci
46185bd8deadSopenharmony_ci    obtain the vertex attribute state named by <pname> for the vertex
46195bd8deadSopenharmony_ci    attribute numbered <index> and places the information in the array
46205bd8deadSopenharmony_ci    <params>.  <pname> must be one of VERTEX_ATTRIB_ARRAY_ENABLED_ARB,
46215bd8deadSopenharmony_ci    VERTEX_ATTRIB_ARRAY_SIZE_ARB, VERTEX_ATTRIB_ARRAY_STRIDE_ARB,
46225bd8deadSopenharmony_ci    VERTEX_ATTRIB_ARRAY_TYPE_ARB, VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB, or
46235bd8deadSopenharmony_ci    CURRENT_VERTEX_ATTRIB_ARB.  Note that all the queries except
46245bd8deadSopenharmony_ci    CURRENT_VERTEX_ATTRIB_ARB return client state.  The error INVALID_VALUE is
46255bd8deadSopenharmony_ci    generated if <index> is greater than or equal to MAX_VERTEX_ATTRIBS_ARB.
46265bd8deadSopenharmony_ci    The error INVALID_OPERATION is generated if <index> is zero and <pname> is
46275bd8deadSopenharmony_ci    CURRENT_VERTEX_ATTRIB_ARB, as there is no current value for vertex
46285bd8deadSopenharmony_ci    attribute zero.
46295bd8deadSopenharmony_ci
46305bd8deadSopenharmony_ci    The command
46315bd8deadSopenharmony_ci
46325bd8deadSopenharmony_ci      void GetVertexAttribPointervARB(uint index, enum pname, void **pointer);
46335bd8deadSopenharmony_ci    
46345bd8deadSopenharmony_ci    obtains the pointer named <pname> for vertex attribute numbered <index>
46355bd8deadSopenharmony_ci    and places the information in the array <pointer>.  <pname> must be
46365bd8deadSopenharmony_ci    VERTEX_ATTRIB_ARRAY_POINTER_ARB.  The INVALID_VALUE error is generated if
46375bd8deadSopenharmony_ci    <index> is greater than or equal to MAX_VERTEX_ATTRIBS_ARB.
46385bd8deadSopenharmony_ci
46395bd8deadSopenharmony_ci    The command
46405bd8deadSopenharmony_ci
46415bd8deadSopenharmony_ci      boolean IsProgramARB(uint program);
46425bd8deadSopenharmony_ci
46435bd8deadSopenharmony_ci    returns TRUE if <program> is the name of a program object.  If <program>
46445bd8deadSopenharmony_ci    is zero or is a non-zero value that is not the name of a program object,
46455bd8deadSopenharmony_ci    or if an error condition occurs, IsProgramARB returns FALSE.  A name
46465bd8deadSopenharmony_ci    returned by GenProgramsARB, but not yet bound, is not the name of a
46475bd8deadSopenharmony_ci    program object.
46485bd8deadSopenharmony_ci
46495bd8deadSopenharmony_ci
46505bd8deadSopenharmony_ci    Concerning Section 6.1.12, Saving and Restoring State (p. 207):
46515bd8deadSopenharmony_ci
46525bd8deadSopenharmony_ci    (no actual modifications to the spec) Only the enables, current vertex
46535bd8deadSopenharmony_ci    attributes, and vertex array state introduced by this extension can be
46545bd8deadSopenharmony_ci    pushed and popped.  See the attribute column in Table X.6 for determining
46555bd8deadSopenharmony_ci    what vertex program state can be pushed and popped with PushAttrib,
46565bd8deadSopenharmony_ci    PopAttrib, PushClientAttrib, and PopClientAttrib.
46575bd8deadSopenharmony_ci
46585bd8deadSopenharmony_ci
46595bd8deadSopenharmony_ciAdditions to Appendix A of the OpenGL 1.3 Specification (Invariance)
46605bd8deadSopenharmony_ci
46615bd8deadSopenharmony_ci    Add to end of Section A.3 (p. 242):
46625bd8deadSopenharmony_ci
46635bd8deadSopenharmony_ci      Rule 4.  Vertex program instructions not relevant to the calculation of
46645bd8deadSopenharmony_ci      any result must have no effect on that result.
46655bd8deadSopenharmony_ci
46665bd8deadSopenharmony_ci      Rule 5.  Vertex program instructions relevant to the calculation of any
46675bd8deadSopenharmony_ci      result must always produce the identical result.
46685bd8deadSopenharmony_ci
46695bd8deadSopenharmony_ci    Instructions relevant to the calculation of a result are any instructions
46705bd8deadSopenharmony_ci    in a sequence of instructions that eventually determine the source values
46715bd8deadSopenharmony_ci    for the calculation under consideration.
46725bd8deadSopenharmony_ci
46735bd8deadSopenharmony_ci    There is no guaranteed invariance between vertices transformed by
46745bd8deadSopenharmony_ci    conventional GL vertex transform mode and vertices transformed by vertex
46755bd8deadSopenharmony_ci    program mode.  Multi-pass rendering algorithms that require rendering
46765bd8deadSopenharmony_ci    invariances to operate correctly should not mix conventional GL vertex
46775bd8deadSopenharmony_ci    transform mode with vertex program mode for different rendering passes,
46785bd8deadSopenharmony_ci    except by using the position invariance option (section 2.14.4.5.1) in all
46795bd8deadSopenharmony_ci    vertex program mode passes.  However, such algorithms will operate
46805bd8deadSopenharmony_ci    correctly if the algorithms limit themselves to a single mode of vertex
46815bd8deadSopenharmony_ci    transformation.
46825bd8deadSopenharmony_ci
46835bd8deadSopenharmony_ci
46845bd8deadSopenharmony_ciAdditions to the AGL/GLX/WGL Specifications
46855bd8deadSopenharmony_ci
46865bd8deadSopenharmony_ci    Program objects are shared between AGL/GLX/WGL rendering contexts if
46875bd8deadSopenharmony_ci    and only if the rendering contexts share display lists.  No change
46885bd8deadSopenharmony_ci    is made to the AGL/GLX/WGL API.
46895bd8deadSopenharmony_ci
46905bd8deadSopenharmony_ci    Changes to program objects shared between multiple rendering contexts will
46915bd8deadSopenharmony_ci    be serialized (i.e., the changes will occur in a specific order).  
46925bd8deadSopenharmony_ci
46935bd8deadSopenharmony_ci    Changes to a program object made by one rendering context are not
46945bd8deadSopenharmony_ci    guaranteed to take effect in another rendering context until the other
46955bd8deadSopenharmony_ci    calls BindProgram to bind the program object.  
46965bd8deadSopenharmony_ci
46975bd8deadSopenharmony_ci    When a program object is deleted by one rendering context, the object
46985bd8deadSopenharmony_ci    itself is not destroyed until it is no longer the current program object
46995bd8deadSopenharmony_ci    in any context.  However, the name of the deleted object is removed from
47005bd8deadSopenharmony_ci    the program object name space, so the next attempt to bind a program using
47015bd8deadSopenharmony_ci    the same name will create a new program object.  Recall that destroying a
47025bd8deadSopenharmony_ci    program object bound in the current rendering context effectively unbinds
47035bd8deadSopenharmony_ci    the object being destroyed.
47045bd8deadSopenharmony_ci
47055bd8deadSopenharmony_ci
47065bd8deadSopenharmony_ciDependencies on EXT_vertex_weighting and ARB_vertex_blend
47075bd8deadSopenharmony_ci
47085bd8deadSopenharmony_ci    If EXT_vertex_weighting and ARB_vertex_blend are both not supported, all
47095bd8deadSopenharmony_ci    discussions of vertex weights should be removed.  
47105bd8deadSopenharmony_ci
47115bd8deadSopenharmony_ci    In particular, references to vertex weights should be removed from Table
47125bd8deadSopenharmony_ci    X.1, and the description of ArrayElement in section 2.8.  The line
47135bd8deadSopenharmony_ci
47145bd8deadSopenharmony_ci      "weight" <vtxOptWeightNum>
47155bd8deadSopenharmony_ci
47165bd8deadSopenharmony_ci    should be removed from the <vtxAttribItem> grammar rule, and the grammar
47175bd8deadSopenharmony_ci    rules <vtxOptWeightNum> and <vtxWeightNum> should be deleted.
47185bd8deadSopenharmony_ci    "vertex.weight" and "vertex.weight[n]" should be removed from Table X.2.
47195bd8deadSopenharmony_ci    The discussion of vertex weights in section 2.14.3.1 should be removed.
47205bd8deadSopenharmony_ci
47215bd8deadSopenharmony_ci    Additionally, the first line of Table X.3.8 should be modified to read:
47225bd8deadSopenharmony_ci
47235bd8deadSopenharmony_ci      Binding                               Underlying State
47245bd8deadSopenharmony_ci      ------------------------------------  ---------------------------
47255bd8deadSopenharmony_ci        state.matrix.modelview              modelview matrix
47265bd8deadSopenharmony_ci    
47275bd8deadSopenharmony_ci
47285bd8deadSopenharmony_ciDependencies on ARB_matrix_palette:
47295bd8deadSopenharmony_ci
47305bd8deadSopenharmony_ci    If ARB_matrix_palette is not supported, all discussions of per-vertex
47315bd8deadSopenharmony_ci    matrix indices and the matrix palette should be removed.
47325bd8deadSopenharmony_ci
47335bd8deadSopenharmony_ci    In particular, the reference to matrix indices should be removed from the
47345bd8deadSopenharmony_ci    description of ArrayElement in section 2.8.  The line
47355bd8deadSopenharmony_ci
47365bd8deadSopenharmony_ci      "matrixindex" "[" <vtxWeightNum> "]"
47375bd8deadSopenharmony_ci
47385bd8deadSopenharmony_ci    should be removed from the <vtxAttribItem> grammar rule.  The line
47395bd8deadSopenharmony_ci
47405bd8deadSopenharmony_ci      "palette" "[" <statePaletteMatNum> "]"
47415bd8deadSopenharmony_ci
47425bd8deadSopenharmony_ci    should be removed from the <stateMatrixName> grammar rule, and the
47435bd8deadSopenharmony_ci    <statePaletteMatNum> grammar rule should be removed entirely.
47445bd8deadSopenharmony_ci    "vertex.matrixindex[n]" should be removed from Table X.2, and
47455bd8deadSopenharmony_ci    "state.matrix.palette[n]" should be removed from Table X.3.8.  The
47465bd8deadSopenharmony_ci    discussion of vertex matrix indices in section 2.14.3.1 should be removed.
47475bd8deadSopenharmony_ci
47485bd8deadSopenharmony_ciDependencies on EXT_point_parameters and ARB_point_parameters
47495bd8deadSopenharmony_ci
47505bd8deadSopenharmony_ci    The discussion of point size determination in EXT/ARB_point_parameters
47515bd8deadSopenharmony_ci    should qualified to indicate that this functionality only applies when
47525bd8deadSopenharmony_ci    vertex program mode is disabled.
47535bd8deadSopenharmony_ci
47545bd8deadSopenharmony_ci    If EXT/ARB_point_parameters is not supported, references to point
47555bd8deadSopenharmony_ci    parameter state should be eliminated.  In particular,
47565bd8deadSopenharmony_ci
47575bd8deadSopenharmony_ci      "attenuation"
47585bd8deadSopenharmony_ci
47595bd8deadSopenharmony_ci    should be eliminated from the <statePointProperty> grammar rule, and the
47605bd8deadSopenharmony_ci    corresponding entries in Table X.3.7 should be eliminated.
47615bd8deadSopenharmony_ci
47625bd8deadSopenharmony_ci    Additionally, references to the minimum and maximum point sizes and the
47635bd8deadSopenharmony_ci    fade threshold should be removed from Table X.3.7 and the explanatory text
47645bd8deadSopenharmony_ci    immediately thereafter.  The components column of the "state.point.size"
47655bd8deadSopenharmony_ci    binding in Table X.3.7 should read (s,0,0,1).
47665bd8deadSopenharmony_ci
47675bd8deadSopenharmony_ci    Even if EXT/ARB_point_parameters is not supported, the point size result
47685bd8deadSopenharmony_ci    (result.pointsize) still operates as specified.
47695bd8deadSopenharmony_ci
47705bd8deadSopenharmony_ciDependencies on EXT_fog_coord
47715bd8deadSopenharmony_ci
47725bd8deadSopenharmony_ci    If EXT_fog_coord is not supported, references to fog coordinates should be
47735bd8deadSopenharmony_ci    removed from Table X.1, and the description of ArrayElement in section
47745bd8deadSopenharmony_ci    2.8.  The line "fogcoord" should be removed from the <vtxAttribItem>
47755bd8deadSopenharmony_ci    grammar rule, and "vertex.fogcoord" should be removed from Table X.2.
47765bd8deadSopenharmony_ci    Also, the use of FOG_COORDINATE_SOURCE_EXT in section 3.10 should be
47775bd8deadSopenharmony_ci    removed.
47785bd8deadSopenharmony_ci
47795bd8deadSopenharmony_ci    Even if EXT_fog_coord is not supported, the fog coordinate output
47805bd8deadSopenharmony_ci    (result.fogcoord) still operates as specified.  When in vertex program
47815bd8deadSopenharmony_ci    mode, there are no well-defined eye coordinates that could be used for
47825bd8deadSopenharmony_ci    fog.  This means that the functionality of EXT_fog_coord is required to
47835bd8deadSopenharmony_ci    implement ARB_vertex_program even if the EXT_fog_coord extension itself is
47845bd8deadSopenharmony_ci    not supported.
47855bd8deadSopenharmony_ci
47865bd8deadSopenharmony_ciDependencies on EXT_secondary_color
47875bd8deadSopenharmony_ci
47885bd8deadSopenharmony_ci    If EXT_secondary_color is not supported, references to secondary color
47895bd8deadSopenharmony_ci    should be removed from Table X.1, and the description of ArrayElement in
47905bd8deadSopenharmony_ci    section 2.8.  The line "secondary" should be removed from the
47915bd8deadSopenharmony_ci    <vtxOptColorType> grammar rule, and "vertex.color.secondary" should be
47925bd8deadSopenharmony_ci    removed from Table X.2.
47935bd8deadSopenharmony_ci
47945bd8deadSopenharmony_ci    Even if EXT_secondary_color is not supported, the secondary color results
47955bd8deadSopenharmony_ci    (result.color.secondary, result.color.front.secondary,
47965bd8deadSopenharmony_ci    result.color.back.secondary) still operate as specified in program mode,
47975bd8deadSopenharmony_ci    and when in program mode, the color sum enable behaves exactly as
47985bd8deadSopenharmony_ci    specified in EXT_secondary_color.  These vertex result registers are
47995bd8deadSopenharmony_ci    required to implement OpenGL 1.2's separate specular mode within a vertex
48005bd8deadSopenharmony_ci    program.
48015bd8deadSopenharmony_ci
48025bd8deadSopenharmony_ci    The color sum enable enumerant from EXT_secondary_color has been brought
48035bd8deadSopenharmony_ci    over and renamed to COLOR_SUM_ARB.  The enumerant value itself is
48045bd8deadSopenharmony_ci    unchanged from EXT_secondary_color.
48055bd8deadSopenharmony_ci
48065bd8deadSopenharmony_ciDependencies on ARB_transpose_matrix
48075bd8deadSopenharmony_ci
48085bd8deadSopenharmony_ci    If ARB_transpose_matrix is not supported, the discussion of
48095bd8deadSopenharmony_ci    TRANSPOSE_CURRENT_MATRIX_ARB in the edits to section 6.1.2 should be
48105bd8deadSopenharmony_ci    removed.
48115bd8deadSopenharmony_ci
48125bd8deadSopenharmony_ciInteractions with NV_vertex_program
48135bd8deadSopenharmony_ci
48145bd8deadSopenharmony_ci    The existing NV_vertex_program extension, if supported, also provides a
48155bd8deadSopenharmony_ci    similar vertex programming model.  This extension is incompatible with
48165bd8deadSopenharmony_ci    NV_vertex_program in a number of different ways.  Mixing the two models in
48175bd8deadSopenharmony_ci    a single application is possible but not recommended.  The interactions
48185bd8deadSopenharmony_ci    between the extensions are defined below.
48195bd8deadSopenharmony_ci
48205bd8deadSopenharmony_ci    Functions, enumerants, and programs defined in NV_vertex_program are
48215bd8deadSopenharmony_ci    called "NV functions", "NV enumerants", and "NV programs" respectively.
48225bd8deadSopenharmony_ci    Functions, enumerants, and programs defined in ARB_vertex_program are
48235bd8deadSopenharmony_ci    called "ARB functions", "ARB enumerants", and "ARB programs" respectively.
48245bd8deadSopenharmony_ci
48255bd8deadSopenharmony_ci    The following enumerants are identical in the two extensions:
48265bd8deadSopenharmony_ci
48275bd8deadSopenharmony_ci      ARB_vertex_program                  NV_vertex_program
48285bd8deadSopenharmony_ci      ------------------------------      ------------------------------
48295bd8deadSopenharmony_ci      VERTEX_PROGRAM_ARB                  VERTEX_PROGRAM_NV
48305bd8deadSopenharmony_ci      VERTEX_PROGRAM_POINT_SIZE_ARB       VERTEX_PROGRAM_POINT_SIZE_NV
48315bd8deadSopenharmony_ci      VERTEX_PROGRAM_TWO_SIDE_ARB         VERTEX_PROGRAM_TWO_SIDE_NV
48325bd8deadSopenharmony_ci      VERTEX_ATTRIB_ARRAY_SIZE_ARB        ATTRIB_ARRAY_SIZE_NV
48335bd8deadSopenharmony_ci      VERTEX_ATTRIB_ARRAY_STRIDE_ARB      ATTRIB_ARRAY_STRIDE_NV
48345bd8deadSopenharmony_ci      VERTEX_ATTRIB_ARRAY_TYPE_ARB        ATTRIB_ARRAY_TYPE_NV
48355bd8deadSopenharmony_ci      CURRENT_VERTEX_ATTRIB_ARB           CURRENT_ATTRIB_NV
48365bd8deadSopenharmony_ci      VERTEX_ATTRIB_ARRAY_POINTER_ARB     ATTRIB_ARRAY_POINTER_NV
48375bd8deadSopenharmony_ci      PROGRAM_LENGTH_ARB                  PROGRAM_LENGTH_NV
48385bd8deadSopenharmony_ci      PROGRAM_STRING_ARB                  PROGRAM_STRING_NV
48395bd8deadSopenharmony_ci      PROGRAM_ERROR_POSITION_ARB          PROGRAM_ERROR_POSITION_NV
48405bd8deadSopenharmony_ci      CURRENT_MATRIX_ARB                  CURRENT_MATRIX_NV
48415bd8deadSopenharmony_ci      CURRENT_MATRIX_STACK_DEPTH_ARB      CURRENT_MATRIX_STACK_DEPTH_NV
48425bd8deadSopenharmony_ci      MAX_PROGRAM_MATRICES_ARB            MAX_TRACK_MATRICES_NV
48435bd8deadSopenharmony_ci      MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB  MAX_TRACK_MATRIX_STACK_DEPTH_NV
48445bd8deadSopenharmony_ci        
48455bd8deadSopenharmony_ci    The following GL state is identical in the two extensions and can be set
48465bd8deadSopenharmony_ci    or queried using either NV functions or ARB functions.
48475bd8deadSopenharmony_ci
48485bd8deadSopenharmony_ci      - Vertex program mode enable.
48495bd8deadSopenharmony_ci
48505bd8deadSopenharmony_ci      - Vertex program point size mode enable.
48515bd8deadSopenharmony_ci
48525bd8deadSopenharmony_ci      - Vertex program two sided mode enable.
48535bd8deadSopenharmony_ci
48545bd8deadSopenharmony_ci      - Program error position.
48555bd8deadSopenharmony_ci
48565bd8deadSopenharmony_ci      - NV_vertex_program "program parameters" and ARB_vertex_program "program
48575bd8deadSopenharmony_ci        environment parameters".
48585bd8deadSopenharmony_ci
48595bd8deadSopenharmony_ci      - Current values of generic vertex attributes.  Conventional and generic
48605bd8deadSopenharmony_ci        vertex attributes will alias according to the NV_vertex_program spec,
48615bd8deadSopenharmony_ci        which is permissible but optional under ARB_vertex_program.
48625bd8deadSopenharmony_ci
48635bd8deadSopenharmony_ci      - NV_vertex_program "tracking matrices" and ARB_vertex_program "program
48645bd8deadSopenharmony_ci        matrices".  The NV and ARB enumerants passed to MatrixMode are
48655bd8deadSopenharmony_ci        different, however.
48665bd8deadSopenharmony_ci
48675bd8deadSopenharmony_ci      - Vertex attribute array sizes, types, strides, and pointers.
48685bd8deadSopenharmony_ci
48695bd8deadSopenharmony_ci      - Vertex program object names, targets, formats, program string, program
48705bd8deadSopenharmony_ci        string lengths, and residency information.  The ARB and NV query
48715bd8deadSopenharmony_ci        functions operate differently.  The ARB query function does not allow
48725bd8deadSopenharmony_ci        queries of target (passed in to the query) and residency information.
48735bd8deadSopenharmony_ci        The NV query function does not allow queries of program name (passed
48745bd8deadSopenharmony_ci        in to the query) or format.  The format of NV programs is always
48755bd8deadSopenharmony_ci        PROGRAM_FORMAT_ASCII_ARB.
48765bd8deadSopenharmony_ci
48775bd8deadSopenharmony_ci      - Current matrix and current matrix stack depth.
48785bd8deadSopenharmony_ci
48795bd8deadSopenharmony_ci      - Implementation-dependent limits on number of tracking/program matrices
48805bd8deadSopenharmony_ci        and tracking/program matrix stack depth.
48815bd8deadSopenharmony_ci
48825bd8deadSopenharmony_ci      - Program object name space.  Program objects are created differently in
48835bd8deadSopenharmony_ci        the NV and ARB specs.  Under the NV spec, program objects are created
48845bd8deadSopenharmony_ci        by calling LoadProgramNV.  Under the ARB spec, program objects are
48855bd8deadSopenharmony_ci        created by calling BindProgramARB with an unused program name.
48865bd8deadSopenharmony_ci       
48875bd8deadSopenharmony_ci    The following state is provided only by ARB_vertex_program:
48885bd8deadSopenharmony_ci
48895bd8deadSopenharmony_ci      - Program error string.  Querying the error string after calling
48905bd8deadSopenharmony_ci        LoadProgramNV produces undefined results.
48915bd8deadSopenharmony_ci
48925bd8deadSopenharmony_ci      - Vertex attribute array normalization enables.  Setting up vertex
48935bd8deadSopenharmony_ci        attribute arrays through NV functions will set the normalization
48945bd8deadSopenharmony_ci        enable appropriately based on the NV spec.
48955bd8deadSopenharmony_ci
48965bd8deadSopenharmony_ci      - Vertex program object resource counts and native resource counts.
48975bd8deadSopenharmony_ci        These values are undefined for NV programs.
48985bd8deadSopenharmony_ci
48995bd8deadSopenharmony_ci      - Vertex program local parameters.  They can not be used by NV programs.
49005bd8deadSopenharmony_ci
49015bd8deadSopenharmony_ci      - Implementation-dependent limits on the number of program environment
49025bd8deadSopenharmony_ci        parameters, program local parameters, resource counts, and native
49035bd8deadSopenharmony_ci        resource counts.  These limits are baked into the NV spec, except for
49045bd8deadSopenharmony_ci        native counts, which don't exist.
49055bd8deadSopenharmony_ci
49065bd8deadSopenharmony_ci    The following state is provided only by NV_vertex_program:
49075bd8deadSopenharmony_ci
49085bd8deadSopenharmony_ci      - TrackMatrix enables and transforms.
49095bd8deadSopenharmony_ci
49105bd8deadSopenharmony_ci      - Generic vertex attribute evaluator maps.  The NV evaluator
49115bd8deadSopenharmony_ci        functionality will be supported even for ARB programs.
49125bd8deadSopenharmony_ci
49135bd8deadSopenharmony_ci    The following are additional functional differences between
49145bd8deadSopenharmony_ci    ARB_vertex_program and NV_vertex_program:
49155bd8deadSopenharmony_ci
49165bd8deadSopenharmony_ci      - ARB program temporaries, address registers, and result registers are
49175bd8deadSopenharmony_ci        initially undefined.  The corresponding values in NV programs are
49185bd8deadSopenharmony_ci        initialized to (0,0,0,0), 0, and (0,0,0,1), respectively.  ARB
49195bd8deadSopenharmony_ci        programs running on NV_vertex_program platforms can not rely on
49205bd8deadSopenharmony_ci        NV_vertex_program initialization behavior for temporaries or address
49215bd8deadSopenharmony_ci        registers, but result registers will be initialized to (0,0,0,1).  In
49225bd8deadSopenharmony_ci        any event, ARB programs that rely on NV_vertex_program initialization
49235bd8deadSopenharmony_ci        may not behave properly on other platforms that support
49245bd8deadSopenharmony_ci        ARB_vertex_program but not NV_vertex_program.
49255bd8deadSopenharmony_ci
49265bd8deadSopenharmony_ci      - NV programs use a set of fixed variable and register names, with no
49275bd8deadSopenharmony_ci        support for user-defined variables.  ARB programs provide no support
49285bd8deadSopenharmony_ci        for fixed variable names; all variables must be declared, explicitly
49295bd8deadSopenharmony_ci        or implicitly, in the program.
49305bd8deadSopenharmony_ci
49315bd8deadSopenharmony_ci      - ARB programs support parameter variables that can be bound to selected
49325bd8deadSopenharmony_ci        GL state variables, and are updated automatically when the underlying
49335bd8deadSopenharmony_ci        state changes.  NV programs provide no such support; applications must
49345bd8deadSopenharmony_ci        set program parameters themselves.
49355bd8deadSopenharmony_ci
49365bd8deadSopenharmony_ci      - ARB programs allow program constants to be declared in the program
49375bd8deadSopenharmony_ci        text; NV programs require that constants be loaded into the program
49385bd8deadSopenharmony_ci        parameter array.
49395bd8deadSopenharmony_ci
49405bd8deadSopenharmony_ci      - ARB programs support program local parameters; NV programs do not.
49415bd8deadSopenharmony_ci        Applications using multiple NV programs must manage the shared program
49425bd8deadSopenharmony_ci        parameter array appropriately.
49435bd8deadSopenharmony_ci
49445bd8deadSopenharmony_ci      - ARB_vertex_program vertex array support provides a normalized flag to
49455bd8deadSopenharmony_ci        optionally normalize fixed-point array data to the [0,1] or [-1,1]
49465bd8deadSopenharmony_ci        range.  ARB_vertex_program also provides several immediate-mode entry
49475bd8deadSopenharmony_ci        points with the same support.  NV_vertex_program supports normalized
49485bd8deadSopenharmony_ci        data only for unsigned byte data types, and does not support
49495bd8deadSopenharmony_ci        non-normalized unsigned bytes.  VertexAttrib4ub{v}NV was renamed to
49505bd8deadSopenharmony_ci        VertexAttrib4Nub{v}ARB to indicate that the 4ub call normalizes its
49515bd8deadSopenharmony_ci        parameters to a [0,1] range.
49525bd8deadSopenharmony_ci
49535bd8deadSopenharmony_ci      - ARB_vertex_blend and ARB_matrix_palette support are documented by the
49545bd8deadSopenharmony_ci        ARB spec, but not by the NV spec.
49555bd8deadSopenharmony_ci
49565bd8deadSopenharmony_ci      - ARB_vertex_program contains an OPTION mechanism for future
49575bd8deadSopenharmony_ci        extensibility, and a position invariant program option.  Both features
49585bd8deadSopenharmony_ci        are found in NV_vertex_program1_1, but not in NV_vertex_program.
49595bd8deadSopenharmony_ci
49605bd8deadSopenharmony_ci      - NV_vertex_program supports a vertex state program target that allows
49615bd8deadSopenharmony_ci        programs to write to program parameters (VERTEX_STATE_PROGRAM_NV).  No
49625bd8deadSopenharmony_ci        such support exists in ARB_vertex_program.  Running a NV state program
49635bd8deadSopenharmony_ci        will update the program parameter/program environment parameter array,
49645bd8deadSopenharmony_ci        and such updates can be visible through ARB programs.
49655bd8deadSopenharmony_ci
49665bd8deadSopenharmony_ci      - LoadProgramNV entry point was changed to ProgramStringARB to match
49675bd8deadSopenharmony_ci        OpenGL convention that a verb should not be included in a command name
49685bd8deadSopenharmony_ci        that merely sets state.
49695bd8deadSopenharmony_ci
49705bd8deadSopenharmony_ci      - The formal parameter name for program objects was "id" in
49715bd8deadSopenharmony_ci        NV_vertex_program; in ARB_vertex_program, this formal name is now
49725bd8deadSopenharmony_ci        "program" to match how texture object routines name their formal
49735bd8deadSopenharmony_ci        texture object names "texture".
49745bd8deadSopenharmony_ci
49755bd8deadSopenharmony_ci      - NV_vertex_program has language that makes it sound that LoadProgramNV
49765bd8deadSopenharmony_ci        (ProgramStringARB) only accepts the VERTEX_PROGRAM_NV target and the
49775bd8deadSopenharmony_ci        start token must be "!!VP1.0".  This extension clarifies the language
49785bd8deadSopenharmony_ci        so that it is clear that other targets and start token types are
49795bd8deadSopenharmony_ci        permitted.
49805bd8deadSopenharmony_ci
49815bd8deadSopenharmony_ci      - NV_vertex_program numeric requirements are not present in the ARB
49825bd8deadSopenharmony_ci        spec.  The ARB spec requires nothing more than the numeric
49835bd8deadSopenharmony_ci        requirements spelled out in section 2.1.1 (Floating-Point
49845bd8deadSopenharmony_ci        Computations) in the core specification.
49855bd8deadSopenharmony_ci
49865bd8deadSopenharmony_ci      - ARB programs allow single instructions to source multiple distinct
49875bd8deadSopenharmony_ci        vertex attributes or program parameters.  NV programs do not.  On
49885bd8deadSopenharmony_ci        current NV_vertex_program hardware, such instructions may require
49895bd8deadSopenharmony_ci        additional instructions and temporaries to execute.
49905bd8deadSopenharmony_ci
49915bd8deadSopenharmony_ci      - ARB programs support the folowing instructions not supported by NV
49925bd8deadSopenharmony_ci        "VP1.0" programs:
49935bd8deadSopenharmony_ci
49945bd8deadSopenharmony_ci            * ABS:  absolute value.  Supported on VP1.1 NV programs, but not
49955bd8deadSopenharmony_ci              on VP1.0 programs.  Equivalent to "MAX dst, src, -src".
49965bd8deadSopenharmony_ci
49975bd8deadSopenharmony_ci            * EX2:  exponential base 2.  On VP1.0 and VP1.1 hardware, this
49985bd8deadSopenharmony_ci              instruction will be emulated using EXP and a number of
49995bd8deadSopenharmony_ci              additional instructions.
50005bd8deadSopenharmony_ci
50015bd8deadSopenharmony_ci            * FLR:  floor.  On VP1.0 and VP1.1 hardware, this instruction will
50025bd8deadSopenharmony_ci              be emulated using an EXP and an ADD instruction.
50035bd8deadSopenharmony_ci
50045bd8deadSopenharmony_ci            * FRC:  fraction.  On VP1.0 and VP1.1 hardware, this instruction
50055bd8deadSopenharmony_ci              will be emulated using an EXP instruction, and possibly a MOV
50065bd8deadSopenharmony_ci              instruction to replicate the scalar result.
50075bd8deadSopenharmony_ci
50085bd8deadSopenharmony_ci            * LG2:  logarithm base 2.  On VP1.0 and VP1.1 hardware, this
50095bd8deadSopenharmony_ci              instruction will be emulated using LOG and a number of
50105bd8deadSopenharmony_ci              additional instructions.
50115bd8deadSopenharmony_ci
50125bd8deadSopenharmony_ci            * POW:  exponentiation.  On VP1.0 and VP1.1 hardware, this
50135bd8deadSopenharmony_ci              instruction will be emulated using LOG, MUL, and EXP
50145bd8deadSopenharmony_ci              instructions, and possibly additional instructions to generate a
50155bd8deadSopenharmony_ci              high-precision result.
50165bd8deadSopenharmony_ci
50175bd8deadSopenharmony_ci            * SUB:  subtraction.  Supported on VP1.1 NV programs, but not on
50185bd8deadSopenharmony_ci              VP1.0 programs.  Equivalent to "ADD dst, src1, -src2".
50195bd8deadSopenharmony_ci
50205bd8deadSopenharmony_ci            * SWZ:  extended swizzle.  On VP1.0 and VP1.1 hardware, this
50215bd8deadSopenharmony_ci              instruction will be emulated using a single MAD instruction and
50225bd8deadSopenharmony_ci              a program parameter constant.
50235bd8deadSopenharmony_ci
50245bd8deadSopenharmony_ci            * XPD:  cross product.  On VP1.0 and VP1.1 hardware, this
50255bd8deadSopenharmony_ci              instruction will be emulated using a MUL and a MAD instruction.
50265bd8deadSopenharmony_ci
50275bd8deadSopenharmony_ci      - The COLOR_SUM_EXT enable is ignored when NV programs are executed
50285bd8deadSopenharmony_ci        (default secondary color outputs are zero) but not when ARB programs
50295bd8deadSopenharmony_ci        are executed (default secondary color outputs are undefined).  The
50305bd8deadSopenharmony_ci        driver will take care of the color sum operation based on which type
50315bd8deadSopenharmony_ci        of program is currently bound.
50325bd8deadSopenharmony_ci
50335bd8deadSopenharmony_ci      - NV programs are required to write a vertex position; ARB programs are
50345bd8deadSopenharmony_ci        not.
50355bd8deadSopenharmony_ci
50365bd8deadSopenharmony_ci      - There is both an ARB and an NV boolean enable for each generic
50375bd8deadSopenharmony_ci        array (two booleans per generic array).  Each generic array's NV
50385bd8deadSopenharmony_ci        enable is enabled with EnableClientState(VERTEX_ATTRIB_ARRAYn_NV)
50395bd8deadSopenharmony_ci        or disabled with DisableClientState(VERTEX_ATTRIB_ARRAYn_NV)
50405bd8deadSopenharmony_ci        while each generic array's ARB enable is enabled
50415bd8deadSopenharmony_ci        with EnableVertexAttribArrayARB(n) and disabled with
50425bd8deadSopenharmony_ci        DisableVertexAttribArrayARB(n).
50435bd8deadSopenharmony_ci
50445bd8deadSopenharmony_ci        Enabling (or disabling) an ARB generic array enables (or disables)
50455bd8deadSopenharmony_ci        BOTH the NV and ARB generic array booleans.
50465bd8deadSopenharmony_ci
50475bd8deadSopenharmony_ci        However enabling (or disabling) the NV generic array enable
50485bd8deadSopenharmony_ci        changes only the NV generic array enable (the ARB enable is
50495bd8deadSopenharmony_ci        UNchanged).
50505bd8deadSopenharmony_ci
50515bd8deadSopenharmony_ci        When an enabled valid current vertex program (whether specified
50525bd8deadSopenharmony_ci        as an ARB or NV vertex program) is bound, the NV generic array
50535bd8deadSopenharmony_ci        enables are considered (and the ARB enables are ignored).  If a
50545bd8deadSopenharmony_ci        given NV generic array enable is true, the corresponding generic
50555bd8deadSopenharmony_ci        array state is applied.  However if there is an enabled valid
50565bd8deadSopenharmony_ci        vertex program and a particular NV generic array is disabled, then
50575bd8deadSopenharmony_ci        the corresponding conventional aliased array state is applied.
50585bd8deadSopenharmony_ci
50595bd8deadSopenharmony_ci        When the current vertex program is disabled or not valid (so
50605bd8deadSopenharmony_ci        conventional vertex processing is performed), the ARB generic
50615bd8deadSopenharmony_ci        array enables are considered (and the NV enables are ignored).
50625bd8deadSopenharmony_ci        If a given ARB generic array enable is true, the corresponding
50635bd8deadSopenharmony_ci        generic array state is applied.  However if the current vertex
50645bd8deadSopenharmony_ci        program is disabled or NOT valid and a particular ARB generic
50655bd8deadSopenharmony_ci        array is disabled, then the corresponding conventional aliased
50665bd8deadSopenharmony_ci        array state is applied.
50675bd8deadSopenharmony_ci
50685bd8deadSopenharmony_ci        This behavior means generic vertex arrays can be applied to
50695bd8deadSopenharmony_ci        conventional vertex processing when the ARB generic vertex array
50705bd8deadSopenharmony_ci        enable boolean is true.  For example, you can send normalized
50715bd8deadSopenharmony_ci        UNSIGNED_SHORT texture coordinate set arrays as aliased generic
50725bd8deadSopenharmony_ci        vertex arrays where conventionally UNSIGNED_SHORT texture
50735bd8deadSopenharmony_ci        coordinate set arrays are unnormalized.
50745bd8deadSopenharmony_ci
50755bd8deadSopenharmony_ci    NV_vertex_program interaction Issues:
50765bd8deadSopenharmony_ci
50775bd8deadSopenharmony_ci      - Should matrix tracking support extend to ARB program environment
50785bd8deadSopenharmony_ci        parameters?
50795bd8deadSopenharmony_ci
50805bd8deadSopenharmony_ci
50815bd8deadSopenharmony_ciInteractions with EXT_vertex_shader
50825bd8deadSopenharmony_ci
50835bd8deadSopenharmony_ci    The existing EXT_vertex_shader extension, if supported, also provides a
50845bd8deadSopenharmony_ci    similar vertex programming model. This extension is incompatible with
50855bd8deadSopenharmony_ci    ARB_vertex_program in a number of different ways.  Mixing the two models
50865bd8deadSopenharmony_ci    in a single application is possible but not recommended. The interactions
50875bd8deadSopenharmony_ci    between the extensions are defined below.
50885bd8deadSopenharmony_ci
50895bd8deadSopenharmony_ci    First, it should be trivially noted that an EXT_vertex_shader "shader"
50905bd8deadSopenharmony_ci    serves the same purpose as an ARB_vertex_program "program".  The two terms
50915bd8deadSopenharmony_ci    will be used interchangeably throughout this discussion.
50925bd8deadSopenharmony_ci
50935bd8deadSopenharmony_ci    The most obvious difference between the two extensions is that the
50945bd8deadSopenharmony_ci    definition of the vertex program is accomplished in EXT_vertex_shader
50955bd8deadSopenharmony_ci    through the use of instruction-specifying procedure calls and is
50965bd8deadSopenharmony_ci    accomplished in ARB_vertex_program by providing a textual string
50975bd8deadSopenharmony_ci    describing the program. This is mostly a distinction of interface rather
50985bd8deadSopenharmony_ci    than functionality.
50995bd8deadSopenharmony_ci
51005bd8deadSopenharmony_ci    Each extension provides its own distinct set of GL state, entry points,
51015bd8deadSopenharmony_ci    and enumerants. However, there are several areas of overlap both in
51025bd8deadSopenharmony_ci    conceptual framework and in programming model that are worth noting for
51035bd8deadSopenharmony_ci    those familiar with both API's.
51045bd8deadSopenharmony_ci
51055bd8deadSopenharmony_ci    1. Resource terminology and types
51065bd8deadSopenharmony_ci
51075bd8deadSopenharmony_ci       Both ARB_vertex_program and EXT_vertex_shader offer access to similar
51085bd8deadSopenharmony_ci       types of resources for use by vertex programs.
51095bd8deadSopenharmony_ci
51105bd8deadSopenharmony_ci       The following terms describe roughly equivalent resources in their
51115bd8deadSopenharmony_ci       respective extensions:
51125bd8deadSopenharmony_ci
51135bd8deadSopenharmony_ci       EXT_vertex_shader   ARB_vertex_program                    Note
51145bd8deadSopenharmony_ci       -----------------   ------------------                    ----
51155bd8deadSopenharmony_ci       instructions        instructions
51165bd8deadSopenharmony_ci       variants            attributes
51175bd8deadSopenharmony_ci       locals              temporaries
51185bd8deadSopenharmony_ci       local constants     parameters bound to inline constants  (a)
51195bd8deadSopenharmony_ci       invariants          parameters bound to GL state and      (b)
51205bd8deadSopenharmony_ci                           program environment parameters
51215bd8deadSopenharmony_ci
51225bd8deadSopenharmony_ci         a. ARB_vertex_program has no intrinsic storage type that corresponds
51235bd8deadSopenharmony_ci            to EXT_vertex_shader's LOCAL_CONSTANT storage type, but rather
51245bd8deadSopenharmony_ci            supports program parameters bound to inline constant vectors
51255bd8deadSopenharmony_ci            specified within the program text. This essentially makes
51265bd8deadSopenharmony_ci            LOCAL_CONSTANT a special case of an ARB_vertex_program program
51275bd8deadSopenharmony_ci            parameter. The values of these inline constant parameters can not
51285bd8deadSopenharmony_ci            be changed without redefining the program itself, just like the
51295bd8deadSopenharmony_ci            values of EXT_vertex_shader LOCAL_CONSTANTs.
51305bd8deadSopenharmony_ci
51315bd8deadSopenharmony_ci         b. ARB_vertex_program has no intrinsic storage type that corresponds
51325bd8deadSopenharmony_ci            to EXT_vertex_shader's INVARIANT storage type, but rather supports
51335bd8deadSopenharmony_ci            program parameters bound to GL state variables, program
51345bd8deadSopenharmony_ci            environment parameters, and program local parameters. This
51355bd8deadSopenharmony_ci            essentially makes INVARIANT a special case of an
51365bd8deadSopenharmony_ci            ARB_vertex_program program parameter. The values of these bound
51375bd8deadSopenharmony_ci            program parameters can be changed without redefining the program
51385bd8deadSopenharmony_ci            itself, but remain constant from vertex to vertex during vertex
51395bd8deadSopenharmony_ci            program execution, just like the values of EXT_vertex_shader
51405bd8deadSopenharmony_ci            INVARIANTs.
51415bd8deadSopenharmony_ci
51425bd8deadSopenharmony_ci       ARB_vertex_program also adds the concept of a program local parameter,
51435bd8deadSopenharmony_ci       which has no direct analogue in EXT_vertex_shader, as it represents a
51445bd8deadSopenharmony_ci       parameter that is stored locally with the program object, but the
51455bd8deadSopenharmony_ci       values of these parameters can be changed without redefining the
51465bd8deadSopenharmony_ci       program itself.
51475bd8deadSopenharmony_ci
51485bd8deadSopenharmony_ci    2. Resource usage queries
51495bd8deadSopenharmony_ci
51505bd8deadSopenharmony_ci       Both ARB_vertex_program and EXT_vertex_shader provide queries to assist
51515bd8deadSopenharmony_ci       in determining the resource usage of a given shader and whether the
51525bd8deadSopenharmony_ci       shader would "fit" within the limits imposed by the underlying hardware
51535bd8deadSopenharmony_ci       implementation. The application can investigate the maximum numbers of
51545bd8deadSopenharmony_ci       shader resources supported by an implementation, shader resources
51555bd8deadSopenharmony_ci       available in hardware, and resources consumed by a given shader after
51565bd8deadSopenharmony_ci       being compiled into the implementation's native representation.
51575bd8deadSopenharmony_ci
51585bd8deadSopenharmony_ci       In EXT_vertex_shader (see the end of section 2.14 of the
51595bd8deadSopenharmony_ci       EXT_vertex_shader specification), the queries are handled by glGet.
51605bd8deadSopenharmony_ci
51615bd8deadSopenharmony_ci       In ARB_vertex_programs (see section 2.14.3.7 of this specification),
51625bd8deadSopenharmony_ci       similar queries are handled by GetProgramivARB, with a target of
51635bd8deadSopenharmony_ci       VERTEX_PROGRAM_ARB.
51645bd8deadSopenharmony_ci
51655bd8deadSopenharmony_ci       The following queries exist in both extensions and serve roughly
51665bd8deadSopenharmony_ci       equivalent purposes in each:
51675bd8deadSopenharmony_ci
51685bd8deadSopenharmony_ci       EXT_vertex_shader                             ARB_vertex_program
51695bd8deadSopenharmony_ci       -----------------                             ------------------
51705bd8deadSopenharmony_ci       MAX_VERTEX_SHADER_INSTRUCTIONS_EXT            MAX_PROGRAM_INSTRUCTIONS_ARB
51715bd8deadSopenharmony_ci       MAX_VERTEX_SHADER_VARIANTS_EXT                MAX_PROGRAM_ATTRIBS_ARB
51725bd8deadSopenharmony_ci       MAX_VERTEX_SHADER_LOCALS_EXT                  MAX_PROGRAM_TEMPORARIES_ARB
51735bd8deadSopenharmony_ci
51745bd8deadSopenharmony_ci       MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT  MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB
51755bd8deadSopenharmony_ci       MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT      MAX_PROGRAM_NATIVE_ATTRIBS_ARB
51765bd8deadSopenharmony_ci       MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT        MAX_PROGRAM_NATIVE_TEMPORARIES_ARB
51775bd8deadSopenharmony_ci
51785bd8deadSopenharmony_ci       VERTEX_SHADER_INSTRUCTIONS_EXT                PROGRAM_NATIVE_INSTRUCTIONS_ARB
51795bd8deadSopenharmony_ci       VERTEX_SHADER_VARIANTS_EXT                    PROGRAM_NATIVE_ATTRIBS_ARB
51805bd8deadSopenharmony_ci       VERTEX_SHADER_LOCALS_EXT                      PROGRAM_NATIVE_TEMPORARIES_ARB
51815bd8deadSopenharmony_ci
51825bd8deadSopenharmony_ci       VERTEX_SHADER_OPTIMIZED_EXT                   PROGRAM_UNDER_NATIVE_LIMITS_ARB
51835bd8deadSopenharmony_ci
51845bd8deadSopenharmony_ci       ARB_vertex_program offers additional queries to account for differences
51855bd8deadSopenharmony_ci       in some of the resource definitions (program environment parameters and
51865bd8deadSopenharmony_ci       program local parameters, address registers, etc.) as well as the
51875bd8deadSopenharmony_ci       ability to separately query a compiled program's resource usage
51885bd8deadSopenharmony_ci       according to the specification versus a possibly more efficient
51895bd8deadSopenharmony_ci       resource usage obtained by passing the program through by a "smart"
51905bd8deadSopenharmony_ci       compiler.
51915bd8deadSopenharmony_ci
51925bd8deadSopenharmony_ci       The following queries do not exist in ARB_vertex_program due to the
51935bd8deadSopenharmony_ci       slightly different resource models:
51945bd8deadSopenharmony_ci
51955bd8deadSopenharmony_ci       EXT_vertex_shader                                    ARB_vertex_program
51965bd8deadSopenharmony_ci       -----------------                                    ------------------
51975bd8deadSopenharmony_ci       {MAX_}{OPTIMIZED_}VERTEX_SHADER_INVARIANTS_EXT       (a)
51985bd8deadSopenharmony_ci       {MAX_}{OPTIMIZED_}VERTEX_SHADER_LOCAL_CONSTANTS_EXT  (a)
51995bd8deadSopenharmony_ci
52005bd8deadSopenharmony_ci         a. ARB_vertex_program coalesces all of the different program
52015bd8deadSopenharmony_ci            parameters (environment, local, inline constant, and those bound
52025bd8deadSopenharmony_ci            to GL state) into a single queryable resource for
52035bd8deadSopenharmony_ci            PROGRAM_PARAMETERS.  EXT_vertex_shader provides separate queries
52045bd8deadSopenharmony_ci            even though these parameters may consume the same resource on some
52055bd8deadSopenharmony_ci            implementations.
52065bd8deadSopenharmony_ci
52075bd8deadSopenharmony_ci       The following queries do not exist in EXT_vertex_shader due to the
52085bd8deadSopenharmony_ci       slightly different resource models:
52095bd8deadSopenharmony_ci
52105bd8deadSopenharmony_ci       EXT_vertex_shader    ARB_vertex_program
52115bd8deadSopenharmony_ci       -----------------    ------------------
52125bd8deadSopenharmony_ci       (b)                  PROGRAM_*_ARB
52135bd8deadSopenharmony_ci
52145bd8deadSopenharmony_ci       (c)                  {MAX_}{NATIVE_}PROGRAM_PARAMETERS_ARB
52155bd8deadSopenharmony_ci
52165bd8deadSopenharmony_ci       (d)                  {MAX_}{NATIVE_}PROGRAM_ADDRESS_REGISTERS_ARB
52175bd8deadSopenharmony_ci
52185bd8deadSopenharmony_ci         b. These queries are used to find out how many resources a given
52195bd8deadSopenharmony_ci            program used according to the specification, *before* running the
52205bd8deadSopenharmony_ci            program through an optimizing compiler.  This distinction is not
52215bd8deadSopenharmony_ci            made in EXT_vertex_shader.
52225bd8deadSopenharmony_ci
52235bd8deadSopenharmony_ci         c. These queries are used to find out how many parameters were used
52245bd8deadSopenharmony_ci            by a program or are allowed by an implementation, in total without
52255bd8deadSopenharmony_ci            distinguishing between environment parameters, program local
52265bd8deadSopenharmony_ci            parameters, inline constant parameters, or parameters bound to GL
52275bd8deadSopenharmony_ci            state.  EXT_vertex_shader does not provide this information.
52285bd8deadSopenharmony_ci
52295bd8deadSopenharmony_ci         d. EXT_vertex_shader does not provide have any address register
52305bd8deadSopenharmony_ci            resources since all dynamic array references are handled with the
52315bd8deadSopenharmony_ci            atomic OP_INDEX instruction.
52325bd8deadSopenharmony_ci
52335bd8deadSopenharmony_ci    3. Symbols and variable names
52345bd8deadSopenharmony_ci
52355bd8deadSopenharmony_ci       In EXT_vertex_shader resources that represent storage locations
52365bd8deadSopenharmony_ci       (i.e. INVARIANTS, VARIANTS, LOCALS, LOCAL_CONSTANTS) are abstractly
52375bd8deadSopenharmony_ci       referenced through a GL-allocated symbol id obtained from
52385bd8deadSopenharmony_ci       GenSymbolsEXT. This level of abstraction is provided to allow the
52395bd8deadSopenharmony_ci       implementation to make hardware-dependent decisions about the best way
52405bd8deadSopenharmony_ci       to arrange, allocate, and re-use hardware resources.
52415bd8deadSopenharmony_ci
52425bd8deadSopenharmony_ci       Though ARB_vertex_program does not use symbol id's to refer to similar
52435bd8deadSopenharmony_ci       types of resources, it does provide similar functionality by allowing a
52445bd8deadSopenharmony_ci       vertex program to declare arbitrarily named variables for each resource
52455bd8deadSopenharmony_ci       in use. These names are assigned using the declaration syntax
52465bd8deadSopenharmony_ci       associated with the "PARAM", "ATTRIB", "TEMP", and "OUTPUT", and
52475bd8deadSopenharmony_ci       "ADDRESS" keywords.
52485bd8deadSopenharmony_ci
52495bd8deadSopenharmony_ci    4. Program management
52505bd8deadSopenharmony_ci
52515bd8deadSopenharmony_ci       With the exception of the actual program specification itself,
52525bd8deadSopenharmony_ci       EXT_vertex_shader and ARB_vertex_program have very similar program
52535bd8deadSopenharmony_ci       management API's.
52545bd8deadSopenharmony_ci
52555bd8deadSopenharmony_ci       The following procedures serve roughly equivalent functions in their
52565bd8deadSopenharmony_ci       respective extensions.
52575bd8deadSopenharmony_ci
52585bd8deadSopenharmony_ci       EXT_vertex_shader            ARB_vertex_program
52595bd8deadSopenharmony_ci       -----------------            ------------------
52605bd8deadSopenharmony_ci       BindVertexShaderEXT          BindProgramARB
52615bd8deadSopenharmony_ci       GenVertexShadersEXT          GenProgramsARB
52625bd8deadSopenharmony_ci       DeleteVertexShaderEXT        DeleteProgramsARB
52635bd8deadSopenharmony_ci       
52645bd8deadSopenharmony_ci       The following procedures are used in EXT_vertex_shader to define the
52655bd8deadSopenharmony_ci       program instruction sequence, and are not present in ARB_vertex_program
52665bd8deadSopenharmony_ci       since the string provided to ProgramStringARB fully defines the program
52675bd8deadSopenharmony_ci       contents.
52685bd8deadSopenharmony_ci       
52695bd8deadSopenharmony_ci           ShaderOp1EXT
52705bd8deadSopenharmony_ci           ShaderOp2EXT
52715bd8deadSopenharmony_ci           ShaderOp3EXT
52725bd8deadSopenharmony_ci           SwizzleEXT
52735bd8deadSopenharmony_ci           WriteMaskEXT
52745bd8deadSopenharmony_ci           InsertComponentEXT
52755bd8deadSopenharmony_ci           ExtractComponentEXT
52765bd8deadSopenharmony_ci
52775bd8deadSopenharmony_ci    5. Data specification routines
52785bd8deadSopenharmony_ci
52795bd8deadSopenharmony_ci       With the exception of the discrepancies in data types and resource
52805bd8deadSopenharmony_ci       names described above, EXT_vertex_shader and ARB_vertex_program provide
52815bd8deadSopenharmony_ci       similar program data specification and "current data query" API's.
52825bd8deadSopenharmony_ci
52835bd8deadSopenharmony_ci       The following procedures serve roughly equivalent functions in their
52845bd8deadSopenharmony_ci       respective extensions:
52855bd8deadSopenharmony_ci
52865bd8deadSopenharmony_ci       EXT_vertex_shader            ARB_vertex_program           Note
52875bd8deadSopenharmony_ci       -----------------            ------------------           -----
52885bd8deadSopenharmony_ci       SetInvariantEXT              ProgramEnvParameter4*ARB     (a)
52895bd8deadSopenharmony_ci       GetInvariant*vEXT            GetProgramEnvParameter*vARB  (a)
52905bd8deadSopenharmony_ci       Variant*vEXT                 VertexAttrib*ARB
52915bd8deadSopenharmony_ci       VariantPointerEXT            VertexAttribPointerARB
52925bd8deadSopenharmony_ci       GetVariant*vEXT              GetVertexAttrib*vARB
52935bd8deadSopenharmony_ci       GetVariantPointervEXT        GetVertexAttribPointervARB
52945bd8deadSopenharmony_ci       EnableVariantClientStateEXT  EnableVertexAttribArrayARB
52955bd8deadSopenharmony_ci       DisableVariantClientStateEXT DisableVertexAttribArrayARB
52965bd8deadSopenharmony_ci       IsVariantEnabledEXT          GetVertexAttrib*vARB         (b)
52975bd8deadSopenharmony_ci
52985bd8deadSopenharmony_ci         a. See item #1 and #2 for more information on the relationship
52995bd8deadSopenharmony_ci            between EXT_vertex_shader invariants and ARB_vertex_program
53005bd8deadSopenharmony_ci            program parameters.
53015bd8deadSopenharmony_ci
53025bd8deadSopenharmony_ci         b. The enabled state of an attribute array in ARB_vertex_program can
53035bd8deadSopenharmony_ci            be queried with GetVertexAttrib*v and a parameter of
53045bd8deadSopenharmony_ci            VERTEX_ATTRIB_ARRAY_ENABLED_ARB. In EXT_vertex_shader there is a
53055bd8deadSopenharmony_ci            dedicated enabled query procedure.
53065bd8deadSopenharmony_ci
53075bd8deadSopenharmony_ci       However, there are some data specification routines in
53085bd8deadSopenharmony_ci       EXT_vertex_shader that have no procedure call analogue in
53095bd8deadSopenharmony_ci       ARB_vertex_program as their functions are subsumed by the string
53105bd8deadSopenharmony_ci       representation of the program itself.
53115bd8deadSopenharmony_ci
53125bd8deadSopenharmony_ci       The following procedures in EXT_vertex_shader have functionality
53135bd8deadSopenharmony_ci       roughly covered by the following strings within the program text in
53145bd8deadSopenharmony_ci       ARB_vertex_shader:
53155bd8deadSopenharmony_ci
53165bd8deadSopenharmony_ci       EXT_vertex_shader            ARB_vertex_program           Note
53175bd8deadSopenharmony_ci       -----------------            ------------------           -----
53185bd8deadSopenharmony_ci       SetLocalConstantEXT          PARAM C = {<x>,<y>,<z>,<w>};  (c)
53195bd8deadSopenharmony_ci
53205bd8deadSopenharmony_ci       BindLightParameterEXT        state.light[n].*
53215bd8deadSopenharmony_ci       BindMaterialParameterEXT     state.material.*              (d)
53225bd8deadSopenharmony_ci       BindTexGenParameterEXT       state.texgen[n].*
53235bd8deadSopenharmony_ci
53245bd8deadSopenharmony_ci       BindTextureUnitParameterEXT
53255bd8deadSopenharmony_ci         CURRENT_TEXTURE_COORDS     vertex.texcoord[n]
53265bd8deadSopenharmony_ci         TEXTURE_MATRIX             state.matrix.texture[n]
53275bd8deadSopenharmony_ci
53285bd8deadSopenharmony_ci       BindParameterEXT
53295bd8deadSopenharmony_ci         CURRENT_VERTEX_EXT         vertex.position
53305bd8deadSopenharmony_ci         CURRENT_NORMAL             vertex.normal
53315bd8deadSopenharmony_ci         CURRENT_COLOR              vertex.color.*
53325bd8deadSopenharmony_ci         MODELVIEW_MATRIX           state.matrix.modelview[n]
53335bd8deadSopenharmony_ci         PROJECTION_MATRIX          state.matrix.projection
53345bd8deadSopenharmony_ci         MVP_MATRIX_EXT             state.matrix.mvp
53355bd8deadSopenharmony_ci         COLOR_MATRIX               <unavailable>                 (e)
53365bd8deadSopenharmony_ci         CLIP_PLANE                 state.clip[n].plane
53375bd8deadSopenharmony_ci         FOG_COLOR                  state.fog.color
53385bd8deadSopenharmony_ci         FOG_DENSITY                state.fog.params.x
53395bd8deadSopenharmony_ci         FOG_START                  state.fog.params.y
53405bd8deadSopenharmony_ci         FOG_END                    state.fog.params.z
53415bd8deadSopenharmony_ci         LIGHT_MODEL_AMBIENT        state.lightmodel.ambient
53425bd8deadSopenharmony_ci
53435bd8deadSopenharmony_ci         c. Note that while EXT_vertex_shader style local constants can be
53445bd8deadSopenharmony_ci            specified using inline constants in the program text, there is no
53455bd8deadSopenharmony_ci            functionality in ARB_vertex_program that corresponds to the
53465bd8deadSopenharmony_ci            GetLocalConstant*vEXT call. That is, program parameters bound to
53475bd8deadSopenharmony_ci            inline constant vectors can be set in the text, but not queried
53485bd8deadSopenharmony_ci            from the application.
53495bd8deadSopenharmony_ci
53505bd8deadSopenharmony_ci         d. Note that while EXT_vertex_shader supports binding material
53515bd8deadSopenharmony_ci            properties to variants, ARB_vertex_shader only supports binding
53525bd8deadSopenharmony_ci            them to program parameters (invariants). See item #11 below for
53535bd8deadSopenharmony_ci            more information.
53545bd8deadSopenharmony_ci
53555bd8deadSopenharmony_ci         e. Note that while EXT_vertex_shader supports binding color matrix if
53565bd8deadSopenharmony_ci            the ARB_imaging subset is supported, ARB_vertex_shader does not
53575bd8deadSopenharmony_ci            allow for such a binding. See item #11 below for more information.
53585bd8deadSopenharmony_ci
53595bd8deadSopenharmony_ci    6. Data types
53605bd8deadSopenharmony_ci
53615bd8deadSopenharmony_ci       EXT_vertex_shader supports data types of SCALAR, VECTOR, and MATRIX.
53625bd8deadSopenharmony_ci
53635bd8deadSopenharmony_ci       ARB_vertex_program intrinsically supports only vectors, though it
53645bd8deadSopenharmony_ci       allows for the definition of a matrix as a contiguous allocation of
53655bd8deadSopenharmony_ci       four row vectors. Some operations that, in EXT_vertex_shader require
53665bd8deadSopenharmony_ci       scalar inputs or scalar outputs, will, in ARB_vertex_program, use the
53675bd8deadSopenharmony_ci       selected component of the source vector as input and/or replicate their
53685bd8deadSopenharmony_ci       output to all components.
53695bd8deadSopenharmony_ci
53705bd8deadSopenharmony_ci       Further, EXT_vertex_shader supports a pair of InsertComponents and
53715bd8deadSopenharmony_ci       ExtractComponents functions that are not available (nor required) in
53725bd8deadSopenharmony_ci       ARB_vertex_program, as they essentially provide for conversion between
53735bd8deadSopenharmony_ci       the SCALAR, VECTOR, and MATRIX data types.
53745bd8deadSopenharmony_ci
53755bd8deadSopenharmony_ci    7. Input swizzles and output write-masks
53765bd8deadSopenharmony_ci
53775bd8deadSopenharmony_ci       In EXT_vertex_shader, write masks are specified as a type of
53785bd8deadSopenharmony_ci       "instruction", using WriteMaskEXT, while in ARB_vertex_program, write
53795bd8deadSopenharmony_ci       masks are specified as modifiers to the destination resource with
53805bd8deadSopenharmony_ci       writemask modifiers, such as ".xyz" or ".w".
53815bd8deadSopenharmony_ci
53825bd8deadSopenharmony_ci       In EXT_vertex_shader, source operand swizzles (component re- ordering,
53835bd8deadSopenharmony_ci       negation, and hard-coding to the value 0 and +/- 1.0) are also
53845bd8deadSopenharmony_ci       specified as a type of "instruction", using SwizzleEXT.
53855bd8deadSopenharmony_ci
53865bd8deadSopenharmony_ci       In ARB_vertex_program, swizzles can either be handled as instruction
53875bd8deadSopenharmony_ci       ("SWZ") or as part of a modifier of the source argument to an
53885bd8deadSopenharmony_ci       instruction. The only differences between the two methods is that the
53895bd8deadSopenharmony_ci       source modifiers in ARB_vertex_program do not provide the ability to
53905bd8deadSopenharmony_ci       use 0.0 and +/- 1.0, or negate individual components, while the "SWZ"
53915bd8deadSopenharmony_ci       instruction does.
53925bd8deadSopenharmony_ci
53935bd8deadSopenharmony_ci   8. Support for clipping and user clip planes
53945bd8deadSopenharmony_ci
53955bd8deadSopenharmony_ci      Both extensions provide similar support for traditional clipping to the
53965bd8deadSopenharmony_ci      view frustum, namely that frustum clipping is not subsumed by vertex
53975bd8deadSopenharmony_ci      shader, or vertex program execution.
53985bd8deadSopenharmony_ci
53995bd8deadSopenharmony_ci      Additionally, EXT_vertex_shader supports user clip planes by
54005bd8deadSopenharmony_ci      transforming the user clip planes from eye-space into clip space and
54015bd8deadSopenharmony_ci      clipping in the clip space coordinate system. This is supported as long
54025bd8deadSopenharmony_ci      as the projection matrix is non-singular.
54035bd8deadSopenharmony_ci
54045bd8deadSopenharmony_ci      ARB_vertex_program provides similar functionality but only for programs
54055bd8deadSopenharmony_ci      specified using the "position invariant" option. For more information on
54065bd8deadSopenharmony_ci      user clip-plane support, see issue #20 and section 2.14.4.5.1 of this
54075bd8deadSopenharmony_ci      specification.
54085bd8deadSopenharmony_ci
54095bd8deadSopenharmony_ci   9. Support for glRasterPos
54105bd8deadSopenharmony_ci
54115bd8deadSopenharmony_ci      EXT_vertex_shader does not support transforming the current raster
54125bd8deadSopenharmony_ci      position vertex by the current vertex shader, while ARB_vertex_program
54135bd8deadSopenharmony_ci      does.
54145bd8deadSopenharmony_ci
54155bd8deadSopenharmony_ci  10. Relative addressing.
54165bd8deadSopenharmony_ci
54175bd8deadSopenharmony_ci      The string based syntax of ARB_vertex_program supports a relative
54185bd8deadSopenharmony_ci      addressing model where a given declared array can be dynamically
54195bd8deadSopenharmony_ci      dereferenced by first loading a declared ADDRESS register, using the
54205bd8deadSopenharmony_ci      "ARL" instruction with a value obtained at program execution then using
54215bd8deadSopenharmony_ci      that named ADDRESS register as the index to dereference a declared array
54225bd8deadSopenharmony_ci      of parameters later on.  See section 2.14.3.5 of this specification for
54235bd8deadSopenharmony_ci      details.
54245bd8deadSopenharmony_ci
54255bd8deadSopenharmony_ci      For example, in ARB_vertex_program you can specify the following
54265bd8deadSopenharmony_ci      piece of a program.
54275bd8deadSopenharmony_ci
54285bd8deadSopenharmony_ci          PARAM arr[5]  = { program.env[0..4] };
54295bd8deadSopenharmony_ci          ADDRESS addr;
54305bd8deadSopenharmony_ci          ATTRIB v1 = vertex.attrib[1];
54315bd8deadSopenharmony_ci          ARL addr, v1;
54325bd8deadSopenharmony_ci          MOV result, arr[addr.x + 1];
54335bd8deadSopenharmony_ci
54345bd8deadSopenharmony_ci      EXT_vertex_shader supports relative addressing as as a single atomic
54355bd8deadSopenharmony_ci      operation through the use of the instruction OP_INDEX_EXT, as in
54365bd8deadSopenharmony_ci
54375bd8deadSopenharmony_ci          ShaderOp2EXT(OP_INDEX_EXT, <res>, <arg1>, <arg2>).
54385bd8deadSopenharmony_ci
54395bd8deadSopenharmony_ci      OP_INDEX_EXT supports relative addressing by taking the value stored in
54405bd8deadSopenharmony_ci      the register referred to by <arg1> and adding that value to the register
54415bd8deadSopenharmony_ci      number referred to by <arg2>, and loading <res> with the value stored in
54425bd8deadSopenharmony_ci      the register at the resulting offset.  EXT_vertex_shader has the
54435bd8deadSopenharmony_ci      requirement that the register referred to by <arg2> is allocated as one
54445bd8deadSopenharmony_ci      of a contiguous range of symbols obtained from a single call to
54455bd8deadSopenharmony_ci      GenSymbolsEXT.
54465bd8deadSopenharmony_ci
54475bd8deadSopenharmony_ci      To achieve the same functionality as the above ARB_vertex_program, using
54485bd8deadSopenharmony_ci      EXT_vertex_shader, one could allocate a LOCAL symbol to hold a "fake"
54495bd8deadSopenharmony_ci      address register, and do a similar type of dynamic dereference
54505bd8deadSopenharmony_ci      operation, placing the output in a temporary LOCAL before giving it as
54515bd8deadSopenharmony_ci      an source argument to the "real" instruction.
54525bd8deadSopenharmony_ci
54535bd8deadSopenharmony_ci       arr_contiguousArraySymbol =
54545bd8deadSopenharmony_ci            GenSymbolsEXT(GL_VECTOR_EXT, GL_LOCAL_EXT, GL_FULL_RANGE_EXT, 5);
54555bd8deadSopenharmony_ci
54565bd8deadSopenharmony_ci       addr_fakeAddressRegSymbol =
54575bd8deadSopenharmony_ci            GenSymbolsEXT(GL_VECTOR_EXT, GL_LOCAL_EXT, GL_FULL_RANGE_EXT, 1);
54585bd8deadSopenharmony_ci
54595bd8deadSopenharmony_ci       v1_srcSymbolForARLOp =
54605bd8deadSopenharmony_ci            GenSymbolsEXT(GL_VECTOR_EXT, GL_VARIANT_EXT, GL_FULL_RANGE_EXT, 1);
54615bd8deadSopenharmony_ci
54625bd8deadSopenharmony_ci       temp =
54635bd8deadSopenharmony_ci            GenSymbolsEXT(GL_VECTOR_EXT, GL_LOCAL_EXT, GL_FULL_RANGE_EXT, 1);
54645bd8deadSopenharmony_ci
54655bd8deadSopenharmony_ci       result_ForMovOpSymbol =
54665bd8deadSopenharmony_ci            GenSymbolsEXT(GL_VECTOR_EXT, GL_LOCAL_EXT, GL_FULL_RANGE_EXT, 1);
54675bd8deadSopenharmony_ci
54685bd8deadSopenharmony_ci        // load fake ADDRESS register
54695bd8deadSopenharmony_ci        ExtractComponentEXT(
54705bd8deadSopenharmony_ci            addr_fakeAddressRegSymbol,
54715bd8deadSopenharmony_ci            v1_srcSymbolForARLOp,
54725bd8deadSopenharmony_ci            0);
54735bd8deadSopenharmony_ci
54745bd8deadSopenharmony_ci        // do dynamic dereference into a temp
54755bd8deadSopenharmony_ci        ShaderOp2EXT(
54765bd8deadSopenharmony_ci            GL_OP_INDEX_EXT,
54775bd8deadSopenharmony_ci            temp,
54785bd8deadSopenharmony_ci            addr_fakeAddressRegSymbol,
54795bd8deadSopenharmony_ci            contiguousArraySymbol);
54805bd8deadSopenharmony_ci
54815bd8deadSopenharmony_ci        // do operation we really wanted (MOV) using looked up src value
54825bd8deadSopenharmony_ci        ShaderOp1EXT(
54835bd8deadSopenharmony_ci            GL_OP_MOV_EXT,
54845bd8deadSopenharmony_ci            result_ForMovOpSymbol,
54855bd8deadSopenharmony_ci            temp,
54865bd8deadSopenharmony_ci            (arr_contiguousArraySymbol + 1));
54875bd8deadSopenharmony_ci
54885bd8deadSopenharmony_ci   11. Available GL state bindings
54895bd8deadSopenharmony_ci
54905bd8deadSopenharmony_ci       Both EXT_vertex_shader and ARB_vertex_program offer the ability to bind
54915bd8deadSopenharmony_ci       program resources to pieces of OpenGL state so that the values of
54925bd8deadSopenharmony_ci       OpenGL state parameters are available to the program without the
54935bd8deadSopenharmony_ci       application having to copy the state values manually into program
54945bd8deadSopenharmony_ci       parameters.
54955bd8deadSopenharmony_ci
54965bd8deadSopenharmony_ci       The two extensions differ in exactly which pieces of state are
54975bd8deadSopenharmony_ci       available to a vertex program, with the main difference being that
54985bd8deadSopenharmony_ci       ARB_vertex_program offers a more comprehensive set of state bindings.
54995bd8deadSopenharmony_ci
55005bd8deadSopenharmony_ci       First, EXT_vertex_shader can bind pieces of GL state considered to be
55015bd8deadSopenharmony_ci       "scalar" values to a single SCALAR symbol, whereas ARB_vertex_program,
55025bd8deadSopenharmony_ci       which handles only vectors, packs up to 4 scalar bindings into a single
55035bd8deadSopenharmony_ci       vector parameter.
55045bd8deadSopenharmony_ci
55055bd8deadSopenharmony_ci       Similarly, EXT_vertex_shader can bind pieces of GL state considered to
55065bd8deadSopenharmony_ci       be "matrix" values to a single MATRIX symbol, whereas
55075bd8deadSopenharmony_ci       ARB_vertex_program supports bindings to matrix data by using up to four
55085bd8deadSopenharmony_ci       vectors to store the rows of the matrix.
55095bd8deadSopenharmony_ci
55105bd8deadSopenharmony_ci       Other differences between the state bindings available in both API's
55115bd8deadSopenharmony_ci       are listed below:
55125bd8deadSopenharmony_ci
55135bd8deadSopenharmony_ci         a. In EXT_vertex_shader, the light attenuation factors (CONSTANT,
55145bd8deadSopenharmony_ci            LINEAR, QUADRATIC, and SPOT_EXPONENT), are available as separate
55155bd8deadSopenharmony_ci            SCALAR bindings.
55165bd8deadSopenharmony_ci
55175bd8deadSopenharmony_ci            In ARB_vertex_program, the light attenuation factors are all
55185bd8deadSopenharmony_ci            packed into a single vector called state.light[n].attenuation with
55195bd8deadSopenharmony_ci            the CONSTANT, LINEAR, QUADRATIC, and SPOT_EXPONENT factors in the
55205bd8deadSopenharmony_ci            x,y,z, and w parameters respectively.
55215bd8deadSopenharmony_ci
55225bd8deadSopenharmony_ci         b. In EXT_vertex_shader the spotlight direction (SPOT_DIRECTION) and
55235bd8deadSopenharmony_ci            spot light cutoff angle (SPOT_CUTOFF), are available as separate
55245bd8deadSopenharmony_ci            bindings.
55255bd8deadSopenharmony_ci
55265bd8deadSopenharmony_ci            In ARB_vertex_program, these parameters are all packed into a
55275bd8deadSopenharmony_ci            single vector called state.light[n].spot.direction with the with
55285bd8deadSopenharmony_ci            the x,y,z parameters of the spotlight direction and the the
55295bd8deadSopenharmony_ci            *cosine* of the cutoff angle in the x,y,z, and w parameters
55305bd8deadSopenharmony_ci            respectively.
55315bd8deadSopenharmony_ci
55325bd8deadSopenharmony_ci         c. In EXT_vertex_shader, the fog equation factors (FOG_DENSITY,
55335bd8deadSopenharmony_ci            FOG_START, FOG_END), are avaiable as separate SCALAR bindings.
55345bd8deadSopenharmony_ci
55355bd8deadSopenharmony_ci            In ARB_vertex_program, the fog equation factors are all packed
55365bd8deadSopenharmony_ci            into a single vector called state.fog.params with the fog density,
55375bd8deadSopenharmony_ci            linear start, linear end, and pre-computed 1.0/ (end-start)
55385bd8deadSopenharmony_ci            factors in the x,y,z, and w parameters respectively.
55395bd8deadSopenharmony_ci
55405bd8deadSopenharmony_ci         d. In EXT_vertex_shader, material properties can be bound to a
55415bd8deadSopenharmony_ci            variant (i.e. "attribute" in ARB_vertex_program terminology) and
55425bd8deadSopenharmony_ci            can change per vertex, and the changes take effect immediately.
55435bd8deadSopenharmony_ci
55445bd8deadSopenharmony_ci            In ARB_vertex_program, material properties can only be bound to
55455bd8deadSopenharmony_ci            program parameters, and any changes to material properties between
55465bd8deadSopenharmony_ci            a Begin/End pair are not guaranteed to take effect until the
55475bd8deadSopenharmony_ci            following End command.
55485bd8deadSopenharmony_ci
55495bd8deadSopenharmony_ci         e. In EXT_vertex_shader, the material shininess property is bound to
55505bd8deadSopenharmony_ci            a SCALAR variable.
55515bd8deadSopenharmony_ci
55525bd8deadSopenharmony_ci            In ARB_vertex_program, the material shininess property is bound to
55535bd8deadSopenharmony_ci            a vector with elements { s, 0.0, 0.0, 1.0 } where "s" is the
55545bd8deadSopenharmony_ci            material shininess property.
55555bd8deadSopenharmony_ci
55565bd8deadSopenharmony_ci         f. In EXT_vertex_shader, a program can bind to the current modelview,
55575bd8deadSopenharmony_ci            projection, composite modelview-projection, color, and texture
55585bd8deadSopenharmony_ci            matrices only in their entirety.
55595bd8deadSopenharmony_ci
55605bd8deadSopenharmony_ci            In ARB_vertex_program, a program can bind to individual rows of
55615bd8deadSopenharmony_ci            any matrix, with the exception of the color matrix, which is not
55625bd8deadSopenharmony_ci            available in ARB_vertex_program.
55635bd8deadSopenharmony_ci
55645bd8deadSopenharmony_ci            Additionally, ARB_vertex_program adds the ability to bind to
55655bd8deadSopenharmony_ci            multiple modelview matrices, multiple palette matrices, and a set
55665bd8deadSopenharmony_ci            of matrices dedicated for use with vertex programs called "program
55675bd8deadSopenharmony_ci            matrices". Further, ARB_vertex_program offers the ability to bind
55685bd8deadSopenharmony_ci            to the inverse, transpose, and inverse_transpose of any of the
55695bd8deadSopenharmony_ci            matrices available for binding.
55705bd8deadSopenharmony_ci
55715bd8deadSopenharmony_ci            If an application desires the functionality of binding to the
55725bd8deadSopenharmony_ci            color matrix in ARB_vertex_program, that application can use one
55735bd8deadSopenharmony_ci            of the other matrices, for instance program matrices, to store the
55745bd8deadSopenharmony_ci            current color matrix.
55755bd8deadSopenharmony_ci
55765bd8deadSopenharmony_ci   12. Instruction set differences.
55775bd8deadSopenharmony_ci
55785bd8deadSopenharmony_ci       In general, ARB_vertex_program's instruction set is a super-set of the
55795bd8deadSopenharmony_ci       EXT_vertex_shader instructions that take VECTOR inputs and produce
55805bd8deadSopenharmony_ci       VECTOR outputs. The versions of the EXT_vertex_shader instructions that
55815bd8deadSopenharmony_ci       take non-vector (i.e. SCALAR or MATRIX) operands are almost all
55825bd8deadSopenharmony_ci       available in vector form as well.
55835bd8deadSopenharmony_ci
55845bd8deadSopenharmony_ci       The instructions from each set correspond as follows:
55855bd8deadSopenharmony_ci
55865bd8deadSopenharmony_ci       EXT_vertex_shader       ARB_vertex_program   Note
55875bd8deadSopenharmony_ci       -----------------       ------------------   -----
55885bd8deadSopenharmony_ci       OP_INDEX_EXT           <unavailable>         (a)
55895bd8deadSopenharmony_ci       OP_NEGATE_EXT          <unavailable>         (b)
55905bd8deadSopenharmony_ci       OP_DOT3_EXT             "DP3"                (c)
55915bd8deadSopenharmony_ci       OP_DOT4_EXT             "DP4"
55925bd8deadSopenharmony_ci       OP_MUL_EXT              "MUL"
55935bd8deadSopenharmony_ci       OP_ADD_EXT              "ADD"
55945bd8deadSopenharmony_ci       OP_MADD_EXT             "MAD"
55955bd8deadSopenharmony_ci       OP_FRAC_EXT             "FRC"
55965bd8deadSopenharmony_ci       OP_MAX_EXT              "MAX"
55975bd8deadSopenharmony_ci       OP_MIN_EXT              "MIN"
55985bd8deadSopenharmony_ci       OP_SET_GE_EXT           "SGE"
55995bd8deadSopenharmony_ci       OP_SET_LT_EXT           "SLT"
56005bd8deadSopenharmony_ci       OP_CLAMP_EXT           <unavailable>         (d)
56015bd8deadSopenharmony_ci       OP_FLOOR_EXT            "FLR"
56025bd8deadSopenharmony_ci       OP_ROUND_EXT           <unavailable>         (e)
56035bd8deadSopenharmony_ci       OP_EXP_BASE_2_EXT       "EX2"                (f)
56045bd8deadSopenharmony_ci       OP_LOG_BASE_2_EXT       "LG2"                (g)
56055bd8deadSopenharmony_ci       OP_POWER_EXT            "POW"                (h)
56065bd8deadSopenharmony_ci       OP_RECIP_EXT            "RCP"                (i)
56075bd8deadSopenharmony_ci       OP_RECIP_SQRT_EXT       "RSQ"                (j)
56085bd8deadSopenharmony_ci       OP_SUB_EXT              "SUB"
56095bd8deadSopenharmony_ci       OP_CROSS_PRODUCT_EXT    "XPD"                (k)
56105bd8deadSopenharmony_ci       OP_MULTIPLY_MATRIX_EXT <unavailable>         (l)
56115bd8deadSopenharmony_ci       OP_MOV_EXT              "MOV"
56125bd8deadSopenharmony_ci      <unavailable>            "ARL"                (a)
56135bd8deadSopenharmony_ci      <unavailable>            "ABS"
56145bd8deadSopenharmony_ci      <unavailable>            "LIT"
56155bd8deadSopenharmony_ci      <unavailable>            "EXP"                (f)
56165bd8deadSopenharmony_ci      <unavailable>            "LOG"                (g)
56175bd8deadSopenharmony_ci      <unavailable>            "DPH"
56185bd8deadSopenharmony_ci      <unavailable>            "DST"
56195bd8deadSopenharmony_ci
56205bd8deadSopenharmony_ci       There are a few minor differences, however.
56215bd8deadSopenharmony_ci
56225bd8deadSopenharmony_ci       a. EXT_vertex_shader's OP_INDEX_EXT is not available in
56235bd8deadSopenharmony_ci          ARB_vertex_program which uses the "ARL" instruction and array syntax
56245bd8deadSopenharmony_ci          to handle dynamically dereferencing source data. See item #10 above
56255bd8deadSopenharmony_ci          and the discussion of "ARL" in section 2.14.3.5.
56265bd8deadSopenharmony_ci
56275bd8deadSopenharmony_ci       b. EXT_vertex_shader's OP_NEGATE_EXT is not available in
56285bd8deadSopenharmony_ci          ARB_vertex_program. ARB_vertex_program can support a "NEGATE"
56295bd8deadSopenharmony_ci          operation through the use of swizzle modifiers on source operands or
56305bd8deadSopenharmony_ci          the "SWZ" instruction.
56315bd8deadSopenharmony_ci
56325bd8deadSopenharmony_ci            MOV tempA, -tempB;
56335bd8deadSopenharmony_ci
56345bd8deadSopenharmony_ci          or
56355bd8deadSopenharmony_ci
56365bd8deadSopenharmony_ci            SWZ tempA, -tempB, x,y,z,w;
56375bd8deadSopenharmony_ci
56385bd8deadSopenharmony_ci       c. The "w" component of EXT_vertex_shader's OP_DOT3_EXT instruction is
56395bd8deadSopenharmony_ci          left unchanged.
56405bd8deadSopenharmony_ci
56415bd8deadSopenharmony_ci          However, in ARB_vertex_program, the "w" component gets the same
56425bd8deadSopenharmony_ci          result as the "x", "y", and "z" components.
56435bd8deadSopenharmony_ci
56445bd8deadSopenharmony_ci       d. EXT_vertex_shader's OP_CLAMP_EXT is not available in
56455bd8deadSopenharmony_ci          ARB_vertex_program. ARB_vertex_program can support a "CLAMP"
56465bd8deadSopenharmony_ci          operation by using a pair of "MAX" and "MIN" instructions as in:
56475bd8deadSopenharmony_ci
56485bd8deadSopenharmony_ci            # CLAMP arg1 to be within [arg2, arg3]
56495bd8deadSopenharmony_ci            MAX temp,   arg1, arg2;
56505bd8deadSopenharmony_ci            MIN result, temp, arg3;
56515bd8deadSopenharmony_ci
56525bd8deadSopenharmony_ci       e. EXT_vertex_shader's OP_ROUND_EXT is not available in
56535bd8deadSopenharmony_ci          ARB_vertex_program. ARB_vertex_program can support a "ROUND"
56545bd8deadSopenharmony_ci          operation by using a pair of "ADD" and "FLOOR" instructions as in:
56555bd8deadSopenharmony_ci
56565bd8deadSopenharmony_ci            ADD   temp,   arg1, 0.5;
56575bd8deadSopenharmony_ci            FLOOR result, temp;
56585bd8deadSopenharmony_ci
56595bd8deadSopenharmony_ci       f. EXT_vertex_shader's OP_EXP_BASE_2_EXT is designed to support high
56605bd8deadSopenharmony_ci          precision calculations of base-2 exponentiation.
56615bd8deadSopenharmony_ci
56625bd8deadSopenharmony_ci          ARB_vertex_program's "EX2" is the equivalent function, however
56635bd8deadSopenharmony_ci          ARB_vertex_program also offers an "EXP" function that is designed to
56645bd8deadSopenharmony_ci          support a lower precision approximation of base-2 exponentiation
56655bd8deadSopenharmony_ci          that can be further refined through an iterative process.
56665bd8deadSopenharmony_ci          
56675bd8deadSopenharmony_ci          On some implementations, both "EX2" and "EXP" may be carried out
56685bd8deadSopenharmony_ci          with the same high precision at no cost relative to each other.  As
56695bd8deadSopenharmony_ci          such, if a vertex program is using "EXP" with the intent of
56705bd8deadSopenharmony_ci          iteratively refining the approximation by using several successive
56715bd8deadSopenharmony_ci          instructions it may be more efficient to use a single call to "EX2"
56725bd8deadSopenharmony_ci          and get the high precision with a single instruction.
56735bd8deadSopenharmony_ci
56745bd8deadSopenharmony_ci          If on the other hand, a single approximation is good enough, there
56755bd8deadSopenharmony_ci          is no additional cost to using "EXP" on such implementations.
56765bd8deadSopenharmony_ci
56775bd8deadSopenharmony_ci          Further note that in EXT_vertex_shader, OP_EXP_BASE_2_EXT is
56785bd8deadSopenharmony_ci          specified to take a scalar operand, whereas ARB_vertex_program's
56795bd8deadSopenharmony_ci          "EXP" and "EX2" instruction each take a vector operand, use the "x"
56805bd8deadSopenharmony_ci          component, and then write (partial) results to all components of a
56815bd8deadSopenharmony_ci          destination vector.
56825bd8deadSopenharmony_ci
56835bd8deadSopenharmony_ci       g. EXT_vertex_shader's OP_LOG_BASE_2_EXT is designed to support high
56845bd8deadSopenharmony_ci          precision calculations of base-2 logarithms.
56855bd8deadSopenharmony_ci
56865bd8deadSopenharmony_ci          ARB_vertex_program's "LG2" is the equivalent function, however
56875bd8deadSopenharmony_ci          ARB_vertex_program also offers an "LOG" function that is designed to
56885bd8deadSopenharmony_ci          support a lower precision approximation of base-2 logarithms that
56895bd8deadSopenharmony_ci          can be further refined through an iterative process.
56905bd8deadSopenharmony_ci
56915bd8deadSopenharmony_ci          On some implementations, both "LG2" and "LOG" may be carried out
56925bd8deadSopenharmony_ci          with the same high precision at no cost relative to each other.  As
56935bd8deadSopenharmony_ci          such, if a vertex program is using "LOG" with the intent of
56945bd8deadSopenharmony_ci          iteratively refining the approximation by using several successive
56955bd8deadSopenharmony_ci          instructions it may be more efficient to use a single call to "LG2"
56965bd8deadSopenharmony_ci          and get the high precision with a single instruction.
56975bd8deadSopenharmony_ci
56985bd8deadSopenharmony_ci          If on the other hand, a single approximation is good enough, there
56995bd8deadSopenharmony_ci          is no additional cost to using "LOG" on such implementations.
57005bd8deadSopenharmony_ci
57015bd8deadSopenharmony_ci          Further note that in EXT_vertex_shader, OP_LOG_BASE_2_EXT is
57025bd8deadSopenharmony_ci          specified to take a scalar operand, whereas ARB_vertex_program's
57035bd8deadSopenharmony_ci          "LOG" and "LOG2" instruction each take a vector operand, use the "x"
57045bd8deadSopenharmony_ci          component, and then write (partial) results to all components of a
57055bd8deadSopenharmony_ci          destination vector.
57065bd8deadSopenharmony_ci
57075bd8deadSopenharmony_ci       h. EXT_vertex_shader's OP_POWER_EXT is designed to support high
57085bd8deadSopenharmony_ci          precision calculations of the power function.
57095bd8deadSopenharmony_ci
57105bd8deadSopenharmony_ci          ARB_vertex_program's "POW" is the equivalent function.
57115bd8deadSopenharmony_ci
57125bd8deadSopenharmony_ci          Further note that in EXT_vertex_shader, OP_POWER_EXT is specified to
57135bd8deadSopenharmony_ci          take a scalar operand, whereas ARB_vertex_program's "POW"
57145bd8deadSopenharmony_ci          instruction takes a vector operand, uses the "x" component, and
57155bd8deadSopenharmony_ci          replicates the same result to all components of a destination
57165bd8deadSopenharmony_ci          vector.
57175bd8deadSopenharmony_ci
57185bd8deadSopenharmony_ci       i. EXT_vertex_shader's OP_RECIP_EXT is specified to take a scalar
57195bd8deadSopenharmony_ci          operand, whereas ARB_vertex_program's "RCP" instruction takes a
57205bd8deadSopenharmony_ci          single component of a vector and replicates the same result to all
57215bd8deadSopenharmony_ci          components of the destination vector.
57225bd8deadSopenharmony_ci
57235bd8deadSopenharmony_ci       j. EXT_vertex_shader's OP_RECIP_SQRT_EXT is specified to take a scalar
57245bd8deadSopenharmony_ci          operand, whereas ARB_vertex_program's "RSQ" instruction takes a
57255bd8deadSopenharmony_ci          single component of a vector and replicates the same result to all
57265bd8deadSopenharmony_ci          components of the destination vector.
57275bd8deadSopenharmony_ci
57285bd8deadSopenharmony_ci       k. The "w" component of EXT_vertex_shader's OP_CROSS_PRODUCT_EXT
57295bd8deadSopenharmony_ci          instruction is forced to 1.0;
57305bd8deadSopenharmony_ci
57315bd8deadSopenharmony_ci          However, in ARB_vertex_program, the "w" component is left undefined
57325bd8deadSopenharmony_ci          and "writes to the w component of the destination are treated as
57335bd8deadSopenharmony_ci          disabled, regardless of the write mask specified in the XPD
57345bd8deadSopenharmony_ci          instruction".
57355bd8deadSopenharmony_ci
57365bd8deadSopenharmony_ci       l. EXT_vertex_shader's OP_MULTIPLY_MATRIX is not available in
57375bd8deadSopenharmony_ci          ARB_vertex_program. ARB_vertex_program can support a "MATRIX
57385bd8deadSopenharmony_ci          MULTIPLY" operation by using a series of "DP4" instructions as in:
57395bd8deadSopenharmony_ci
57405bd8deadSopenharmony_ci            PARAM mat[4] = { state.matrix.modelview };
57415bd8deadSopenharmony_ci            DP4 result.x, vec, mat[0];
57425bd8deadSopenharmony_ci            DP4 result.y, vec, mat[1];
57435bd8deadSopenharmony_ci            DP4 result.z, vec, mat[2];
57445bd8deadSopenharmony_ci            DP4 result.w, vec, mat[3];
57455bd8deadSopenharmony_ci
57465bd8deadSopenharmony_ci   13. Vertex provoking behavior
57475bd8deadSopenharmony_ci
57485bd8deadSopenharmony_ci       EXT_vertex_shader does not provoke vertex shader execution when variant
57495bd8deadSopenharmony_ci       0 is specified (either using Variant*EXT, or variant
57505bd8deadSopenharmony_ci       arrays). Applications are required to use the conventional Vertex* or
57515bd8deadSopenharmony_ci       vertex arrays to provoke a vertex in both vertex shader mode and
57525bd8deadSopenharmony_ci       conventional mode.  Variant 0 is considered current state and is
57535bd8deadSopenharmony_ci       queryable.
57545bd8deadSopenharmony_ci
57555bd8deadSopenharmony_ci       Conversely, ARB_vertex_program does provoke vertex program execution
57565bd8deadSopenharmony_ci       when attribute 0 is specified (either using VertexAttrib*vARB, or
57575bd8deadSopenharmony_ci       attribute arrays) in both vertex program mode and conventional mode.
57585bd8deadSopenharmony_ci       Attribute 0 is not considered current state and is not queryable.
57595bd8deadSopenharmony_ci
57605bd8deadSopenharmony_ci       For implementations that support both extensions, this means that if
57615bd8deadSopenharmony_ci       ARB_vertex_program is disabled, and EXT_vertex_shader is enabled, then
57625bd8deadSopenharmony_ci       specifying ARB_vertex_program's attribute 0 will still provoke
57635bd8deadSopenharmony_ci       execution of the currently bound EXT_vertex_shader defined shader.
57645bd8deadSopenharmony_ci
57655bd8deadSopenharmony_ci   14. Enabled state
57665bd8deadSopenharmony_ci
57675bd8deadSopenharmony_ci       On implementations that support both EXT_vertex_shader, and
57685bd8deadSopenharmony_ci       ARB_vertex_program, priority is given to ARB_vertex_program. That is to
57695bd8deadSopenharmony_ci       say, if both are enabled, the implementation uses the program defined
57705bd8deadSopenharmony_ci       by ARB_vertex_program and does not execute the currently bound
57715bd8deadSopenharmony_ci       EXT_vertex_shader shader unless or until ARB_vertex_program is
57725bd8deadSopenharmony_ci       subsequently disabled. Needless to say, it is not expected that a given
57735bd8deadSopenharmony_ci       application will actually attempt to use both vertex program API's at
57745bd8deadSopenharmony_ci       once.
57755bd8deadSopenharmony_ci
57765bd8deadSopenharmony_ci
57775bd8deadSopenharmony_ciGLX Protocol
57785bd8deadSopenharmony_ci
57795bd8deadSopenharmony_ci     The following rendering commands are sent to the server as part of a
57805bd8deadSopenharmony_ci     glXRender request:
57815bd8deadSopenharmony_ci
57825bd8deadSopenharmony_ci        VertexAttrib1svARB
57835bd8deadSopenharmony_ci            2           12              rendering command length
57845bd8deadSopenharmony_ci            2           4189            rendering command opcode
57855bd8deadSopenharmony_ci            4           CARD32          index
57865bd8deadSopenharmony_ci            2           INT16           v[0]
57875bd8deadSopenharmony_ci            2                           unused
57885bd8deadSopenharmony_ci
57895bd8deadSopenharmony_ci        VertexAttrib1fvARB
57905bd8deadSopenharmony_ci            2           12              rendering command length
57915bd8deadSopenharmony_ci            2           4193            rendering command opcode
57925bd8deadSopenharmony_ci            4           CARD32          index
57935bd8deadSopenharmony_ci            4           FLOAT32         v[0]
57945bd8deadSopenharmony_ci
57955bd8deadSopenharmony_ci        VertexAttrib1dvARB
57965bd8deadSopenharmony_ci            2           16              rendering command length
57975bd8deadSopenharmony_ci            2           4197            rendering command opcode
57985bd8deadSopenharmony_ci            4           CARD32          index
57995bd8deadSopenharmony_ci            8           FLOAT64         v[0]
58005bd8deadSopenharmony_ci
58015bd8deadSopenharmony_ci        VertexAttrib2svARB
58025bd8deadSopenharmony_ci            2           12              rendering command length
58035bd8deadSopenharmony_ci            2           4190            rendering command opcode
58045bd8deadSopenharmony_ci            4           CARD32          index
58055bd8deadSopenharmony_ci            2           INT16           v[0]
58065bd8deadSopenharmony_ci            2           INT16           v[1]
58075bd8deadSopenharmony_ci
58085bd8deadSopenharmony_ci        VertexAttrib2fvARB
58095bd8deadSopenharmony_ci            2           16              rendering command length
58105bd8deadSopenharmony_ci            2           4194            rendering command opcode
58115bd8deadSopenharmony_ci            4           CARD32          index
58125bd8deadSopenharmony_ci            4           FLOAT32         v[0]
58135bd8deadSopenharmony_ci            4           FLOAT32         v[1]
58145bd8deadSopenharmony_ci
58155bd8deadSopenharmony_ci        VertexAttrib2dvARB
58165bd8deadSopenharmony_ci            2           24              rendering command length
58175bd8deadSopenharmony_ci            2           4198            rendering command opcode
58185bd8deadSopenharmony_ci            4           CARD32          index
58195bd8deadSopenharmony_ci            8           FLOAT64         v[0]
58205bd8deadSopenharmony_ci            8           FLOAT64         v[1]
58215bd8deadSopenharmony_ci
58225bd8deadSopenharmony_ci        VertexAttrib3svARB
58235bd8deadSopenharmony_ci            2           16              rendering command length
58245bd8deadSopenharmony_ci            2           4191            rendering command opcode
58255bd8deadSopenharmony_ci            4           CARD32          index
58265bd8deadSopenharmony_ci            2           INT16           v[0]
58275bd8deadSopenharmony_ci            2           INT16           v[1]
58285bd8deadSopenharmony_ci            2           INT16           v[2]
58295bd8deadSopenharmony_ci            2                           unused
58305bd8deadSopenharmony_ci
58315bd8deadSopenharmony_ci        VertexAttrib3fvARB
58325bd8deadSopenharmony_ci            2           20              rendering command length
58335bd8deadSopenharmony_ci            2           4195            rendering command opcode
58345bd8deadSopenharmony_ci            4           CARD32          index
58355bd8deadSopenharmony_ci            4           FLOAT32         v[0]
58365bd8deadSopenharmony_ci            4           FLOAT32         v[1]
58375bd8deadSopenharmony_ci            4           FLOAT32         v[2]
58385bd8deadSopenharmony_ci
58395bd8deadSopenharmony_ci        VertexAttrib3dvARB
58405bd8deadSopenharmony_ci            2           32              rendering command length
58415bd8deadSopenharmony_ci            2           4199            rendering command opcode
58425bd8deadSopenharmony_ci            4           CARD32          index
58435bd8deadSopenharmony_ci            8           FLOAT64         v[0]
58445bd8deadSopenharmony_ci            8           FLOAT64         v[1]
58455bd8deadSopenharmony_ci            8           FLOAT64         v[2]
58465bd8deadSopenharmony_ci
58475bd8deadSopenharmony_ci        VertexAttrib4bvARB
58485bd8deadSopenharmony_ci            2           12              rendering command length
58495bd8deadSopenharmony_ci            2           4230            rendering command opcode
58505bd8deadSopenharmony_ci            4           CARD32          index
58515bd8deadSopenharmony_ci            1           INT8            v[0]
58525bd8deadSopenharmony_ci            1           INT8            v[1]
58535bd8deadSopenharmony_ci            1           INT8            v[2]
58545bd8deadSopenharmony_ci            1           INT8            v[3]
58555bd8deadSopenharmony_ci
58565bd8deadSopenharmony_ci        VertexAttrib4svARB
58575bd8deadSopenharmony_ci            2           16              rendering command length
58585bd8deadSopenharmony_ci            2           4192            rendering command opcode
58595bd8deadSopenharmony_ci            4           CARD32          index
58605bd8deadSopenharmony_ci            2           INT16           v[0]
58615bd8deadSopenharmony_ci            2           INT16           v[1]
58625bd8deadSopenharmony_ci            2           INT16           v[2]
58635bd8deadSopenharmony_ci            2           INT16           v[3]
58645bd8deadSopenharmony_ci
58655bd8deadSopenharmony_ci        VertexAttrib4ivARB
58665bd8deadSopenharmony_ci            2           24              rendering command length
58675bd8deadSopenharmony_ci            2           4231            rendering command opcode
58685bd8deadSopenharmony_ci            4           CARD32          index
58695bd8deadSopenharmony_ci            4           INT32           v[0]
58705bd8deadSopenharmony_ci            4           INT32           v[1]
58715bd8deadSopenharmony_ci            4           INT32           v[2]
58725bd8deadSopenharmony_ci            4           INT32           v[3]
58735bd8deadSopenharmony_ci
58745bd8deadSopenharmony_ci        VertexAttrib4ubvARB
58755bd8deadSopenharmony_ci            2           12              rendering command length
58765bd8deadSopenharmony_ci            2           4232            rendering command opcode
58775bd8deadSopenharmony_ci            4           CARD32          index
58785bd8deadSopenharmony_ci            1           CARD8           v[0]
58795bd8deadSopenharmony_ci            1           CARD8           v[1]
58805bd8deadSopenharmony_ci            1           CARD8           v[2]
58815bd8deadSopenharmony_ci            1           CARD8           v[3]
58825bd8deadSopenharmony_ci
58835bd8deadSopenharmony_ci        VertexAttrib4usvARB
58845bd8deadSopenharmony_ci            2           16              rendering command length
58855bd8deadSopenharmony_ci            2           4233            rendering command opcode
58865bd8deadSopenharmony_ci            4           CARD32          index
58875bd8deadSopenharmony_ci            2           CARD16          v[0]
58885bd8deadSopenharmony_ci            2           CARD16          v[1]
58895bd8deadSopenharmony_ci            2           CARD16          v[2]
58905bd8deadSopenharmony_ci            2           CARD16          v[3]
58915bd8deadSopenharmony_ci
58925bd8deadSopenharmony_ci        VertexAttrib4uivARB
58935bd8deadSopenharmony_ci            2           24              rendering command length
58945bd8deadSopenharmony_ci            2           4234            rendering command opcode
58955bd8deadSopenharmony_ci            4           CARD32          index
58965bd8deadSopenharmony_ci            4           CARD32          v[0]
58975bd8deadSopenharmony_ci            4           CARD32          v[1]
58985bd8deadSopenharmony_ci            4           CARD32          v[2]
58995bd8deadSopenharmony_ci            4           CARD32          v[3]
59005bd8deadSopenharmony_ci
59015bd8deadSopenharmony_ci        VertexAttrib4fvARB
59025bd8deadSopenharmony_ci            2           24              rendering command length
59035bd8deadSopenharmony_ci            2           4196            rendering command opcode
59045bd8deadSopenharmony_ci            4           CARD32          index
59055bd8deadSopenharmony_ci            4           FLOAT32         v[0]
59065bd8deadSopenharmony_ci            4           FLOAT32         v[1]
59075bd8deadSopenharmony_ci            4           FLOAT32         v[2]
59085bd8deadSopenharmony_ci            4           FLOAT32         v[3]
59095bd8deadSopenharmony_ci
59105bd8deadSopenharmony_ci        VertexAttrib4dvARB
59115bd8deadSopenharmony_ci            2           40              rendering command length
59125bd8deadSopenharmony_ci            2           4200            rendering command opcode
59135bd8deadSopenharmony_ci            4           CARD32          index
59145bd8deadSopenharmony_ci            8           FLOAT64         v[0]
59155bd8deadSopenharmony_ci            8           FLOAT64         v[1]
59165bd8deadSopenharmony_ci            8           FLOAT64         v[2]
59175bd8deadSopenharmony_ci            8           FLOAT64         v[3]
59185bd8deadSopenharmony_ci
59195bd8deadSopenharmony_ci        VertexAttrib4NbvARB
59205bd8deadSopenharmony_ci            2           12              rendering command length
59215bd8deadSopenharmony_ci            2           4235            rendering command opcode
59225bd8deadSopenharmony_ci            4           CARD32          index
59235bd8deadSopenharmony_ci            1           INT8            v[0]
59245bd8deadSopenharmony_ci            1           INT8            v[1]
59255bd8deadSopenharmony_ci            1           INT8            v[2]
59265bd8deadSopenharmony_ci            1           INT8            v[3]
59275bd8deadSopenharmony_ci
59285bd8deadSopenharmony_ci        VertexAttrib4NsvARB
59295bd8deadSopenharmony_ci            2           16              rendering command length
59305bd8deadSopenharmony_ci            2           4236            rendering command opcode
59315bd8deadSopenharmony_ci            4           CARD32          index
59325bd8deadSopenharmony_ci            2           INT16           v[0]
59335bd8deadSopenharmony_ci            2           INT16           v[1]
59345bd8deadSopenharmony_ci            2           INT16           v[2]
59355bd8deadSopenharmony_ci            2           INT16           v[3]
59365bd8deadSopenharmony_ci
59375bd8deadSopenharmony_ci        VertexAttrib4NivARB
59385bd8deadSopenharmony_ci            2           24              rendering command length
59395bd8deadSopenharmony_ci            2           4237            rendering command opcode
59405bd8deadSopenharmony_ci            4           CARD32          index
59415bd8deadSopenharmony_ci            4           INT32           v[0]
59425bd8deadSopenharmony_ci            4           INT32           v[1]
59435bd8deadSopenharmony_ci            4           INT32           v[2]
59445bd8deadSopenharmony_ci            4           INT32           v[3]
59455bd8deadSopenharmony_ci
59465bd8deadSopenharmony_ci        VertexAttrib4NubvARB
59475bd8deadSopenharmony_ci            2           12              rendering command length
59485bd8deadSopenharmony_ci            2           4201            rendering command opcode
59495bd8deadSopenharmony_ci            4           CARD32          index
59505bd8deadSopenharmony_ci            1           CARD8           v[0]
59515bd8deadSopenharmony_ci            1           CARD8           v[1]
59525bd8deadSopenharmony_ci            1           CARD8           v[2]
59535bd8deadSopenharmony_ci            1           CARD8           v[3]
59545bd8deadSopenharmony_ci
59555bd8deadSopenharmony_ci        VertexAttrib4NusvARB
59565bd8deadSopenharmony_ci            2           16              rendering command length
59575bd8deadSopenharmony_ci            2           4238            rendering command opcode
59585bd8deadSopenharmony_ci            4           CARD32          index
59595bd8deadSopenharmony_ci            2           CARD16          v[0]
59605bd8deadSopenharmony_ci            2           CARD16          v[1]
59615bd8deadSopenharmony_ci            2           CARD16          v[2]
59625bd8deadSopenharmony_ci            2           CARD16          v[3]
59635bd8deadSopenharmony_ci
59645bd8deadSopenharmony_ci        VertexAttrib4NuivARB
59655bd8deadSopenharmony_ci            2           24              rendering command length
59665bd8deadSopenharmony_ci            2           4239            rendering command opcode
59675bd8deadSopenharmony_ci            4           CARD32          index
59685bd8deadSopenharmony_ci            4           CARD32          v[0]
59695bd8deadSopenharmony_ci            4           CARD32          v[1]
59705bd8deadSopenharmony_ci            4           CARD32          v[2]
59715bd8deadSopenharmony_ci            4           CARD32          v[3]
59725bd8deadSopenharmony_ci
59735bd8deadSopenharmony_ci        BindProgramARB
59745bd8deadSopenharmony_ci            2           12              rendering command length
59755bd8deadSopenharmony_ci            2           4180            rendering command opcode
59765bd8deadSopenharmony_ci            4           ENUM            target
59775bd8deadSopenharmony_ci            4           CARD32          program
59785bd8deadSopenharmony_ci
59795bd8deadSopenharmony_ci        ProgramEnvParameter4fvARB
59805bd8deadSopenharmony_ci            2           32              rendering command length
59815bd8deadSopenharmony_ci            2           4184            rendering command opcode
59825bd8deadSopenharmony_ci            4           ENUM            target
59835bd8deadSopenharmony_ci            4           CARD32          index
59845bd8deadSopenharmony_ci            4           FLOAT32         params[0]
59855bd8deadSopenharmony_ci            4           FLOAT32         params[1]
59865bd8deadSopenharmony_ci            4           FLOAT32         params[2]
59875bd8deadSopenharmony_ci            4           FLOAT32         params[3]
59885bd8deadSopenharmony_ci
59895bd8deadSopenharmony_ci        ProgramEnvParameter4dvARB
59905bd8deadSopenharmony_ci            2           44              rendering command length
59915bd8deadSopenharmony_ci            2           4185            rendering command opcode
59925bd8deadSopenharmony_ci            4           ENUM            target
59935bd8deadSopenharmony_ci            4           CARD32          index
59945bd8deadSopenharmony_ci            8           FLOAT64         params[0]
59955bd8deadSopenharmony_ci            8           FLOAT64         params[1]
59965bd8deadSopenharmony_ci            8           FLOAT64         params[2]
59975bd8deadSopenharmony_ci            8           FLOAT64         params[3]
59985bd8deadSopenharmony_ci
59995bd8deadSopenharmony_ci        ProgramLocalParameter4fvARB
60005bd8deadSopenharmony_ci            2           32              rendering command length
60015bd8deadSopenharmony_ci            2           4215            rendering command opcode
60025bd8deadSopenharmony_ci            4           ENUM            target
60035bd8deadSopenharmony_ci            4           CARD32          index
60045bd8deadSopenharmony_ci            4           FLOAT32         params[0]
60055bd8deadSopenharmony_ci            4           FLOAT32         params[1]
60065bd8deadSopenharmony_ci            4           FLOAT32         params[2]
60075bd8deadSopenharmony_ci            4           FLOAT32         params[3]
60085bd8deadSopenharmony_ci
60095bd8deadSopenharmony_ci        ProgramLocalParameter4dvARB
60105bd8deadSopenharmony_ci            2           44              rendering command length
60115bd8deadSopenharmony_ci            2           4216            rendering command opcode
60125bd8deadSopenharmony_ci            4           ENUM            target
60135bd8deadSopenharmony_ci            4           CARD32          index
60145bd8deadSopenharmony_ci            8           FLOAT64         params[0]
60155bd8deadSopenharmony_ci            8           FLOAT64         params[1]
60165bd8deadSopenharmony_ci            8           FLOAT64         params[2]
60175bd8deadSopenharmony_ci            8           FLOAT64         params[3]
60185bd8deadSopenharmony_ci
60195bd8deadSopenharmony_ci    The ProgramStringARB is potentially large, and hence can be sent in a
60205bd8deadSopenharmony_ci    glXRender or glXRenderLarge request.
60215bd8deadSopenharmony_ci
60225bd8deadSopenharmony_ci        ProgramStringARB
60235bd8deadSopenharmony_ci            2           16+len+p        rendering command length
60245bd8deadSopenharmony_ci            2           4217            rendering command opcode
60255bd8deadSopenharmony_ci            4           ENUM            target
60265bd8deadSopenharmony_ci            4           ENUM            format
60275bd8deadSopenharmony_ci            4           sizei           len
60285bd8deadSopenharmony_ci            len         LISTofBYTE      program
60295bd8deadSopenharmony_ci            p                           unused, p=pad(len)
60305bd8deadSopenharmony_ci
60315bd8deadSopenharmony_ci         If the command is encoded in a glxRenderLarge request, the command
60325bd8deadSopenharmony_ci         opcode and command length fields above are expanded to 4 bytes each:
60335bd8deadSopenharmony_ci
60345bd8deadSopenharmony_ci            4           16+len+p        rendering command length
60355bd8deadSopenharmony_ci            4           4217            rendering command opcode
60365bd8deadSopenharmony_ci
60375bd8deadSopenharmony_ci    VertexAttribPointerARB, EnableVertexAttribArrayARB, and
60385bd8deadSopenharmony_ci    DisableVertexAttribArrayARB are entirely client-side commands.
60395bd8deadSopenharmony_ci
60405bd8deadSopenharmony_ci    The remaining commands are non-rendering commands.  These commands are
60415bd8deadSopenharmony_ci    sent separately (i.e., not as part of a glXRender or glXRenderLarge
60425bd8deadSopenharmony_ci    request), using the glXVendorPrivateWithReply request:
60435bd8deadSopenharmony_ci
60445bd8deadSopenharmony_ci        DeleteProgramsARB
60455bd8deadSopenharmony_ci            1           CARD8           opcode (X assigned)
60465bd8deadSopenharmony_ci            1           17              GLX opcode (glXVendorPrivateWithReply)
60475bd8deadSopenharmony_ci            2           4+n             request length
60485bd8deadSopenharmony_ci            4           1294            vendor specific opcode
60495bd8deadSopenharmony_ci            4           GLX_CONTEXT_TAG context tag
60505bd8deadSopenharmony_ci            4           INT32           n
60515bd8deadSopenharmony_ci            n*4         LISTofCARD32    programs
60525bd8deadSopenharmony_ci
60535bd8deadSopenharmony_ci        GenProgramsARB
60545bd8deadSopenharmony_ci            1           CARD8           opcode (X assigned)
60555bd8deadSopenharmony_ci            1           17              GLX opcode (glXVendorPrivateWithReply)
60565bd8deadSopenharmony_ci            2           4               request length
60575bd8deadSopenharmony_ci            4           1295            vendor specific opcode
60585bd8deadSopenharmony_ci            4           GLX_CONTEXT_TAG context tag
60595bd8deadSopenharmony_ci            4           INT32           n
60605bd8deadSopenharmony_ci          =>
60615bd8deadSopenharmony_ci            1           1               reply
60625bd8deadSopenharmony_ci            1                           unused
60635bd8deadSopenharmony_ci            2           CARD16          sequence number
60645bd8deadSopenharmony_ci            4           n               reply length
60655bd8deadSopenharmony_ci            24                          unused
60665bd8deadSopenharmony_ci            n*4         LISTofCARD322   programs
60675bd8deadSopenharmony_ci
60685bd8deadSopenharmony_ci        GetProgramEnvParameterfvARB
60695bd8deadSopenharmony_ci            1           CARD8           opcode (X assigned)
60705bd8deadSopenharmony_ci            1           17              GLX opcode (glXVendorPrivateWithReply)
60715bd8deadSopenharmony_ci            2           6               request length
60725bd8deadSopenharmony_ci            4           1296            vendor specific opcode
60735bd8deadSopenharmony_ci            4           GLX_CONTEXT_TAG context tag
60745bd8deadSopenharmony_ci            4           ENUM            target
60755bd8deadSopenharmony_ci            4           CARD32          index
60765bd8deadSopenharmony_ci            4                           unused
60775bd8deadSopenharmony_ci          =>
60785bd8deadSopenharmony_ci            1           1               reply
60795bd8deadSopenharmony_ci            1                           unused
60805bd8deadSopenharmony_ci            2           CARD16          sequence number
60815bd8deadSopenharmony_ci            4           m               reply length, m=(n==1?0:n)
60825bd8deadSopenharmony_ci            4                           unused
60835bd8deadSopenharmony_ci            4           CARD32          n (number of parameter components)
60845bd8deadSopenharmony_ci
60855bd8deadSopenharmony_ci            if (n=1) this follows:
60865bd8deadSopenharmony_ci
60875bd8deadSopenharmony_ci            4           FLOAT32         params
60885bd8deadSopenharmony_ci            12                          unused
60895bd8deadSopenharmony_ci
60905bd8deadSopenharmony_ci            otherwise this follows:
60915bd8deadSopenharmony_ci
60925bd8deadSopenharmony_ci            16                          unused
60935bd8deadSopenharmony_ci            n*4         LISTofFLOAT32   params
60945bd8deadSopenharmony_ci
60955bd8deadSopenharmony_ci        GetProgramEnvParameterdvARB
60965bd8deadSopenharmony_ci            1           CARD8           opcode (X assigned)
60975bd8deadSopenharmony_ci            1           17              GLX opcode (glXVendorPrivateWithReply)
60985bd8deadSopenharmony_ci            2           6               request length
60995bd8deadSopenharmony_ci            4           1297            vendor specific opcode
61005bd8deadSopenharmony_ci            4           GLX_CONTEXT_TAG context tag
61015bd8deadSopenharmony_ci            4           ENUM            target
61025bd8deadSopenharmony_ci            4           CARD32          index
61035bd8deadSopenharmony_ci            4                           unused
61045bd8deadSopenharmony_ci          =>
61055bd8deadSopenharmony_ci            1           1               reply
61065bd8deadSopenharmony_ci            1                           unused
61075bd8deadSopenharmony_ci            2           CARD16          sequence number
61085bd8deadSopenharmony_ci            4           m               reply length, m=(n==1?0:n*2)
61095bd8deadSopenharmony_ci            4                           unused
61105bd8deadSopenharmony_ci            4           CARD32          n (number of parameter components)
61115bd8deadSopenharmony_ci
61125bd8deadSopenharmony_ci            if (n=1) this follows:
61135bd8deadSopenharmony_ci
61145bd8deadSopenharmony_ci            8           FLOAT64         params
61155bd8deadSopenharmony_ci            8                           unused
61165bd8deadSopenharmony_ci
61175bd8deadSopenharmony_ci            otherwise this follows:
61185bd8deadSopenharmony_ci
61195bd8deadSopenharmony_ci            16                          unused
61205bd8deadSopenharmony_ci            n*8         LISTofFLOAT64   params
61215bd8deadSopenharmony_ci
61225bd8deadSopenharmony_ci        GetProgramLocalParameterfvARB
61235bd8deadSopenharmony_ci            1           CARD8           opcode (X assigned)
61245bd8deadSopenharmony_ci            1           17              GLX opcode (glXVendorPrivateWithReply)
61255bd8deadSopenharmony_ci            2           6               request length
61265bd8deadSopenharmony_ci            4           1305            vendor specific opcode
61275bd8deadSopenharmony_ci            4           GLX_CONTEXT_TAG context tag
61285bd8deadSopenharmony_ci            4           ENUM            target
61295bd8deadSopenharmony_ci            4           CARD32          index
61305bd8deadSopenharmony_ci            4                           unused
61315bd8deadSopenharmony_ci          =>
61325bd8deadSopenharmony_ci            1           1               reply
61335bd8deadSopenharmony_ci            1                           unused
61345bd8deadSopenharmony_ci            2           CARD16          sequence number
61355bd8deadSopenharmony_ci            4           m               reply length, m=(n==1?0:n)
61365bd8deadSopenharmony_ci            4                           unused
61375bd8deadSopenharmony_ci            4           CARD32          n (number of parameter components)
61385bd8deadSopenharmony_ci
61395bd8deadSopenharmony_ci            if (n=1) this follows:
61405bd8deadSopenharmony_ci
61415bd8deadSopenharmony_ci            4           FLOAT32         params
61425bd8deadSopenharmony_ci            12                          unused
61435bd8deadSopenharmony_ci
61445bd8deadSopenharmony_ci            otherwise this follows:
61455bd8deadSopenharmony_ci
61465bd8deadSopenharmony_ci            16                          unused
61475bd8deadSopenharmony_ci            n*4         LISTofFLOAT32   params
61485bd8deadSopenharmony_ci
61495bd8deadSopenharmony_ci        GetProgramLocalParameterdvARB
61505bd8deadSopenharmony_ci            1           CARD8           opcode (X assigned)
61515bd8deadSopenharmony_ci            1           17              GLX opcode (glXVendorPrivateWithReply)
61525bd8deadSopenharmony_ci            2           6               request length
61535bd8deadSopenharmony_ci            4           1306            vendor specific opcode
61545bd8deadSopenharmony_ci            4           GLX_CONTEXT_TAG context tag
61555bd8deadSopenharmony_ci            4           ENUM            target
61565bd8deadSopenharmony_ci            4           CARD32          index
61575bd8deadSopenharmony_ci            4                           unused
61585bd8deadSopenharmony_ci          =>
61595bd8deadSopenharmony_ci            1           1               reply
61605bd8deadSopenharmony_ci            1                           unused
61615bd8deadSopenharmony_ci            2           CARD16          sequence number
61625bd8deadSopenharmony_ci            4           m               reply length, m=(n==1?0:n*2)
61635bd8deadSopenharmony_ci            4                           unused
61645bd8deadSopenharmony_ci            4           CARD32          n (number of parameter components)
61655bd8deadSopenharmony_ci
61665bd8deadSopenharmony_ci            if (n=1) this follows:
61675bd8deadSopenharmony_ci
61685bd8deadSopenharmony_ci            8           FLOAT64         params
61695bd8deadSopenharmony_ci            8                           unused
61705bd8deadSopenharmony_ci
61715bd8deadSopenharmony_ci            otherwise this follows:
61725bd8deadSopenharmony_ci
61735bd8deadSopenharmony_ci            16                          unused
61745bd8deadSopenharmony_ci            n*8         LISTofFLOAT64   params
61755bd8deadSopenharmony_ci
61765bd8deadSopenharmony_ci        GetProgramivARB
61775bd8deadSopenharmony_ci            1           CARD8           opcode (X assigned)
61785bd8deadSopenharmony_ci            1           17              GLX opcode (glXVendorPrivateWithReply)
61795bd8deadSopenharmony_ci            2           5               request length
61805bd8deadSopenharmony_ci            4           1307            vendor specific opcode
61815bd8deadSopenharmony_ci            4           GLX_CONTEXT_TAG context tag
61825bd8deadSopenharmony_ci            4           ENUM            target
61835bd8deadSopenharmony_ci            4           ENUM            pname
61845bd8deadSopenharmony_ci          =>
61855bd8deadSopenharmony_ci            1           1               reply
61865bd8deadSopenharmony_ci            1                           unused
61875bd8deadSopenharmony_ci            2           CARD16          sequence number
61885bd8deadSopenharmony_ci            4           m               reply length, m=(n==1?0:n)
61895bd8deadSopenharmony_ci            4                           unused
61905bd8deadSopenharmony_ci            4           CARD32          n
61915bd8deadSopenharmony_ci
61925bd8deadSopenharmony_ci            if (n=1) this follows:
61935bd8deadSopenharmony_ci
61945bd8deadSopenharmony_ci            4           INT32           params
61955bd8deadSopenharmony_ci            12                          unused
61965bd8deadSopenharmony_ci
61975bd8deadSopenharmony_ci            otherwise this follows:
61985bd8deadSopenharmony_ci
61995bd8deadSopenharmony_ci            16                          unused
62005bd8deadSopenharmony_ci            n*4         LISTofINT32     params
62015bd8deadSopenharmony_ci
62025bd8deadSopenharmony_ci        GetProgramStringARB
62035bd8deadSopenharmony_ci            1           CARD8           opcode (X assigned)
62045bd8deadSopenharmony_ci            1           17              GLX opcode (glXVendorPrivateWithReply)
62055bd8deadSopenharmony_ci            2           5               request length
62065bd8deadSopenharmony_ci            4           1308            vendor specific opcode
62075bd8deadSopenharmony_ci            4           GLX_CONTEXT_TAG context tag
62085bd8deadSopenharmony_ci            4           ENUM            target
62095bd8deadSopenharmony_ci            4           ENUM            pname
62105bd8deadSopenharmony_ci          =>
62115bd8deadSopenharmony_ci            1           1               reply
62125bd8deadSopenharmony_ci            1                           unused
62135bd8deadSopenharmony_ci            2           CARD16          sequence number
62145bd8deadSopenharmony_ci            4           (n+p)/4         reply length
62155bd8deadSopenharmony_ci            4                           unused
62165bd8deadSopenharmony_ci            4           CARD32          n
62175bd8deadSopenharmony_ci            16                          unused
62185bd8deadSopenharmony_ci            n           STRING          program
62195bd8deadSopenharmony_ci            p                           unused, p=pad(n)
62205bd8deadSopenharmony_ci
62215bd8deadSopenharmony_ci        Note that VERTEX_ATTRIB_ARRAY_ENABLED_ARB,
62225bd8deadSopenharmony_ci        VERTEX_ATTRIB_ARRAY_SIZE_ARB, VERTEX_ATTRIB_ARRAY_STRIDE_ARB,
62235bd8deadSopenharmony_ci        VERTEX_ATTRIB_ARRAY_TYPE_ARB, and VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB
62245bd8deadSopenharmony_ci        may be queried by GetVertexAttrib[dfi]ARB, but generate no protocol
62255bd8deadSopenharmony_ci        and return client-side state.
62265bd8deadSopenharmony_ci
62275bd8deadSopenharmony_ci        GetVertexAttribdvARB
62285bd8deadSopenharmony_ci            1           CARD8           opcode (X assigned)
62295bd8deadSopenharmony_ci            1           17              GLX opcode (glXVendorPrivateWithReply)
62305bd8deadSopenharmony_ci            2           5               request length
62315bd8deadSopenharmony_ci            4           1301            vendor specific opcode
62325bd8deadSopenharmony_ci            4           GLX_CONTEXT_TAG context tag
62335bd8deadSopenharmony_ci            4           INT32           index
62345bd8deadSopenharmony_ci            4           ENUM            pname
62355bd8deadSopenharmony_ci          =>
62365bd8deadSopenharmony_ci            1           1               reply
62375bd8deadSopenharmony_ci            1                           unused
62385bd8deadSopenharmony_ci            2           CARD16          sequence number
62395bd8deadSopenharmony_ci            4           m               reply length, m=(n==1?0:n*2)
62405bd8deadSopenharmony_ci            4                           unused
62415bd8deadSopenharmony_ci            4           CARD32          n
62425bd8deadSopenharmony_ci
62435bd8deadSopenharmony_ci            if (n=1) this follows:
62445bd8deadSopenharmony_ci
62455bd8deadSopenharmony_ci            8           FLOAT64         params
62465bd8deadSopenharmony_ci            8                           unused
62475bd8deadSopenharmony_ci
62485bd8deadSopenharmony_ci            otherwise this follows:
62495bd8deadSopenharmony_ci
62505bd8deadSopenharmony_ci            16                          unused
62515bd8deadSopenharmony_ci            n*8         LISTofFLOAT64   params
62525bd8deadSopenharmony_ci
62535bd8deadSopenharmony_ci        GetVertexAttribfvARB
62545bd8deadSopenharmony_ci            1           CARD8           opcode (X assigned)
62555bd8deadSopenharmony_ci            1           17              GLX opcode (glXVendorPrivateWithReply)
62565bd8deadSopenharmony_ci            2           5               request length
62575bd8deadSopenharmony_ci            4           1302            vendor specific opcode
62585bd8deadSopenharmony_ci            4           GLX_CONTEXT_TAG context tag
62595bd8deadSopenharmony_ci            4           INT32           index
62605bd8deadSopenharmony_ci            4           ENUM            pname
62615bd8deadSopenharmony_ci          =>
62625bd8deadSopenharmony_ci            1           1               reply
62635bd8deadSopenharmony_ci            1                           unused
62645bd8deadSopenharmony_ci            2           CARD16          sequence number
62655bd8deadSopenharmony_ci            4           m               reply length, m=(n==1?0:n)
62665bd8deadSopenharmony_ci            4                           unused
62675bd8deadSopenharmony_ci            4           CARD32          n
62685bd8deadSopenharmony_ci
62695bd8deadSopenharmony_ci            if (n=1) this follows:
62705bd8deadSopenharmony_ci
62715bd8deadSopenharmony_ci            4           FLOAT32         params
62725bd8deadSopenharmony_ci            12                          unused
62735bd8deadSopenharmony_ci
62745bd8deadSopenharmony_ci            otherwise this follows:
62755bd8deadSopenharmony_ci
62765bd8deadSopenharmony_ci            16                          unused
62775bd8deadSopenharmony_ci            n*4         LISTofFLOAT32   params
62785bd8deadSopenharmony_ci
62795bd8deadSopenharmony_ci        GetVertexAttribivARB
62805bd8deadSopenharmony_ci            1           CARD8           opcode (X assigned)
62815bd8deadSopenharmony_ci            1           17              GLX opcode (glXVendorPrivateWithReply)
62825bd8deadSopenharmony_ci            2           5               request length
62835bd8deadSopenharmony_ci            4           1303            vendor specific opcode
62845bd8deadSopenharmony_ci            4           GLX_CONTEXT_TAG context tag
62855bd8deadSopenharmony_ci            4           INT32           index
62865bd8deadSopenharmony_ci            4           ENUM            pname
62875bd8deadSopenharmony_ci          =>
62885bd8deadSopenharmony_ci            1           1               reply
62895bd8deadSopenharmony_ci            1                           unused
62905bd8deadSopenharmony_ci            2           CARD16          sequence number
62915bd8deadSopenharmony_ci            4           m               reply length, m=(n==1?0:n)
62925bd8deadSopenharmony_ci            4                           unused
62935bd8deadSopenharmony_ci            4           CARD32          n
62945bd8deadSopenharmony_ci
62955bd8deadSopenharmony_ci            if (n=1) this follows:
62965bd8deadSopenharmony_ci
62975bd8deadSopenharmony_ci            4           INT32           params
62985bd8deadSopenharmony_ci            12                          unused
62995bd8deadSopenharmony_ci
63005bd8deadSopenharmony_ci            otherwise this follows:
63015bd8deadSopenharmony_ci
63025bd8deadSopenharmony_ci            16                          unused
63035bd8deadSopenharmony_ci            n*4         LISTofINT32     params
63045bd8deadSopenharmony_ci
63055bd8deadSopenharmony_ci        IsProgramARB
63065bd8deadSopenharmony_ci            1           CARD8           opcode (X assigned)
63075bd8deadSopenharmony_ci            1           17              GLX opcode (glXVendorPrivateWithReply)
63085bd8deadSopenharmony_ci            2           4               request length
63095bd8deadSopenharmony_ci            4           1304            vendor specific opcode
63105bd8deadSopenharmony_ci            4           GLX_CONTEXT_TAG context tag
63115bd8deadSopenharmony_ci            4           INT32           n
63125bd8deadSopenharmony_ci          =>
63135bd8deadSopenharmony_ci            1           1               reply
63145bd8deadSopenharmony_ci            1                           unused
63155bd8deadSopenharmony_ci            2           CARD16          sequence number
63165bd8deadSopenharmony_ci            4           0               reply length
63175bd8deadSopenharmony_ci            4           BOOL32          return value
63185bd8deadSopenharmony_ci            20                          unused
63195bd8deadSopenharmony_ci
63205bd8deadSopenharmony_ci     When transferring vertex attribute array elements, there may not be a
63215bd8deadSopenharmony_ci     protocol encoding that exactly matches the combination of combination of
63225bd8deadSopenharmony_ci     size, normalization enable, and data type in the array.  If no match
63235bd8deadSopenharmony_ci     protocol encoding exists, the encoding for the corresponding 4-component
63245bd8deadSopenharmony_ci     attribute is used.  v[1] and v[2] are set to zero if not specified in the
63255bd8deadSopenharmony_ci     vertex array.  If v[3] is not specified in the vertex array, it is set to
63265bd8deadSopenharmony_ci     0x7F, 0x7FFF, 0x7FFFFFFF, 0xFF, 0xFFFF, or 0xFFFFFFFF for the
63275bd8deadSopenharmony_ci     VertexAttrib4NbvARB, VertexAttrib4NsvARB, VertexAttrib4NivARB,
63285bd8deadSopenharmony_ci     VertexAttrib4NubvARB, VertexAttrib4NusvARB, and VertexAttrib4NuivARB
63295bd8deadSopenharmony_ci     protocol encodings, respectively.  v[3] is set to one if it is not
63305bd8deadSopenharmony_ci     specified in the vertex array for the the VertexAttrib4bvARB,
63315bd8deadSopenharmony_ci     VertexAttrib4svARB, VertexAttrib4ivARB, VertexAttrib4ubvARB,
63325bd8deadSopenharmony_ci     VertexAttrib4usvARB, and VertexAttrib4uivARB protocol encodings.
63335bd8deadSopenharmony_ci
63345bd8deadSopenharmony_ci
63355bd8deadSopenharmony_ciErrors 
63365bd8deadSopenharmony_ci 
63375bd8deadSopenharmony_ci    The error INVALID_VALUE is generated by any VertexAttrib*ARB or
63385bd8deadSopenharmony_ci    GetVertexAttrib*ARB command if <index> is greater than or equal to
63395bd8deadSopenharmony_ci    MAX_VERTEX_ATTRIBS_ARB.
63405bd8deadSopenharmony_ci
63415bd8deadSopenharmony_ci    The error INVALID_VALUE is generated by VertexAttribPointerARB or
63425bd8deadSopenharmony_ci    GetVertexAttribPointervARB if <index> is greater than or equal to
63435bd8deadSopenharmony_ci    MAX_VERTEX_ATTRIBS_ARB.
63445bd8deadSopenharmony_ci
63455bd8deadSopenharmony_ci    The error INVALID_VALUE is generated by VertexAttribPointerARB if <size>
63465bd8deadSopenharmony_ci    is not one of 1, 2, 3, or 4.
63475bd8deadSopenharmony_ci
63485bd8deadSopenharmony_ci    The error INVALID_VALUE is generated by VertexAttribPointerARB if <stride>
63495bd8deadSopenharmony_ci    is negative.
63505bd8deadSopenharmony_ci
63515bd8deadSopenharmony_ci    The error INVALID_VALUE is generated by EnableVertexAttribArrayARB or
63525bd8deadSopenharmony_ci    DisableVertexAttribArrayARB if <index> is greater than or equal to
63535bd8deadSopenharmony_ci    MAX_VERTEX_ATTRIBS_ARB.
63545bd8deadSopenharmony_ci
63555bd8deadSopenharmony_ci    The error INVALID_OPERATION is generated by ProgramStringARB if the
63565bd8deadSopenharmony_ci    program string <string> is syntactically incorrect or violates any
63575bd8deadSopenharmony_ci    semantic restriction of the execution environment of the specified program
63585bd8deadSopenharmony_ci    target <target>.
63595bd8deadSopenharmony_ci
63605bd8deadSopenharmony_ci    The error INVALID_OPERATION is generated by BindProgramARB if <program> is
63615bd8deadSopenharmony_ci    the name of a program whose target does not match <target>.
63625bd8deadSopenharmony_ci
63635bd8deadSopenharmony_ci    The error INVALID_VALUE is generated by any ProgramEnvParameter*ARB or
63645bd8deadSopenharmony_ci    GetProgramEnvParameter*ARB command if <index> is greater than or equal to
63655bd8deadSopenharmony_ci    the value of MAX_PROGRAM_ENV_PARAMETERS_ARB corresponding to the program
63665bd8deadSopenharmony_ci    target <target>.
63675bd8deadSopenharmony_ci
63685bd8deadSopenharmony_ci    The error INVALID_VALUE is generated by any ProgramLocalParameter*ARB or
63695bd8deadSopenharmony_ci    GetProgramLocalParameter*ARB command if <index> is greater than or equal
63705bd8deadSopenharmony_ci    to the value of MAX_PROGRAM_LOCAL_PARAMETERS_ARB corresponding to the
63715bd8deadSopenharmony_ci    program target <target>.
63725bd8deadSopenharmony_ci
63735bd8deadSopenharmony_ci    The error INVALID_OPERATION is generated if Begin, RasterPos, or any
63745bd8deadSopenharmony_ci    command that performs an explicit Begin is called when vertex program mode
63755bd8deadSopenharmony_ci    is enabled and the currently bound vertex program object does not contain
63765bd8deadSopenharmony_ci    a valid vertex program.
63775bd8deadSopenharmony_ci
63785bd8deadSopenharmony_ci    The error INVALID_OPERATION is generated by GetVertexAttrib*ARB if <index>
63795bd8deadSopenharmony_ci    is zero and <pname> is CURRENT_VERTEX_ATTRIB_ARB.
63805bd8deadSopenharmony_ci
63815bd8deadSopenharmony_ci
63825bd8deadSopenharmony_ciNew State
63835bd8deadSopenharmony_ci
63845bd8deadSopenharmony_ci
63855bd8deadSopenharmony_ciGet Value                        Type    Get Command    Initial Value Description         Section       Attribute
63865bd8deadSopenharmony_ci-------------------------------  ------  -------------  ------------- ------------------  ------------  ------------
63875bd8deadSopenharmony_ciVERTEX_PROGRAM_ARB               B       IsEnabled      False         vertex program      2.10          enable
63885bd8deadSopenharmony_ci                                                                      enable
63895bd8deadSopenharmony_ciVERTEX_PROGRAM_POINT_SIZE_ARB    B       IsEnabled      False         program-specified   2.14.3.7      enable
63905bd8deadSopenharmony_ci                                                                      point size mode
63915bd8deadSopenharmony_ciVERTEX_PROGRAM_TWO_SIDE_ARB      B       IsEnabled      False         two-sided color     2.14.3.7      enable
63925bd8deadSopenharmony_ci                                                                      mode
63935bd8deadSopenharmony_ci-                                96+xR4  GetProgramEnv- (0,0,0,0)     program environment 2.14.1        -
63945bd8deadSopenharmony_ci                                         ParameterARB                 parameters
63955bd8deadSopenharmony_ciCURRENT_VERTEX_ATTRIB_ARB        16+xR4  GetVertex-     undefined     generic vertex      2.7           current
63965bd8deadSopenharmony_ci                                         AttribARB                    attributes
63975bd8deadSopenharmony_ciPROGRAM_ERROR_POSITION_ARB       Z       GetIntegerv    -1            last program error  2.14.1        -
63985bd8deadSopenharmony_ci                                                                      position
63995bd8deadSopenharmony_ciPROGRAM_ERROR_STRING_ARB         0+xub   GetString      ""            last program error  2.14.1        -
64005bd8deadSopenharmony_ci                                                                      string
64015bd8deadSopenharmony_ci
64025bd8deadSopenharmony_ciTable X.6.  New Accessible State Introduced by ARB_vertex_program.
64035bd8deadSopenharmony_ci
64045bd8deadSopenharmony_ci
64055bd8deadSopenharmony_ciGet Value                        Type    Get Command    Initial Value Description         Section       Attribute
64065bd8deadSopenharmony_ci-------------------------------  ------  -------------  ------------- ------------------  ------------  ------------
64075bd8deadSopenharmony_ciVERTEX_ATTRIB_ARRAY_ENABLED_ARB  16+xB   GetVertex-     False         vertex attrib       2.8           vertex-array
64085bd8deadSopenharmony_ci                                         AttribARB                    array enable
64095bd8deadSopenharmony_ciVERTEX_ATTRIB_ARRAY_SIZE_ARB     16+xZ   GetVertex-     4             vertex attrib       2.8           vertex-array
64105bd8deadSopenharmony_ci                                         AttribARB                    array size
64115bd8deadSopenharmony_ciVERTEX_ATTRIB_ARRAY_STRIDE_ARB   16+xZ+  GetVertex-     0             vertex attrib       2.8           vertex-array
64125bd8deadSopenharmony_ci                                         AttribARB                    array stride
64135bd8deadSopenharmony_ciVERTEX_ATTRIB_ARRAY_TYPE_ARB     16+xZ4  GetVertex-     FLOAT         vertex attrib       2.8           vertex-array
64145bd8deadSopenharmony_ci                                         AttribARB                    array type
64155bd8deadSopenharmony_ciVERTEX_ATTRIB_ARRAY_             16+xB   GetVertex-     False         vertex attrib       2.8           vertex-array
64165bd8deadSopenharmony_ci    NORMALIZED_ARB                       AttribARB                    array normalized
64175bd8deadSopenharmony_ciVERTEX_ATTRIB_ARRAY_POINTER_ARB  16+xP   GetVertex-     NULL          vertex attrib       2.8           vertex-array
64185bd8deadSopenharmony_ci                                         AttribPointerARB             array pointer
64195bd8deadSopenharmony_ci
64205bd8deadSopenharmony_ciTable X.7.  New Accessible Client State Introduced by ARB_vertex_program.
64215bd8deadSopenharmony_ci
64225bd8deadSopenharmony_ci
64235bd8deadSopenharmony_ciGet Value                        Type   Get Command          Initial Value    Description             Sec       Attrib
64245bd8deadSopenharmony_ci--------------------             -----  -------------------  ---------------  ----------------------  --------  ------
64255bd8deadSopenharmony_ciPROGRAM_BINDING_ARB              Z+     GetProgramivARB      object-specific  bound program name      6.1.12    -
64265bd8deadSopenharmony_ciPROGRAM_LENGTH_ARB               Z+     GetProgramivARB      0                bound program length    6.1.12    -
64275bd8deadSopenharmony_ciPROGRAM_FORMAT_ARB               Z1     GetProgramivARB      PROGRAM_FORMAT_  bound program format    6.1.12    -
64285bd8deadSopenharmony_ci                                                             ASCII_ARB
64295bd8deadSopenharmony_ciPROGRAM_STRING_ARB               ubxn   GetProgramStringARB  (empty)          bound program string    6.1.12    -
64305bd8deadSopenharmony_ciPROGRAM_INSTRUCTIONS_ARB         Z+     GetProgramivARB      0                bound program           6.1.12    -
64315bd8deadSopenharmony_ci                                                                              instructions
64325bd8deadSopenharmony_ciPROGRAM_TEMPORARIES_ARB          Z+     GetProgramivARB      0                bound program           6.1.12    -
64335bd8deadSopenharmony_ci                                                                              temporaries
64345bd8deadSopenharmony_ciPROGRAM_PARAMETERS_ARB           Z+     GetProgramivARB      0                bound program           6.1.12    -
64355bd8deadSopenharmony_ci                                                                              parameter bindings
64365bd8deadSopenharmony_ciPROGRAM_ATTRIBS_ARB              Z+     GetProgramivARB      0                bound program           6.1.12    -
64375bd8deadSopenharmony_ci                                                                              attribute bindings
64385bd8deadSopenharmony_ciPROGRAM_ADDRESS_REGISTERS_ARB    Z+     GetProgramivARB      0                bound program           6.1.12    -
64395bd8deadSopenharmony_ci                                                                              address registers
64405bd8deadSopenharmony_ciPROGRAM_NATIVE_INSTRUCTIONS_ARB  Z+     GetProgramivARB      0                bound program native    6.1.12    -
64415bd8deadSopenharmony_ci                                                                              instructions
64425bd8deadSopenharmony_ciPROGRAM_NATIVE_TEMPORARIES_ARB   Z+     GetProgramivARB      0                bound program native    6.1.12    -
64435bd8deadSopenharmony_ci                                                                              temporaries
64445bd8deadSopenharmony_ciPROGRAM_NATIVE_PARAMETERS_ARB    Z+     GetProgramivARB      0                bound program native    6.1.12    -
64455bd8deadSopenharmony_ci                                                                              parameter bindings
64465bd8deadSopenharmony_ciPROGRAM_NATIVE_ATTRIBS_ARB       Z+     GetProgramivARB      0                bound program native    6.1.12    -
64475bd8deadSopenharmony_ci                                                                              attribute bindings
64485bd8deadSopenharmony_ciPROGRAM_NATIVE_ADDRESS_          Z+     GetProgramivARB      0                bound program native    6.1.12    -
64495bd8deadSopenharmony_ci    REGISTERS_ARB                                                             address registers
64505bd8deadSopenharmony_ciPROGRAM_UNDER_NATIVE_LIMITS_ARB  B      GetProgramivARB      0                bound program under     6.1.12    -
64515bd8deadSopenharmony_ci                                                                              native resource limits
64525bd8deadSopenharmony_ci-                                96+xR4 GetProgramLocal-     (0,0,0,0)        bound program local     2.14.1    -
64535bd8deadSopenharmony_ci                                        ParameterARB                          parameter value
64545bd8deadSopenharmony_ci
64555bd8deadSopenharmony_ciTable X.8.  Program Object State.  Program object queries return attributes of
64565bd8deadSopenharmony_cithe program object currently bound to the program target <target>.
64575bd8deadSopenharmony_ci
64585bd8deadSopenharmony_ci
64595bd8deadSopenharmony_ciGet Value    Type    Get Command   Initial Value  Description              Sec       Attribute
64605bd8deadSopenharmony_ci---------    ------  -----------   -------------  -----------------------  --------  ---------
64615bd8deadSopenharmony_ci-            12+xR4  -             undefined      temporary registers      2.14.3.6  -
64625bd8deadSopenharmony_ci-            8+xR4   -             undefined      vertex result registers  2.14.3.7  -
64635bd8deadSopenharmony_ci             1+xZ1   -             undefined      vertex program           2.14.3.8  -
64645bd8deadSopenharmony_ci                                                  address registers
64655bd8deadSopenharmony_ci
64665bd8deadSopenharmony_ciTable X.9.  Vertex Program Per-vertex Execution State.  All per-vertex
64675bd8deadSopenharmony_ciexecution state registers are uninitialized at the beginning of program
64685bd8deadSopenharmony_ciexecution.
64695bd8deadSopenharmony_ci
64705bd8deadSopenharmony_ci
64715bd8deadSopenharmony_ciGet Value                          Type      Get Command      Initial Value  Description          Sec      Attribute
64725bd8deadSopenharmony_ci------------------------------     --------  --------------   -------------  -------------------  -------  ---------
64735bd8deadSopenharmony_ciCURRENT_MATRIX_ARB                 m*n*xM^4  GetFloatv        Identity       current matrix       6.1.2    -
64745bd8deadSopenharmony_ciCURRENT_MATRIX_STACK_DEPTH_ARB     m*Z+      GetIntegerv      1              current stack depth  6.1.2    -
64755bd8deadSopenharmony_ci
64765bd8deadSopenharmony_ciTable X.10.  Current matrix state where m is the total number of matrices
64775bd8deadSopenharmony_ciincluding texture matrices and program matrices and n is the number of
64785bd8deadSopenharmony_cimatrices on each particular matrix stack.  Note that this state is aliased
64795bd8deadSopenharmony_ciwith existing matrix state.
64805bd8deadSopenharmony_ci
64815bd8deadSopenharmony_ci
64825bd8deadSopenharmony_ciNew Implementation Dependent State
64835bd8deadSopenharmony_ci                                                              Minimum
64845bd8deadSopenharmony_ciGet Value                            Type    Get Command      Value       Description             Sec           Attrib
64855bd8deadSopenharmony_ci-----------------------------------  ----    ---------------  ----------  --------------------    ------------  ------
64865bd8deadSopenharmony_ciMAX_PROGRAM_ENV_PARAMETERS_ARB       Z+      GetProgramivARB  96          maximum program         2.14.1        -
64875bd8deadSopenharmony_ci                                                                          env parameters
64885bd8deadSopenharmony_ciMAX_PROGRAM_LOCAL_PARAMETERS_ARB     Z+      GetProgramivARB  96          maximum program         2.14.1        -
64895bd8deadSopenharmony_ci                                                                          local parameters
64905bd8deadSopenharmony_ciMAX_PROGRAM_MATRICES_ARB             Z+      GetIntegerv      8 (not to   maximum number of       2.14.6        -
64915bd8deadSopenharmony_ci                                                              exceed 32)  program matrices
64925bd8deadSopenharmony_ciMAX_PROGRAM_MATRIX_STACK_DEPTH_ARB   Z+      GetIntegerv      1           maximum program         2.14.6        -
64935bd8deadSopenharmony_ci                                                                          matrix stack depth
64945bd8deadSopenharmony_ciMAX_PROGRAM_INSTRUCTIONS_ARB         Z+      GetProgramivARB  128         maximum program         6.1.12        -
64955bd8deadSopenharmony_ci                                                                          instructions
64965bd8deadSopenharmony_ciMAX_PROGRAM_TEMPORARIES_ARB          Z+      GetProgramivARB  12          maximum program         6.1.12        -
64975bd8deadSopenharmony_ci                                                                          temporaries
64985bd8deadSopenharmony_ciMAX_PROGRAM_PARAMETERS_ARB           Z+      GetProgramivARB  96          maximum program         6.1.12        -
64995bd8deadSopenharmony_ci                                                                          parameter bindings
65005bd8deadSopenharmony_ciMAX_PROGRAM_ATTRIBS_ARB              Z+      GetProgramivARB  16          maximum program         6.1.12        -
65015bd8deadSopenharmony_ci                                                                          attribute bindings
65025bd8deadSopenharmony_ciMAX_PROGRAM_ADDRESS_REGISTERS_ARB    Z+      GetProgramivARB  1           maximum program         6.1.12        -
65035bd8deadSopenharmony_ci                                                                          address registers
65045bd8deadSopenharmony_ciMAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB  Z+      GetProgramivARB  -           maximum program native  6.1.12        -
65055bd8deadSopenharmony_ci                                                                          instructions
65065bd8deadSopenharmony_ciMAX_PROGRAM_NATIVE_TEMPORARIES_ARB   Z+      GetProgramivARB  -           maximum program native  6.1.12        -
65075bd8deadSopenharmony_ci                                                                          temporaries
65085bd8deadSopenharmony_ciMAX_PROGRAM_NATIVE_PARAMETERS_ARB    Z+      GetProgramivARB  -           maximum program native  6.1.12        -
65095bd8deadSopenharmony_ci                                                                          parameter bindings
65105bd8deadSopenharmony_ciMAX_PROGRAM_NATIVE_ATTRIBS_ARB       Z+      GetProgramivARB  -           maximum program native  6.1.12        -
65115bd8deadSopenharmony_ci                                                                          attribute bindings
65125bd8deadSopenharmony_ciMAX_PROGRAM_NATIVE_ADDRESS_          Z+      GetProgramivARB  -           maximum program native  6.1.12        -
65135bd8deadSopenharmony_ci    REGISTERS_ARB                                                         address registers
65145bd8deadSopenharmony_ci
65155bd8deadSopenharmony_ciTable X.11.  New Implementation-Dependent Values Introduced by
65165bd8deadSopenharmony_ciARB_vertex_program.  Values queried by GetProgramivARB require a <pname> of
65175bd8deadSopenharmony_ciVERTEX_PROGRAM_ARB.
65185bd8deadSopenharmony_ci
65195bd8deadSopenharmony_ci
65205bd8deadSopenharmony_ciRevision History
65215bd8deadSopenharmony_ci
65225bd8deadSopenharmony_ci    Rev.    Date    Author    Changes
65235bd8deadSopenharmony_ci    ----  --------  --------  --------------------------------------------
65245bd8deadSopenharmony_ci    46    07/25/07  mjk       Document how the ARB and NV generic arrays
65255bd8deadSopenharmony_ci                              interact.  This documents NVIDIA's
65265bd8deadSopenharmony_ci                              long-standing implemented behavior.
65275bd8deadSopenharmony_ci
65285bd8deadSopenharmony_ci    45    09/27/04  pbrown    Fixed GLX protocol, removing the unused <pname>
65295bd8deadSopenharmony_ci                              parameters for GetProgram{Env,Local}Parameter
65305bd8deadSopenharmony_ci                              [df]vARB, leaving an unused CARD32 in its place.
65315bd8deadSopenharmony_ci                              This was an error when propogating
65325bd8deadSopenharmony_ci                              NV_vertex_program protocol, which did have a
65335bd8deadSopenharmony_ci                              <pname> parameter.
65345bd8deadSopenharmony_ci
65355bd8deadSopenharmony_ci    44    09/12/03  pbrown    Fixed opcode table entry for "ARL" -- it takes a
65365bd8deadSopenharmony_ci                              scalar operand as specified in the grammar.
65375bd8deadSopenharmony_ci
65385bd8deadSopenharmony_ci    43    08/17/03  pbrown    Fixed a couple minor typos (missing quotes)
65395bd8deadSopenharmony_ci                              in the grammar.
65405bd8deadSopenharmony_ci
65415bd8deadSopenharmony_ci    42    05/01/03  pbrown    Clarified the handling of color sum; old text
65425bd8deadSopenharmony_ci                              suggested that COLOR_SUM controlled the
65435bd8deadSopenharmony_ci                              operation even when doing separate specular
65445bd8deadSopenharmony_ci                              lighting.
65455bd8deadSopenharmony_ci
65465bd8deadSopenharmony_ci    41    04/18/03  pbrown    Add a couple overlooked contributors.
65475bd8deadSopenharmony_ci
65485bd8deadSopenharmony_ci    40    03/03/03  pbrown    Fixed list of immediate-mode VertexAttrib
65495bd8deadSopenharmony_ci                              functions in Section 2.7 -- there are no
65505bd8deadSopenharmony_ci                              normalized float functions (e.g., 
65515bd8deadSopenharmony_ci                              VertexAttrib4Nfv).  Clarified issue (42)
65525bd8deadSopenharmony_ci                              describing how point size is handled in vertex
65535bd8deadSopenharmony_ci                              program mode.
65545bd8deadSopenharmony_ci
65555bd8deadSopenharmony_ci    39    01/31/03  pbrown    Fixed minor bug in the description of vertex
65565bd8deadSopenharmony_ci                              array state kept by the GL -- normalization
65575bd8deadSopenharmony_ci                              flags were omitted from the text (but were in
65585bd8deadSopenharmony_ci                              the state tables).
65595bd8deadSopenharmony_ci
65605bd8deadSopenharmony_ci    38    01/08/03  pbrown    Fixed bug where "state.matrix.mvp" was specified
65615bd8deadSopenharmony_ci                              incorrectly -- it should be P*M0 rather than
65625bd8deadSopenharmony_ci                              M0*P.
65635bd8deadSopenharmony_ci
65645bd8deadSopenharmony_ci    37    12/23/02  pbrown    Fixed minor typos.  Fixed state table bug where 
65655bd8deadSopenharmony_ci                              CURRENT_VERTEX_ATTRIB_ARB was incorrectly called
65665bd8deadSopenharmony_ci                              CURRENT_ATTRIB_ARB.
65675bd8deadSopenharmony_ci
65685bd8deadSopenharmony_ci    36    09/09/02  pbrown    Fixed incorrect example of matrix row bindings
65695bd8deadSopenharmony_ci                              (and transposition).  Small wording/typo fixes.
65705bd8deadSopenharmony_ci
65715bd8deadSopenharmony_ci    35    08/27/02  pbrown    Fixed several minor typos.  Documented that a
65725bd8deadSopenharmony_ci                              program string should not include a null
65735bd8deadSopenharmony_ci                              terminator in its first <len> characters.  Fixed
65745bd8deadSopenharmony_ci                              dangling reference in <paramMultipleItem>
65755bd8deadSopenharmony_ci                              grammar rule.  Fix incorrect wording in
65765bd8deadSopenharmony_ci                              computation of state.light.half vector.
65775bd8deadSopenharmony_ci                              Documented that the inverse of a singular matrix
65785bd8deadSopenharmony_ci                              is undefined.  Clarified that native
65795bd8deadSopenharmony_ci                              instructions can include additions due to
65805bd8deadSopenharmony_ci                              emulation of features not supported natively.
65815bd8deadSopenharmony_ci                              Documented that LG2 produces undefined results
65825bd8deadSopenharmony_ci                              with zero or negative inputs.  Clarified that
65835bd8deadSopenharmony_ci                              POW may be a LOG/MUL/EXP sequence, but isn't
65845bd8deadSopenharmony_ci                              necessarily so.  Disallowed multiple modelview
65855bd8deadSopenharmony_ci                              matrix syntax if ARB_vertex_blend or
65865bd8deadSopenharmony_ci                              EXT_vertex_weighting is unsupported.  Fixed
65875bd8deadSopenharmony_ci                              state table query function for attribute array
65885bd8deadSopenharmony_ci                              enables.  Added missing state table entry for
65895bd8deadSopenharmony_ci                              PROGRAM_UNDER_NATIVE_LIMITS_ARB.
65905bd8deadSopenharmony_ci
65915bd8deadSopenharmony_ci    34    07/19/02  pbrown    Fixed typo in ArrayElement pseudo-code.
65925bd8deadSopenharmony_ci
65935bd8deadSopenharmony_ci    33    07/17/02  pbrown    Fixed bug in the <stateLModProperty> grammar
65945bd8deadSopenharmony_ci                              rule.  Fixed documentation to indicate that
65955bd8deadSopenharmony_ci                              Enable/DisableVertexAttribArray are not display
65965bd8deadSopenharmony_ci                              listable.
65975bd8deadSopenharmony_ci
65985bd8deadSopenharmony_ci    31    07/15/02  pbrown    Fixed <SWZ_instruction> grammar rule to match
65995bd8deadSopenharmony_ci                              the spec language -- base operand negation
66005bd8deadSopenharmony_ci                              doesn't apply, since you can independently
66015bd8deadSopenharmony_ci                              negate components.  Modified "XPD" instruction
66025bd8deadSopenharmony_ci                              to eliminate the implicit masking of the "w"
66035bd8deadSopenharmony_ci                              component; slight efficiency gain for some SW
66045bd8deadSopenharmony_ci                              implementations.  Modified "scenecolor" binding
66055bd8deadSopenharmony_ci                              to pass the diffuse alpha instead of the ambient
66065bd8deadSopenharmony_ci                              alpha; the former is more useful.
66075bd8deadSopenharmony_ci
66085bd8deadSopenharmony_ci    30    07/02/02  pbrown    Minor wording fixes.
66095bd8deadSopenharmony_ci
66105bd8deadSopenharmony_ci    29    06/21/02  pbrown    Mostly minor bug fixes from reviewer feedback;
66115bd8deadSopenharmony_ci                              also added one new item approved at ARB meeting.
66125bd8deadSopenharmony_ci
66135bd8deadSopenharmony_ci                              Additions:  Added a "lightmodel.*.scenecolor"
66145bd8deadSopenharmony_ci                              holding lit color containing the composite
66155bd8deadSopenharmony_ci                              lighting result ignoring individual lights --
66165bd8deadSopenharmony_ci                              i.e., from only emissive materials and the light
66175bd8deadSopenharmony_ci                              model.  Added GLX protocol.
66185bd8deadSopenharmony_ci
66195bd8deadSopenharmony_ci                              Minor changes:  Numerous minor typo and wording
66205bd8deadSopenharmony_ci                              fixes.  Added missing vertex array types to
66215bd8deadSopenharmony_ci                              vertex array size/type/normalized table.  Added
66225bd8deadSopenharmony_ci                              missing description of ambient light model color
66235bd8deadSopenharmony_ci                              binding.  Removed several references to language
66245bd8deadSopenharmony_ci                              features long since deleted.  Documented that
66255bd8deadSopenharmony_ci                              POW is not necessarily implemented as
66265bd8deadSopenharmony_ci                              LOG/MUL/EXP.  Fixed a couple minor errata in the
66275bd8deadSopenharmony_ci                              EXT_vertex_shader interaction section.  Added a
66285bd8deadSopenharmony_ci                              list of reserved keywords.
66295bd8deadSopenharmony_ci
66305bd8deadSopenharmony_ci    28    06/16/02  pbrown    Minor updates based on feedback given on
66315bd8deadSopenharmony_ci                              versions 26 and 27.
66325bd8deadSopenharmony_ci
66335bd8deadSopenharmony_ci                              Additions:  Added section on EXT_vertex_shader
66345bd8deadSopenharmony_ci                              interaction, provided by ATI.
66355bd8deadSopenharmony_ci
66365bd8deadSopenharmony_ci                              Minor changes:  Minor grammar and readability
66375bd8deadSopenharmony_ci                              fixes.  Fixed several incomplete definitions.
66385bd8deadSopenharmony_ci                              Removed "GL" and "gl" prefixes from several
66395bd8deadSopenharmony_ci                              enumerants and function names to match spec
66405bd8deadSopenharmony_ci                              conventions.  Clarified the precision issue on
66415bd8deadSopenharmony_ci                              EX2/LG2.  Added missing functions that take
66425bd8deadSopenharmony_ci                              VERTEX_PROGRAM_ARB.  Clarified component
66435bd8deadSopenharmony_ci                              normalization on vertex arrays.  Clarified
66445bd8deadSopenharmony_ci                              clipping section to note that user clipping is
66455bd8deadSopenharmony_ci                              done with position invariant programs.
66465bd8deadSopenharmony_ci                              Clarified the handling of program zero in
66475bd8deadSopenharmony_ci                              BindProgramARB.  Fixed a couple incorrect
66485bd8deadSopenharmony_ci                              grammar rules.  Fixed incorrect grammar
66495bd8deadSopenharmony_ci                              references in description of vertex program
66505bd8deadSopenharmony_ci                              parameter array accesses.  Documented that the
66515bd8deadSopenharmony_ci                              SWZ instruction doesn't take "normal" swizzle
66525bd8deadSopenharmony_ci                              and negation modifiers, since it already has
66535bd8deadSopenharmony_ci                              some.  Clarified some NV_vertex_program
66545bd8deadSopenharmony_ci                              interactions.
66555bd8deadSopenharmony_ci
66565bd8deadSopenharmony_ci    27    06/07/02  pbrown    Minor update based on ARB_vertex_program sample
66575bd8deadSopenharmony_ci                              implementation work.
66585bd8deadSopenharmony_ci
66595bd8deadSopenharmony_ci                              Changes:  Changed fog coordinate attribute and
66605bd8deadSopenharmony_ci                              result binding name to "fogcoord" (was "fog").
66615bd8deadSopenharmony_ci                              Rearranged grammar based on sample
66625bd8deadSopenharmony_ci                              implementation verification.  There might be a
66635bd8deadSopenharmony_ci                              minor fix or two stuck in there.
66645bd8deadSopenharmony_ci
66655bd8deadSopenharmony_ci    26    06/04/02  pbrown    Spec checkpoint published on the working group
66665bd8deadSopenharmony_ci                              web site.  Resolves most of the remaining open
66675bd8deadSopenharmony_ci                              issues. 
66685bd8deadSopenharmony_ci
66695bd8deadSopenharmony_ci                              Deletions:  Removed the ability to bind the
66705bd8deadSopenharmony_ci                              color matrix (from ARB_imaging).
66715bd8deadSopenharmony_ci
66725bd8deadSopenharmony_ci                              Changes:  Resolved the handling of vertex
66735bd8deadSopenharmony_ci                              attribute zero (it always specifies a vertex, in
66745bd8deadSopenharmony_ci                              program mode or not).  Resolved the handling of
66755bd8deadSopenharmony_ci                              generic and conventional vertex attribute arrays
66765bd8deadSopenharmony_ci                              (they are always sent, although they also have
66775bd8deadSopenharmony_ci                              "undefined aliasing" behavior).  Default values
66785bd8deadSopenharmony_ci                              of generic attributes are undefined, to
66795bd8deadSopenharmony_ci                              accommodate aliasing and non-aliasing
66805bd8deadSopenharmony_ci                              implementations.  Added pseudocode to document
66815bd8deadSopenharmony_ci                              the processing of ArrayElement.  Moved program
66825bd8deadSopenharmony_ci                              object language into the vertex program section.
66835bd8deadSopenharmony_ci                              Renamed the fog coordinate attribute and result
66845bd8deadSopenharmony_ci                              binding to "fogcoord".  Added missing
66855bd8deadSopenharmony_ci                              documentation of the agreed-upon semantic
66865bd8deadSopenharmony_ci                              restriction that programs can't bind
66875bd8deadSopenharmony_ci                              conventional / generic attribute pairs that may
66885bd8deadSopenharmony_ci                              alias.  Added documentation of what happens when
66895bd8deadSopenharmony_ci                              multiple contexts share program objects
66905bd8deadSopenharmony_ci                              Disallowed queries of generic attribute zero.
66915bd8deadSopenharmony_ci
66925bd8deadSopenharmony_ci                              Fixes:  Fixed prototype for VertexAttrib4Nub.  
66935bd8deadSopenharmony_ci
66945bd8deadSopenharmony_ci                              Minor Changes:  Minor typo and language
66955bd8deadSopenharmony_ci                              fixes. Added guidelines for future
66965bd8deadSopenharmony_ci                              programmability extensions.  Added several
66975bd8deadSopenharmony_ci                              missing grammar rules.
66985bd8deadSopenharmony_ci
66995bd8deadSopenharmony_ci    25    05/30/02  pbrown    Spec checkpoint published on the working group
67005bd8deadSopenharmony_ci                              web site.
67015bd8deadSopenharmony_ci
67025bd8deadSopenharmony_ci                              Additions:  Add "DPH" (dot product homogeneous)
67035bd8deadSopenharmony_ci                              instruction.  Added the ability to query the
67045bd8deadSopenharmony_ci                              current matrix in transposed form.  Assigned
67055bd8deadSopenharmony_ci                              enumerant values for program matrices.  Added
67065bd8deadSopenharmony_ci                              the ability bind selected rows of a matrix.
67075bd8deadSopenharmony_ci                              Added ability to bind matrix palette matrices.
67085bd8deadSopenharmony_ci
67095bd8deadSopenharmony_ci                              Changes:  Renamed PROGRAM_NAME_ARB to
67105bd8deadSopenharmony_ci                              PROGRAM_BINDING_ARB.  Specifying the number of
67115bd8deadSopenharmony_ci                              elements in parameter arrays is now optional,
67125bd8deadSopenharmony_ci                              but compilation will fail if the specified count
67135bd8deadSopenharmony_ci                              does not match.  Programs performing
67145bd8deadSopenharmony_ci                              out-of-bounds array accesses using absolute
67155bd8deadSopenharmony_ci                              addressing will now fail to load.  Allow "$" in
67165bd8deadSopenharmony_ci                              token names.
67175bd8deadSopenharmony_ci
67185bd8deadSopenharmony_ci                              Minor changes:  Completed scrub of the issues
67195bd8deadSopenharmony_ci                              and error list.  Added new issues about reserved
67205bd8deadSopenharmony_ci                              keywords, identifier characters, and parsing of
67215bd8deadSopenharmony_ci                              floating-point constants in programs.
67225bd8deadSopenharmony_ci                              Miscellaneous typo fixes.  Updated the grammar
67235bd8deadSopenharmony_ci                              to include light products and half angles, moved
67245bd8deadSopenharmony_ci                              material properties from per-vertex to parameter
67255bd8deadSopenharmony_ci                              bindings, and a few other miscellaneous fixes.
67265bd8deadSopenharmony_ci                              Simplified the matrix binding table.  Modified
67275bd8deadSopenharmony_ci                              the color sum portion of the spec to explicitly
67285bd8deadSopenharmony_ci                              add R,G,B only.  Removed several incorrect
67295bd8deadSopenharmony_ci                              errors.  Fixed program object state table.
67305bd8deadSopenharmony_ci
67315bd8deadSopenharmony_ci    24    05/21/02  pbrown    Spec checkpoint published on the working group
67325bd8deadSopenharmony_ci                              web site.
67335bd8deadSopenharmony_ci
67345bd8deadSopenharmony_ci                              Deletions:  Removed the semantic requirement
67355bd8deadSopenharmony_ci                              that vertex programs write a vertex position,
67365bd8deadSopenharmony_ci                              per working group resolution.
67375bd8deadSopenharmony_ci                              
67385bd8deadSopenharmony_ci                              Minor changes:  Cleaned up cruft in a number of
67395bd8deadSopenharmony_ci                              issues; many more to go.  Added several issues.
67405bd8deadSopenharmony_ci                              Documented that VertexAttrib functions are
67415bd8deadSopenharmony_ci                              allowed inside Begin/End pairs.  Changed default
67425bd8deadSopenharmony_ci                              initialization values of generic attributes to
67435bd8deadSopenharmony_ci                              accommodate attribute aliasing.  Documented that
67445bd8deadSopenharmony_ci                              point sizes and fog coordinates computed by
67455bd8deadSopenharmony_ci                              vertex programs are clipped during primitive
67465bd8deadSopenharmony_ci                              clipping.  Documented that vertex program
67475bd8deadSopenharmony_ci                              behavior is undefined in color index mode.
67485bd8deadSopenharmony_ci
67495bd8deadSopenharmony_ci    23    05/21/02  pbrown    Spec checkpoint.  More changes from working
67505bd8deadSopenharmony_ci                              group deliberations.
67515bd8deadSopenharmony_ci
67525bd8deadSopenharmony_ci                              Additions:  Added vertex materials as allowed
67535bd8deadSopenharmony_ci                              program parameter bindings.  Allow programs to
67545bd8deadSopenharmony_ci                              use vertex attribute binding names, program
67555bd8deadSopenharmony_ci                              parameter binding names, result variable binding
67565bd8deadSopenharmony_ci                              names, and constants in executable statements,
67575bd8deadSopenharmony_ci                              resulting in implicit bindings.  Added support
67585bd8deadSopenharmony_ci                              for binding a single row of a matrix.  Added
67595bd8deadSopenharmony_ci                              support for binding precomputed light/material
67605bd8deadSopenharmony_ci                              products.  Added restriction that a single GL
67615bd8deadSopenharmony_ci                              state vector can't be bound multiple times in
67625bd8deadSopenharmony_ci                              two separate arrays accessed with relative
67635bd8deadSopenharmony_ci                              addressing.  Added new section documenting the
67645bd8deadSopenharmony_ci                              various resource limits, and introducting the
67655bd8deadSopenharmony_ci                              idea of "native" resource limits and counts.
67665bd8deadSopenharmony_ci
67675bd8deadSopenharmony_ci                              Deletions:  Removed vertex materials as allowed
67685bd8deadSopenharmony_ci                              vertex attribute bindings.
67695bd8deadSopenharmony_ci
67705bd8deadSopenharmony_ci                              Minor changes:  Added more names to the
67715bd8deadSopenharmony_ci                              contributors list.  Updated issues concerning
67725bd8deadSopenharmony_ci                              undefined aliasing.  Moved NV_vertex_program
67735bd8deadSopenharmony_ci                              related issues to the NV_vertex_program
67745bd8deadSopenharmony_ci                              interaction sections.  Updated NV_vertex_program
67755bd8deadSopenharmony_ci                              interactions.  Updated lighting example using
67765bd8deadSopenharmony_ci                              new derived state bindings.  Clarified that
67775bd8deadSopenharmony_ci                              "!!ARBvp1.0" is not a token in the grammar and
67785bd8deadSopenharmony_ci                              that programs are parsed beginning immediately
67795bd8deadSopenharmony_ci                              after the header string.  Added text to explain
67805bd8deadSopenharmony_ci                              all attribute, program parameter, and result
67815bd8deadSopenharmony_ci                              bindings instead of depending on binding table
67825bd8deadSopenharmony_ci                              interpretations.  Broke the large program
67835bd8deadSopenharmony_ci                              parameter binding table into several smaller
67845bd8deadSopenharmony_ci                              tables, organized by function.  Documented that
67855bd8deadSopenharmony_ci                              the queryable program error string may contain
67865bd8deadSopenharmony_ci                              warnings when a program loads successfully, and
67875bd8deadSopenharmony_ci                              that a queried program error string is
67885bd8deadSopenharmony_ci                              guaranteed to remain constant only until the
67895bd8deadSopenharmony_ci                              next program load attempt.  Added PROGRAM_NAME
67905bd8deadSopenharmony_ci                              query to the appropriate state table.
67915bd8deadSopenharmony_ci
67925bd8deadSopenharmony_ci    22    05/20/02  pbrown    Spec checkpoint.  More changes from working
67935bd8deadSopenharmony_ci                              group deliberations. 
67945bd8deadSopenharmony_ci
67955bd8deadSopenharmony_ci                              Added functionality:  Assigned enumerant values.
67965bd8deadSopenharmony_ci                              Added "undefined (vertex attribute) aliasing"
67975bd8deadSopenharmony_ci                              language, where setting a generic attribute
67985bd8deadSopenharmony_ci                              leaves a conventional one undefined, and vice
67995bd8deadSopenharmony_ci                              versa.  Added support for matrix indices from
68005bd8deadSopenharmony_ci                              ARB_matrix_palette.  Added default program
68015bd8deadSopenharmony_ci                              object zero.  Added support for simple named
68025bd8deadSopenharmony_ci                              variable aliasing.  Added queries of API-level
68035bd8deadSopenharmony_ci                              and "native" resources used by a program and
68045bd8deadSopenharmony_ci                              their corresponding limits.  Added general query
68055bd8deadSopenharmony_ci                              to determine if a program fits in native limits.
68065bd8deadSopenharmony_ci
68075bd8deadSopenharmony_ci                              Removed functionality:  Removed extension string
68085bd8deadSopenharmony_ci                              entry for position-invariant programs (now
68095bd8deadSopenharmony_ci                              mandatory).
68105bd8deadSopenharmony_ci
68115bd8deadSopenharmony_ci                              Modified functionality:  GetProgram and
68125bd8deadSopenharmony_ci                              GetProgramString now take a target instead of a
68135bd8deadSopenharmony_ci                              program name.  Default values for 3 generic
68145bd8deadSopenharmony_ci                              attributes are changed for consistent aliasing.
68155bd8deadSopenharmony_ci                              Added 1/(end-start) binding for fog parameters.
68165bd8deadSopenharmony_ci                              Added precomputed infinite light/viewer half
68175bd8deadSopenharmony_ci                              angle binding.  ProgramString takes a "void *"
68185bd8deadSopenharmony_ci                              instead of a "ubyte *".
68195bd8deadSopenharmony_ci
68205bd8deadSopenharmony_ci                              Minor Changes:  Clarified key terms for the
68215bd8deadSopenharmony_ci                              extension.  Documented that user clipping is not
68225bd8deadSopenharmony_ci                              supported in the base extension.  Added warnings
68235bd8deadSopenharmony_ci                              on a couple pitfalls from uninitalized result
68245bd8deadSopenharmony_ci                              registers.  Document that EXT_vertex_weighting
68255bd8deadSopenharmony_ci                              and ARB_vertex_blend use the same weight.
68265bd8deadSopenharmony_ci                              Cleaned up bindings for 4-component colors for
68275bd8deadSopenharmony_ci                              cases where only three components are used.
68285bd8deadSopenharmony_ci                              Documented the implicit absolute value operation
68295bd8deadSopenharmony_ci                              on the LOG instruction.  Renamed query token for
68305bd8deadSopenharmony_ci                              querying generic vertex attribute array enables.
68315bd8deadSopenharmony_ci                              Renamed and relocated vertex program binding
68325bd8deadSopenharmony_ci                              query.  Added language to Section 2.6.  Changed
68335bd8deadSopenharmony_ci                              syntax to bind a range of the environment or
68345bd8deadSopenharmony_ci                              local paramater array to use double dots ("..").
68355bd8deadSopenharmony_ci                              Clarified what happens on a weight binding using
68365bd8deadSopenharmony_ci                              more weights than an implementation supports.
68375bd8deadSopenharmony_ci                              Clarified the component selection pseudocode for
68385bd8deadSopenharmony_ci                              scalar operand loads.  Clarified what happens to
68395bd8deadSopenharmony_ci                              vertex program results during primitive
68405bd8deadSopenharmony_ci                              assembly.  Fixed a number of errors in the state
68415bd8deadSopenharmony_ci                              tables.
68425bd8deadSopenharmony_ci
68435bd8deadSopenharmony_ci    21    04/29/02  pbrown    More changes from working group deliberations.
68445bd8deadSopenharmony_ci
68455bd8deadSopenharmony_ci                              Added functionality:  Added "FLR", "FRC", "POW",
68465bd8deadSopenharmony_ci                              and "XPD" (cross product) instructions.  Added
68475bd8deadSopenharmony_ci                              functions to enable/disable generic attribute
68485bd8deadSopenharmony_ci                              arrays.  Added query of a program error string.
68495bd8deadSopenharmony_ci                              Added "format" enum argument to ProgramStringARB
68505bd8deadSopenharmony_ci                              to provide for possible programs not using ASCII
68515bd8deadSopenharmony_ci                              text.  Added new enums to permit different
68525bd8deadSopenharmony_ci                              limits for overall numbers of program
68535bd8deadSopenharmony_ci                              environment and local parameters and the number
68545bd8deadSopenharmony_ci                              of parameters that can be bound by a program.
68555bd8deadSopenharmony_ci
68565bd8deadSopenharmony_ci                              Removed functionality:  Removed support for
68575bd8deadSopenharmony_ci                              evaluators for generic attributes.  Removed
68585bd8deadSopenharmony_ci                              support for program residency management.
68595bd8deadSopenharmony_ci                              Removed support for user clipping in standard
68605bd8deadSopenharmony_ci                              vertex programs.  Removed functionality to set
68615bd8deadSopenharmony_ci                              more than one program environment parameter at
68625bd8deadSopenharmony_ci                              once.
68635bd8deadSopenharmony_ci
68645bd8deadSopenharmony_ci                              Issues/Changes:  Resolved set of immediate mode
68655bd8deadSopenharmony_ci                              VertexAttrib functions.  Combined parameter
68665bd8deadSopenharmony_ci                              bindings for several groups of related GL state.
68675bd8deadSopenharmony_ci                              Resolved user clipping issue by disallowing
68685bd8deadSopenharmony_ci                              except for position invariant programs.
68695bd8deadSopenharmony_ci                              Resolved limits for array relative offsets.
68705bd8deadSopenharmony_ci                              GenProgramsARB and DeleteProgramsARB will use
68715bd8deadSopenharmony_ci                              texture object model.  Program environment
68725bd8deadSopenharmony_ci                              parameters will not be pushed/popped.
68735bd8deadSopenharmony_ci
68745bd8deadSopenharmony_ci                              Bug fixes:  Fixed vertex attribute index
68755bd8deadSopenharmony_ci                              prototypes (should be uint instead of int).
68765bd8deadSopenharmony_ci                              Fixed tokens used to query generic attribute
68775bd8deadSopenharmony_ci                              state (should have VERTEX prefixes).  Fixed
68785bd8deadSopenharmony_ci                              documentation of the alpha component of material
68795bd8deadSopenharmony_ci                              colors.  Fixed documentation of initial state
68805bd8deadSopenharmony_ci                              for vertex program objects.
68815bd8deadSopenharmony_ci
68825bd8deadSopenharmony_ci                              Temporarily removed dated GLX protocol language
68835bd8deadSopenharmony_ci                              (will restore in one pass after resolving
68845bd8deadSopenharmony_ci                              remaining issues).
68855bd8deadSopenharmony_ci
68865bd8deadSopenharmony_ci    20    04/17/02  pbrown    Clarify the meaning of individual components of
68875bd8deadSopenharmony_ci                              program parameters where the component mapping
68885bd8deadSopenharmony_ci                              is not obvious from the mapping table.
68895bd8deadSopenharmony_ci                              
68905bd8deadSopenharmony_ci    18    04/15/02  pbrown    Update spec to reflect issues resolved by the
68915bd8deadSopenharmony_ci                              working group on 4/11.
68925bd8deadSopenharmony_ci
68935bd8deadSopenharmony_ci                              Started using "program matrix" terminology --
68945bd8deadSopenharmony_ci                              was "tracking matrix".  
68955bd8deadSopenharmony_ci
68965bd8deadSopenharmony_ci                              Address register variables must now be declared.
68975bd8deadSopenharmony_ci                              The number of address registers can be queried.
68985bd8deadSopenharmony_ci                              Only 1-component address registers are currently
68995bd8deadSopenharmony_ci                              supported.  
69005bd8deadSopenharmony_ci
69015bd8deadSopenharmony_ci                              VertexAttribPointer takes a separate argument to
69025bd8deadSopenharmony_ci                              indicate normalized data, now called
69035bd8deadSopenharmony_ci                              "normalized" (was "normalize").  
69045bd8deadSopenharmony_ci
69055bd8deadSopenharmony_ci                              ProgramString and functions to set and query
69065bd8deadSopenharmony_ci                              local parameters all take a <target> and refer
69075bd8deadSopenharmony_ci                              to the currently bound program (previously took
69085bd8deadSopenharmony_ci                              a program number).  Have not touched other
69095bd8deadSopenharmony_ci                              somewhat related issues (e.g., is there a
69105bd8deadSopenharmony_ci                              program object zero?).
69115bd8deadSopenharmony_ci                              
69125bd8deadSopenharmony_ci                              Added COLOR_SUM enable (taken directly from
69135bd8deadSopenharmony_ci                              EXT_secondary_color) for completeness and a
69145bd8deadSopenharmony_ci                              few updates to EXT_secondary_color
69155bd8deadSopenharmony_ci                              interactions.
69165bd8deadSopenharmony_ci                              
69175bd8deadSopenharmony_ci                              Fixed cut-and-paste error in specification of
69185bd8deadSopenharmony_ci                              the clip-space user clip dot product.
69195bd8deadSopenharmony_ci                              
69205bd8deadSopenharmony_ci                              Documented special-case arithmetic for ADD, MAD,
69215bd8deadSopenharmony_ci                              and MUL.
69225bd8deadSopenharmony_ci
69235bd8deadSopenharmony_ci                              Eliminated some wordiness in DP3 and DP4
69245bd8deadSopenharmony_ci                              instruction pseudo-code.
69255bd8deadSopenharmony_ci
69265bd8deadSopenharmony_ci                              Minor changes not from working group:  More
69275bd8deadSopenharmony_ci                              verbose documentation on the user clipping
69285bd8deadSopenharmony_ci                              issue.  More detail on other opcode candidates.
69295bd8deadSopenharmony_ci                              Removed redundant color material issue.  Minor
69305bd8deadSopenharmony_ci                              fixes to error roundup (not complete) and to
69315bd8deadSopenharmony_ci                              state tables to reflect that most program
69325bd8deadSopenharmony_ci                              execution variables are initially undefined.
69335bd8deadSopenharmony_ci
69345bd8deadSopenharmony_ci    17    04/08/02  pbrown    Issues:  Enumerated other candidates for
69355bd8deadSopenharmony_ci                              consideration in the instruction set -- there
69365bd8deadSopenharmony_ci                              may be more that I missed.  Added a description
69375bd8deadSopenharmony_ci                              of some of the considerations on how color
69385bd8deadSopenharmony_ci                              material should be treated.  Added issues on the
69395bd8deadSopenharmony_ci                              name of the program matrices, the number of MVP
69405bd8deadSopenharmony_ci                              matrices, and where variable declarations 
69415bd8deadSopenharmony_ci                              can be done.  Added numbers to all spec issues.
69425bd8deadSopenharmony_ci                              Fixed lighting example (issue 74) so it
69435bd8deadSopenharmony_ci                              compiles, and so that the half vector is
69445bd8deadSopenharmony_ci                              properly normalized.
69455bd8deadSopenharmony_ci                              
69465bd8deadSopenharmony_ci                              Grammar:  Eliminated stale hardwired temporary,
69475bd8deadSopenharmony_ci                              parameter array, and result register names
69485bd8deadSopenharmony_ci                              (R<n>, c[<n>], and o[...]).  Should have been
69495bd8deadSopenharmony_ci                              deleted going from revision 5 to revision 12.
69505bd8deadSopenharmony_ci                              Added missing program matrix bindings to the
69515bd8deadSopenharmony_ci                              grammar.  Eliminated state material-as-parameter
69525bd8deadSopenharmony_ci                              bindings.  Fixed texgen paramete bindings, which
69535bd8deadSopenharmony_ci                              should have had both "eye" and "object" planes.
69545bd8deadSopenharmony_ci                              Added separate address register write masks and
69555bd8deadSopenharmony_ci                              selectors to reflect the current single-
69565bd8deadSopenharmony_ci                              component address register restriction.  Added
69575bd8deadSopenharmony_ci                              an array[A0.x] rule -- before, you erroneously
69585bd8deadSopenharmony_ci                              had to add or subtract a constant.  Modified SWZ
69595bd8deadSopenharmony_ci                              so that the register being swizzled can't take a
69605bd8deadSopenharmony_ci                              conventional swizzle suffix, too.
69615bd8deadSopenharmony_ci
69625bd8deadSopenharmony_ci                              Also reorganized grammar to closely mirror the
69635bd8deadSopenharmony_ci                              sample implementation, consolidating a number of
69645bd8deadSopenharmony_ci                              redundant rules.  Also fixed several bugs
69655bd8deadSopenharmony_ci                              found by the implementation.
69665bd8deadSopenharmony_ci
69675bd8deadSopenharmony_ci                              Documentation changes to "LIT" to use the right
69685bd8deadSopenharmony_ci                              variable name and also indicate that 0^0=1.
69695bd8deadSopenharmony_ci                              Fixed the computation of result.y in the "LOG"
69705bd8deadSopenharmony_ci                              instruction.
69715bd8deadSopenharmony_ci
69725bd8deadSopenharmony_ci                              Other:  Added dependency on ARB_imaging.  Added
69735bd8deadSopenharmony_ci                              notation of Microsoft's IP claims.  Fixed name
69745bd8deadSopenharmony_ci                              of MAX_VERTEX_PROGRAM_TEMPORARIES_ARB.
69755bd8deadSopenharmony_ci
69765bd8deadSopenharmony_ci                              A few minor typo fixes.
69775bd8deadSopenharmony_ci
69785bd8deadSopenharmony_ci    12    03/11/02  pbrown    Modified spec to reflect decisions made at
69795bd8deadSopenharmony_ci                              the March 2002 ARB meeting.  Distributed
69805bd8deadSopenharmony_ci                              to the OpenGL participants list.
69815bd8deadSopenharmony_ci
69825bd8deadSopenharmony_ci    5     03/03/02  pbrown    Distributed to the ARB prior to March 2002
69835bd8deadSopenharmony_ci                              ARB meeting.
6984