1Name 2 3 ARB_half_float_vertex 4 5Name Strings 6 7 GL_ARB_half_float_vertex 8 9Contact 10 11 Daniel Koch, TransGaming, Inc (daniel 'at' transgaming.com) 12 13Notice 14 15 Copyright (c) 2008-2013 The Khronos Group Inc. Copyright terms at 16 http://www.khronos.org/registry/speccopyright.html 17 18Specification Update Policy 19 20 Khronos-approved extension specifications are updated in response to 21 issues and bugs prioritized by the Khronos OpenGL Working Group. For 22 extensions which have been promoted to a core Specification, fixes will 23 first appear in the latest version of that core Specification, and will 24 eventually be backported to the extension document. This policy is 25 described in more detail at 26 https://www.khronos.org/registry/OpenGL/docs/update_policy.php 27 28Status 29 30 Approved by the ARB on July 11, 2008 31 32Version 33 34 Last Modified Date: August 7, 2008 35 Version 5 36 37Number 38 39 ARB Extension #48 40 41Dependencies 42 43 This extension is written against the OpenGL 2.1 Specification 44 45 Based on the NV_half_float and OES_vertex_half_float extensions. 46 47Overview 48 49 This extension extends the usage of the half-precision (16-bit) floating- 50 point quantities introduced in ARB_half_float_pixel for usage in specifying 51 vertex array data. 52 53 This extension allows applications to use half-precision floating point data 54 when specifying vertices. This can allow applications to reduce their 55 memory footprint, as well as the memory bandwidth required for vertex data. 56 57 This extension extends the existing vertex array commands to accept the new 58 data type. 59 60 61Issues 62 63 1. How is this extension different from NV_half_float or 64 ARB_half_float_pixel? 65 66 This extension adds the commands for specifying half-precision 67 vertex data that were initially introduced in the NV_half_float 68 extension but were specifically excluded from the 69 ARB_half_float_pixel extension. The functionality added in this 70 extension is a proper subset of the vertex functionality defined in 71 the NV_half_float extension. 72 73 2. Should we provide immediate-mode entry points for half-precision 74 vertex data? 75 76 No. We expect the immediate-mode API to be deprecated in the near 77 future and thus do not wish to encumber implementors with adding a 78 significant number of additional entry points that would have 79 limited usefulness. Additionaly, the half-precision floating point 80 vertex data is only interesting when it is specified in array format 81 (i.e., for saving storage space). If an application is using 82 immediate mode APIs to load the vertex data, it does not seem overly 83 onerous to require them to convert to one of the more standard data 84 types. 85 86 3. What is the half-precision floating point format? 87 88 This is the same 16-bit floating point format that is defined in 89 Section 2.1.2 of the ARB_texture_float and ARB_half_float_pixel 90 extensions. 91 92 4. How does this extension differ from OES_vertex_half_float? 93 94 It is intended to have the same functionality, however there are a 95 few minor changes spec-wise: 96 97 a) this extension defines the additional GLX protocol, as was done 98 in the NV_half_float extension. 99 b) this extension uses the value of the HALF_FLOAT_ARB (0x140B) 100 token that is already defined in the desktop version of the 101 ARB_half_float_pixel extension (which is the same as the value 102 of the HALF_FLOAT_NV token from the NV_half_float extension). 103 The OES_vertex_half_float and OES_texture_half_float extensions 104 use the HALF_FLOAT_OES (0x8D61) token. 105 106 The logical progression is to define this as an ARB extension which 107 is intended to supersede both the OES extension and the 108 functionality from NV_half_float. 109 110 5. Why don't the new tokens and entry points in this extension have 111 "ARB" suffixes like other ARB extensions? 112 113 RESOLVED: Unlike a normal ARB extension, this is a strict subset of 114 functionality already approved in OpenGL 3.0. This extension exists 115 only to support that functionality on older hardware that cannot 116 implement a full OpenGL 3.0 driver. Since there are no possible 117 behavior changes between the ARB extension and core features, source 118 code compatibility is improved by not using suffixes on the 119 extension. 120 121New Procedures and Functions 122 123 None 124 125New Tokens 126 127 Accepted by the <type> argument of VertexPointer, NormalPointer, 128 ColorPointer, SecondaryColorPointer, FogCoordPointer, TexCoordPointer, 129 and VertexAttribPointer: 130 131 HALF_FLOAT 0x140B 132 133Additions to Chapter 2 of the OpenGL 2.1 Specification (OpenGL Operation) 134 135 Modify Section 2.8, Vertex Arrays, p. 23 136 137 (Modify 1st paragraph on p. 24) ... For <type>, the values BYTE, SHORT, 138 INT, FLOAT, HALF_FLOAT, and DOUBLE indicate types byte, short, int, 139 float, half, and double, respectively. ... 140 141 (Modify Table 2.4, p. 25) 142 143 Command Sizes Types 144 ------------------ ------- --------------------------------- 145 VertexPointer 2,3,4 short, int, float, half, double 146 NormalPointer 3 byte, short, int, float, half, 147 double 148 ColorPointer 3,4 byte, ubyte, short, ushort, int, 149 uint, float, half, double 150 SecondaryColorPointer 3 byte, ubyte, short, ushort, int, 151 uint, float, half, double 152 IndexPointer 1 ubyte, short, int, float, double 153 FogCoordPointer 1 float, half, double 154 TexCoordPointer 1,2,3,4 short, int, float, half, double 155 EdgeFlagPointer 1 boolean 156 VertexAttribPointer 1 byte, ubyte, short, ushort, int, 157 uint, float, half, double 158 159 Table 2.4: Vertex array sizes (values per vertex) and data types. 160 161 Modify Section 2.13, Colors and Coloring, p.44 162 163 (Modify Table 2.6, p. 59) Add new row to the table: 164 165 GL Type Conversion 166 ------- ---------- 167 half c 168 169 170Additions to Chapter 3 of the OpenGL 2.1 Specification (Rasterization) 171 172 None. 173 174 175Additions to Chapter 4 of the OpenGL 2.1 Specification (Per-Fragment 176Operations and the Framebuffer) 177 178 None. 179 180 181Additions to Chapter 5 of the OpenGL 2.1 Specification (Special Functions) 182 183 None. 184 185Additions to Chapter 6 of the OpenGL 2.1 Specification (State and 186State Requests) 187 188 None. 189 190Additions to the AGL/GLX/WGL Specifications 191 192 None. 193 194GLX Protocol (Modification to the GLX 1.3 Protocol Encoding Specification) 195 196 Add to Section 1.4 (p.2), Common Types 197 198 FLOAT16 A 16-bit floating-point value in the format specified 199 in the ARB_half_float_pixel extension specification. 200 201 Modify Section 2.3.4, GL Rendering Commands That May Be Large (p. 127) 202 203 (Modify the ARRAY_INFO portion of the DrawArrays encoding (p.129) to 204 reflect the new data type supported by vertex arrays.) 205 206 ARRAY_INFO 207 208 4 enum data type 209 0x1400 i=1 BYTE 210 0x1401 i=1 UNSIGNED_BYTE 211 0x1402 i=2 SHORT 212 ... 213 0x140B i=2 HALF_FLOAT 214 4 INT32 j 215 4 ENUM array type 216 ... 217 218Errors 219 220 None 221 222New State 223 224 None 225 226New Implementation Dependent State 227 228 None 229 230Revision History 231 232 Rev. Date Author Changes 233 ---- -------- --------- -------------------------------------------- 234 1 1/22/08 dgkoch Initial version based on the NV_half_float 235 and ARB_half_float_pixel specification. Updated 236 to reference OpenGL 2.1 spec. 237 2 1/22/08 dgkoch Made some grammatical clarifications. 238 3 2/01/08 dgkoch Clarify dependencies and interactions with other 239 extensions. 240 4 2/25/08 dgkoch Add issue #4. 241 5 8/07/08 jleech Remove _ARB suffix. 242 243