1Name 2 3 ARB_shading_language_100 4 5Name Strings 6 7 GL_ARB_shading_language_100 8 9Contact 10 11 John Kessenich, 3Dlabs, Inc. (johnk 'at' 3dlabs.com) 12 Barthold Lichtenbelt, NVIDIA (blichtenbelt 'at' nvidia.com) 13 Jon Leech, SGI (ljp 'at' sgi.com) 14 15Notice 16 17 Copyright (c) 2003-2013 The Khronos Group Inc. Copyright terms at 18 http://www.khronos.org/registry/speccopyright.html 19 20Specification Update Policy 21 22 Khronos-approved extension specifications are updated in response to 23 issues and bugs prioritized by the Khronos OpenGL Working Group. For 24 extensions which have been promoted to a core Specification, fixes will 25 first appear in the latest version of that core Specification, and will 26 eventually be backported to the extension document. This policy is 27 described in more detail at 28 https://www.khronos.org/registry/OpenGL/docs/update_policy.php 29 30IP Status 31 32 Microsoft claims to own unspecified intellectual property related to 33 programmable shading. 34 35Status 36 37 Complete. Approved by the ARB on June 11, 2003. 38 Updated revision 8 approved by the ARB on June 17, 2004. 39 40Version 41 42 Last Modified Date: April 6, 2004 43 Revision: 8 44 45Number 46 47 ARB Extension #33 48 49Dependencies 50 51 This extension is written against the OpenGL 1.5 Specification 52 53 ARB_shader_objects, ARB_fragment_shader, and ARB_vertex_shader are 54 required to utilize the OpenGL Shading Language associated with this 55 extension. 56 57Overview 58 59 This extension string indicates that the OpenGL Shading Language is 60 supported. The Shading Language is defined by a separate specification 61 document which can be downloaded from 62 63 http://www.opengl.org/documentation/oglsl.html 64 65Issues 66 67 1) How do we indicate revisions in the supported version of the Shading 68 Language? 69 70 RESOLVED: Add a SHADING_LANGUAGE_VERSION query. This query was not 71 present in the initial version of the extension. Therefore, 72 applications should be prepared to detect an INVALID_ENUM error 73 being raised by glGetString(GL_SHADING_LANGUAGE_VERSION). If this 74 error is raised, but ARB_shading_language_100 is defined in the 75 EXTENSIONS string, the application can assume that the initial 76 release of the Shading Language (1.00, which was numbered "1.051" 77 corresponding to document revision 51) is supported. 78 79 2) What is the format of the SHADING_LANGUAGE_VERSION string? How does 80 it map onto the release number of the shading language specification? 81 82 RESOLVED: Identical to the VERSION string format: 83 "major.minor[.release] [vendor info]". The release number is an 84 optional vendor release number, not the shading language 85 specification document release number (which is never visible to 86 apps). 87 88 The "1.051" release number of the initial Shading Language 89 specification document corresponds to a SHADING_LANGUAGE_VERSION 90 string of "1.00", since "51" was the revision number of the 91 document, not the minor number. 92 93 Going forward, the specification and query must always use the same 94 encoding for major and minor numbers. The second release of the 95 specification will be labelled "version 1.10, document revision 55", 96 and the corresponding SHADING_LANGUAGE_VERSION string will be "1.10" 97 (we chose to bump the minor version directly to 10 to avoid problems 98 with leading 0s, and confusion with the old "1.051" document release 99 number). 100 101 Document release and vendor release numbers need not have any 102 relation to each other, since they represent changes other than 103 functionality, such as bug fixes and optimizations (for the 104 implementation), and typos and errata for the specification). 105 106 Functional changes to the shading language must always be indicated 107 by an increase in the specification minor version number. Such 108 changes may or may not correspond to changes to the core OpenGL 109 version number as well, depending on whether or not they are visible 110 in the OpenGL API. 111 112 3) Should SHADING_LANGUAGE_VERSION be added to the state tables? 113 114 RESOLVED: Yes. The other GetString queries (VERSION, EXTENSIONS, 115 RENDERER, and VENDOR), which have been omitted in the past, should 116 also be added, along with a new type code for string state values. 117 118 4) What should the exact wording of the "IP Status" language be? 119 120 Microsoft has made claims towards the low-level vertex shader and 121 towards the generic programming framework proposed but not accepted 122 into OpenGL 1.4, although that framework did not specify an actual 123 shading language. Additional verbal statements made by Dave Aronson 124 suggest that Microsoft may feel its claims extend to all 125 programmable shading implementations. In fairness to implementers, 126 we need to note the possibility of such a claim while also noting 127 our lack of any specific information about what IP is being claimed. 128 129New Tokens 130 131 Accepted by the <name> parameter of GetString: 132 133 SHADING_LANGUAGE_VERSION_ARB 0x8B8C 134 135Additions to Chapter 6 of the OpenGL 1.5 Specification (State and State 136Requests) 137 138 Modify Section 6.1.11, Pointer and String Queries 139 140 ... returns a pointer to a static string describing some aspect of the 141 current GL connection(1). 142 {footnote 1: Applications making copies of these static strings 143 should never use a fixed-length buffer, because the strings may grow 144 unpredictably over time resulting in buffer overflow when copying. 145 This is particularly true of the EXTENSIONS string, which has become 146 extremely long in some GL implementations.} 147 The possible values for <name> are VENDOR, RENDERER, VERSION, 148 SHADING_LANGUAGE_VERSION, and EXTENSIONS. The format of the RENDERER and 149 VENDOR strings is implementation dependent. The EXTENSIONS string 150 contains a space separated list of extension names (the extension names 151 themselves do not contain any spaces). The VERSION and 152 SHADING_LANGUAGE_VERSION strings are laid out as follows: 153 154 <version number><space><vendor-specific information> 155 156 The version number is either of the form <major_number.minor_number> or 157 <major_number.minor_number.release_number>, where the numbers all have 158 one or more digits. The <release_number> and vendor specific information 159 are optional. However, if present, then they pertain to the server and 160 their format and contents are implementation dependent. 161 162 163 Add to Table 6.3, State variable types 164 165 Type code Explanation 166 --------- ---------------------- 167 S NULL-terminated string 168 169Errors 170 171 The error INVALID_ENUM may be generated by GetString if <name> is 172 SHADING_LANGUAGE_VERSION, but only the initial version of this extension 173 is supported. In this case, the implementation will support the initial 174 release (version 1.00, document version labelled "1.051") of the OpenGL 175 Shading Language. 176 177New Implementation Dependent State 178 179 Added to table 6.30 (Implementation Dependent Values) 180 181 Get Value Type Get Command Minimum Description Sec. Attrib 182 Value 183 --------- ---- ----------- ------- ----------- ---- ------ 184 EXTENSIONS S GetString - Supported extensions 6.1.11 - 185 RENDERER S GetString - Renderer string 6.1.11 - 186 SHADING_LANGUAGE_VERSION S GetString - Shading Language 6.1.11 - 187 _ARB version supported 188 VENDOR S GetString - Vendor string 6.1.11 - 189 VERSION S GetString - OpenGL version 6.1.11 - 190 supported 191 192Revision History 193 194 Date: 2004/04/06 195 Revision: 8 196 - Corrected several typos and noted an additional reason for going to 197 minor release number 10 instead of 1 (ambiguity relative to the 198 initial "1.051" document release number). 199 200 Date: 2004/04/06 201 Revision: 7 202 - Clarified that the release_number field is also vendor information, 203 and that the major.minor notation of the query and the shading 204 language specification must match in the future. Noted that not 205 supporting the query implies that version 1.00 of the shading 206 language is supported. 207 208 Date: 2004/04/05 209 Revision: 6 210 - Fixed some typos. Changed errors section to require that the initial 211 version of the shading language be supported if the 212 SHADING_LANGUAGE_VERSION query fails, but the extension is 213 supported. 214 215 Date: 2004/04/02 216 Revision: 5 217 - Assigned enum value to SHADING_LANGUAGE_VERSION. Corrected 218 SHADER_VERSION to SHADING_LANGUAGE_VERSION in one place previously 219 missed. 220 221 Date: 2004/03/26 222 Revision: 4 223 - Changed query from SHADER_VERSION to SHADING_LANGUAGE_VERSION to 224 match extension name. Added an issue to determine exact wording of 225 the IP Status comment. 226 227 Date: 2004/03/19 228 Revision: 3 229 - Resolved issues 2 and 3. Required that future shading language 230 specification version numbers match the SHADER_VERSION format. 231 Corrected omission of other GetString queries from the state tables. 232 233 Date: 2004/03/14 234 Revision: 2 235 - Corrected URL to refer to opengl.org instead of 3dlabs.com. 236 - Added SHADER_VERSION string query. Defined format of the shader 237 version string and described fallback behavior for older 238 implementations of the extension. 239