15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    ARB_shading_language_100
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_ARB_shading_language_100
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    John Kessenich, 3Dlabs, Inc. (johnk 'at' 3dlabs.com)
125bd8deadSopenharmony_ci    Barthold Lichtenbelt, NVIDIA (blichtenbelt 'at' nvidia.com)
135bd8deadSopenharmony_ci    Jon Leech, SGI (ljp 'at' sgi.com)
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ciNotice
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ci    Copyright (c) 2003-2013 The Khronos Group Inc. Copyright terms at
185bd8deadSopenharmony_ci        http://www.khronos.org/registry/speccopyright.html
195bd8deadSopenharmony_ci
205bd8deadSopenharmony_ciSpecification Update Policy
215bd8deadSopenharmony_ci
225bd8deadSopenharmony_ci    Khronos-approved extension specifications are updated in response to
235bd8deadSopenharmony_ci    issues and bugs prioritized by the Khronos OpenGL Working Group. For
245bd8deadSopenharmony_ci    extensions which have been promoted to a core Specification, fixes will
255bd8deadSopenharmony_ci    first appear in the latest version of that core Specification, and will
265bd8deadSopenharmony_ci    eventually be backported to the extension document. This policy is
275bd8deadSopenharmony_ci    described in more detail at
285bd8deadSopenharmony_ci        https://www.khronos.org/registry/OpenGL/docs/update_policy.php
295bd8deadSopenharmony_ci
305bd8deadSopenharmony_ciIP Status
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ci    Microsoft claims to own unspecified intellectual property related to
335bd8deadSopenharmony_ci    programmable shading.
345bd8deadSopenharmony_ci
355bd8deadSopenharmony_ciStatus
365bd8deadSopenharmony_ci
375bd8deadSopenharmony_ci    Complete. Approved by the ARB on June 11, 2003.
385bd8deadSopenharmony_ci    Updated revision 8 approved by the ARB on June 17, 2004.
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ciVersion
415bd8deadSopenharmony_ci
425bd8deadSopenharmony_ci    Last Modified Date: April 6, 2004
435bd8deadSopenharmony_ci    Revision: 8
445bd8deadSopenharmony_ci
455bd8deadSopenharmony_ciNumber
465bd8deadSopenharmony_ci
475bd8deadSopenharmony_ci    ARB Extension #33
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ciDependencies
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ci    This extension is written against the OpenGL 1.5 Specification
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ci    ARB_shader_objects, ARB_fragment_shader, and ARB_vertex_shader are
545bd8deadSopenharmony_ci    required to utilize the OpenGL Shading Language associated with this
555bd8deadSopenharmony_ci    extension.
565bd8deadSopenharmony_ci
575bd8deadSopenharmony_ciOverview
585bd8deadSopenharmony_ci
595bd8deadSopenharmony_ci    This extension string indicates that the OpenGL Shading Language is
605bd8deadSopenharmony_ci    supported. The Shading Language is defined by a separate specification
615bd8deadSopenharmony_ci    document which can be downloaded from
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci        http://www.opengl.org/documentation/oglsl.html
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ciIssues
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ci    1) How do we indicate revisions in the supported version of the Shading
685bd8deadSopenharmony_ci       Language?
695bd8deadSopenharmony_ci
705bd8deadSopenharmony_ci        RESOLVED: Add a SHADING_LANGUAGE_VERSION query. This query was not
715bd8deadSopenharmony_ci        present in the initial version of the extension. Therefore,
725bd8deadSopenharmony_ci        applications should be prepared to detect an INVALID_ENUM error
735bd8deadSopenharmony_ci        being raised by glGetString(GL_SHADING_LANGUAGE_VERSION). If this
745bd8deadSopenharmony_ci        error is raised, but ARB_shading_language_100 is defined in the
755bd8deadSopenharmony_ci        EXTENSIONS string, the application can assume that the initial
765bd8deadSopenharmony_ci        release of the Shading Language (1.00, which was numbered "1.051"
775bd8deadSopenharmony_ci        corresponding to document revision 51) is supported.
785bd8deadSopenharmony_ci
795bd8deadSopenharmony_ci    2) What is the format of the SHADING_LANGUAGE_VERSION string? How does
805bd8deadSopenharmony_ci       it map onto the release number of the shading language specification?
815bd8deadSopenharmony_ci
825bd8deadSopenharmony_ci        RESOLVED: Identical to the VERSION string format:
835bd8deadSopenharmony_ci        "major.minor[.release] [vendor info]". The release number is an
845bd8deadSopenharmony_ci        optional vendor release number, not the shading language
855bd8deadSopenharmony_ci        specification document release number (which is never visible to
865bd8deadSopenharmony_ci        apps).
875bd8deadSopenharmony_ci
885bd8deadSopenharmony_ci        The "1.051" release number of the initial Shading Language
895bd8deadSopenharmony_ci        specification document corresponds to a SHADING_LANGUAGE_VERSION
905bd8deadSopenharmony_ci        string of "1.00", since "51" was the revision number of the
915bd8deadSopenharmony_ci        document, not the minor number.
925bd8deadSopenharmony_ci
935bd8deadSopenharmony_ci        Going forward, the specification and query must always use the same
945bd8deadSopenharmony_ci        encoding for major and minor numbers. The second release of the
955bd8deadSopenharmony_ci        specification will be labelled "version 1.10, document revision 55",
965bd8deadSopenharmony_ci        and the corresponding SHADING_LANGUAGE_VERSION string will be "1.10"
975bd8deadSopenharmony_ci        (we chose to bump the minor version directly to 10 to avoid problems
985bd8deadSopenharmony_ci        with leading 0s, and confusion with the old "1.051" document release
995bd8deadSopenharmony_ci        number).
1005bd8deadSopenharmony_ci
1015bd8deadSopenharmony_ci        Document release and vendor release numbers need not have any
1025bd8deadSopenharmony_ci        relation to each other, since they represent changes other than
1035bd8deadSopenharmony_ci        functionality, such as bug fixes and optimizations (for the
1045bd8deadSopenharmony_ci        implementation), and typos and errata for the specification).
1055bd8deadSopenharmony_ci
1065bd8deadSopenharmony_ci        Functional changes to the shading language must always be indicated
1075bd8deadSopenharmony_ci        by an increase in the specification minor version number. Such
1085bd8deadSopenharmony_ci        changes may or may not correspond to changes to the core OpenGL
1095bd8deadSopenharmony_ci        version number as well, depending on whether or not they are visible
1105bd8deadSopenharmony_ci        in the OpenGL API.
1115bd8deadSopenharmony_ci
1125bd8deadSopenharmony_ci    3) Should SHADING_LANGUAGE_VERSION be added to the state tables?
1135bd8deadSopenharmony_ci
1145bd8deadSopenharmony_ci        RESOLVED: Yes. The other GetString queries (VERSION, EXTENSIONS,
1155bd8deadSopenharmony_ci        RENDERER, and VENDOR), which have been omitted in the past, should
1165bd8deadSopenharmony_ci        also be added, along with a new type code for string state values.
1175bd8deadSopenharmony_ci
1185bd8deadSopenharmony_ci    4) What should the exact wording of the "IP Status" language be?
1195bd8deadSopenharmony_ci
1205bd8deadSopenharmony_ci        Microsoft has made claims towards the low-level vertex shader and
1215bd8deadSopenharmony_ci        towards the generic programming framework proposed but not accepted
1225bd8deadSopenharmony_ci        into OpenGL 1.4, although that framework did not specify an actual
1235bd8deadSopenharmony_ci        shading language. Additional verbal statements made by Dave Aronson
1245bd8deadSopenharmony_ci        suggest that Microsoft may feel its claims extend to all
1255bd8deadSopenharmony_ci        programmable shading implementations. In fairness to implementers,
1265bd8deadSopenharmony_ci        we need to note the possibility of such a claim while also noting
1275bd8deadSopenharmony_ci        our lack of any specific information about what IP is being claimed.
1285bd8deadSopenharmony_ci
1295bd8deadSopenharmony_ciNew Tokens
1305bd8deadSopenharmony_ci
1315bd8deadSopenharmony_ci    Accepted by the <name> parameter of GetString:
1325bd8deadSopenharmony_ci
1335bd8deadSopenharmony_ci        SHADING_LANGUAGE_VERSION_ARB            0x8B8C
1345bd8deadSopenharmony_ci
1355bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 1.5 Specification (State and State
1365bd8deadSopenharmony_ciRequests)
1375bd8deadSopenharmony_ci
1385bd8deadSopenharmony_ci    Modify Section 6.1.11, Pointer and String Queries
1395bd8deadSopenharmony_ci
1405bd8deadSopenharmony_ci    ... returns a pointer to a static string describing some aspect of the
1415bd8deadSopenharmony_ci    current GL connection(1).
1425bd8deadSopenharmony_ci       {footnote 1: Applications making copies of these static strings
1435bd8deadSopenharmony_ci        should never use a fixed-length buffer, because the strings may grow
1445bd8deadSopenharmony_ci        unpredictably over time resulting in buffer overflow when copying.
1455bd8deadSopenharmony_ci        This is particularly true of the EXTENSIONS string, which has become
1465bd8deadSopenharmony_ci        extremely long in some GL implementations.}
1475bd8deadSopenharmony_ci    The possible values for <name> are VENDOR, RENDERER, VERSION,
1485bd8deadSopenharmony_ci    SHADING_LANGUAGE_VERSION, and EXTENSIONS. The format of the RENDERER and
1495bd8deadSopenharmony_ci    VENDOR strings is implementation dependent. The EXTENSIONS string
1505bd8deadSopenharmony_ci    contains a space separated list of extension names (the extension names
1515bd8deadSopenharmony_ci    themselves do not contain any spaces). The VERSION and
1525bd8deadSopenharmony_ci    SHADING_LANGUAGE_VERSION strings are laid out as follows:
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ci        <version number><space><vendor-specific information>
1555bd8deadSopenharmony_ci
1565bd8deadSopenharmony_ci    The version number is either of the form <major_number.minor_number> or
1575bd8deadSopenharmony_ci    <major_number.minor_number.release_number>, where the numbers all have
1585bd8deadSopenharmony_ci    one or more digits. The <release_number> and vendor specific information
1595bd8deadSopenharmony_ci    are optional. However, if present, then they pertain to the server and
1605bd8deadSopenharmony_ci    their format and contents are implementation dependent.
1615bd8deadSopenharmony_ci
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ci    Add to Table 6.3, State variable types
1645bd8deadSopenharmony_ci
1655bd8deadSopenharmony_ci        Type code   Explanation
1665bd8deadSopenharmony_ci        ---------   ----------------------
1675bd8deadSopenharmony_ci            S       NULL-terminated string
1685bd8deadSopenharmony_ci
1695bd8deadSopenharmony_ciErrors
1705bd8deadSopenharmony_ci
1715bd8deadSopenharmony_ci    The error INVALID_ENUM may be generated by GetString if <name> is
1725bd8deadSopenharmony_ci    SHADING_LANGUAGE_VERSION, but only the initial version of this extension
1735bd8deadSopenharmony_ci    is supported. In this case, the implementation will support the initial
1745bd8deadSopenharmony_ci    release (version 1.00, document version labelled "1.051") of the OpenGL
1755bd8deadSopenharmony_ci    Shading Language.
1765bd8deadSopenharmony_ci
1775bd8deadSopenharmony_ciNew Implementation Dependent State
1785bd8deadSopenharmony_ci
1795bd8deadSopenharmony_ci    Added to table 6.30 (Implementation Dependent Values)
1805bd8deadSopenharmony_ci
1815bd8deadSopenharmony_ci    Get Value                Type  Get Command  Minimum Description          Sec.    Attrib
1825bd8deadSopenharmony_ci                                                Value
1835bd8deadSopenharmony_ci    ---------                ----  -----------  ------- -----------          ----    ------
1845bd8deadSopenharmony_ci    EXTENSIONS               S     GetString       -    Supported extensions 6.1.11  -
1855bd8deadSopenharmony_ci    RENDERER                 S     GetString       -    Renderer string      6.1.11  -
1865bd8deadSopenharmony_ci    SHADING_LANGUAGE_VERSION S     GetString       -    Shading Language     6.1.11  -
1875bd8deadSopenharmony_ci        _ARB                                            version supported
1885bd8deadSopenharmony_ci    VENDOR                   S     GetString       -    Vendor string        6.1.11  -
1895bd8deadSopenharmony_ci    VERSION                  S     GetString       -    OpenGL version       6.1.11  -
1905bd8deadSopenharmony_ci                                                        supported
1915bd8deadSopenharmony_ci
1925bd8deadSopenharmony_ciRevision History
1935bd8deadSopenharmony_ci
1945bd8deadSopenharmony_ci   Date: 2004/04/06
1955bd8deadSopenharmony_ci   Revision: 8
1965bd8deadSopenharmony_ci      - Corrected several typos and noted an additional reason for going to
1975bd8deadSopenharmony_ci        minor release number 10 instead of 1 (ambiguity relative to the
1985bd8deadSopenharmony_ci        initial "1.051" document release number).
1995bd8deadSopenharmony_ci
2005bd8deadSopenharmony_ci   Date: 2004/04/06
2015bd8deadSopenharmony_ci   Revision: 7
2025bd8deadSopenharmony_ci      - Clarified that the release_number field is also vendor information,
2035bd8deadSopenharmony_ci        and that the major.minor notation of the query and the shading
2045bd8deadSopenharmony_ci        language specification must match in the future. Noted that not
2055bd8deadSopenharmony_ci        supporting the query implies that version 1.00 of the shading
2065bd8deadSopenharmony_ci        language is supported.
2075bd8deadSopenharmony_ci
2085bd8deadSopenharmony_ci   Date: 2004/04/05
2095bd8deadSopenharmony_ci   Revision: 6
2105bd8deadSopenharmony_ci      - Fixed some typos. Changed errors section to require that the initial
2115bd8deadSopenharmony_ci        version of the shading language be supported if the
2125bd8deadSopenharmony_ci        SHADING_LANGUAGE_VERSION query fails, but the extension is
2135bd8deadSopenharmony_ci        supported.
2145bd8deadSopenharmony_ci
2155bd8deadSopenharmony_ci   Date: 2004/04/02
2165bd8deadSopenharmony_ci   Revision: 5
2175bd8deadSopenharmony_ci      - Assigned enum value to SHADING_LANGUAGE_VERSION. Corrected
2185bd8deadSopenharmony_ci        SHADER_VERSION to SHADING_LANGUAGE_VERSION in one place previously
2195bd8deadSopenharmony_ci        missed.
2205bd8deadSopenharmony_ci
2215bd8deadSopenharmony_ci   Date: 2004/03/26
2225bd8deadSopenharmony_ci   Revision: 4
2235bd8deadSopenharmony_ci      - Changed query from SHADER_VERSION to SHADING_LANGUAGE_VERSION to
2245bd8deadSopenharmony_ci        match extension name. Added an issue to determine exact wording of
2255bd8deadSopenharmony_ci        the IP Status comment.
2265bd8deadSopenharmony_ci
2275bd8deadSopenharmony_ci   Date: 2004/03/19
2285bd8deadSopenharmony_ci   Revision: 3
2295bd8deadSopenharmony_ci      - Resolved issues 2 and 3. Required that future shading language
2305bd8deadSopenharmony_ci        specification version numbers match the SHADER_VERSION format.
2315bd8deadSopenharmony_ci        Corrected omission of other GetString queries from the state tables.
2325bd8deadSopenharmony_ci
2335bd8deadSopenharmony_ci   Date: 2004/03/14
2345bd8deadSopenharmony_ci   Revision: 2
2355bd8deadSopenharmony_ci      - Corrected URL to refer to opengl.org instead of 3dlabs.com.
2365bd8deadSopenharmony_ci      - Added SHADER_VERSION string query. Defined format of the shader
2375bd8deadSopenharmony_ci        version string and described fallback behavior for older
2385bd8deadSopenharmony_ci        implementations of the extension.
239