• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    ARB_direct_state_access
4
5Name Strings
6
7    GL_ARB_direct_state_access
8
9Contact
10
11    Graham Sellers (graham.sellers 'at' amd.com)
12    Christophe Riccio (christophe.riccio 'at' unity3d.com)
13
14Contributors
15
16    Graham Sellers, AMD
17    Piers Daniell, NVIDIA
18    Christophe Riccio, Unity
19    Daniel Rákos, AMD
20    Daniel Koch, NVIDIA
21    Pat Brown, NVIDIA
22    Jon Leech
23    Members of the OpenGL ARB working group
24    Contributors to GL_EXT_direct_state_access
25
26Notice
27
28    Copyright (c) 2014 The Khronos Group Inc. Copyright terms at
29        http://www.khronos.org/registry/speccopyright.html
30
31Specification Update Policy
32
33    Khronos-approved extension specifications are updated in response to
34    issues and bugs prioritized by the Khronos OpenGL Working Group. For
35    extensions which have been promoted to a core Specification, fixes will
36    first appear in the latest version of that core Specification, and will
37    eventually be backported to the extension document. This policy is
38    described in more detail at
39        https://www.khronos.org/registry/OpenGL/docs/update_policy.php
40
41Status
42
43    Complete.
44    Approved by the ARB on June 26, 2014.
45    Ratified by the Khronos Board of Promoters on August 7, 2014.
46
47Version
48
49    Last Modified Date:         September 17, 2019
50    Author Revision:            51
51
52Number
53
54    ARB Extension #164
55
56Dependencies
57
58    OpenGL 2.0 is required.
59
60    This extension is written against the OpenGL 4.4 (core) specification.
61
62Overview
63
64    In unextended OpenGL, most mutation of state contained in objects is through
65    an indirection known as a binding. Objects are attached to a context (either
66    directly or indirectly via a container) and then commands to modify or
67    query their state are issued on that context, indirecting through its
68    attachments and into the underlying object. This is known as `bind-to-edit'.
69
70    This extension derives from the GL_EXT_direct_state_access extension, which
71    added accessors for most state on most objects, allowing it to be queried
72    and modified without the object needing to be bound to a context. In cases
73    where a single property of an object is to be modified, directly accessing
74    its state can be more efficient than binding the object to the context and
75    then indirecting through it. Further, directly accessing the state of
76    objects through their names rather than by bind-to-edit does not disturb
77    the bindings of the current context, which is useful for tools, middleware
78    and other applications that are unaware of the outer state but it can also
79    avoid cases of redundant state changes.
80
81    There are several subtle differences between this extension and the older
82    GL_EXT_direct_state_access extension. First, this extension only expands
83    functionality that still exists in core profile OpenGL. Second, any function
84    that only partially avoids bind-to-edit (for example, explicitly specifying
85    a texture unit, bypassing the active texture selector but still indirecting
86    through a texture binding) has been omitted. Finally, the original extension
87    effectively allowed any function to create new objects whereas in unextended
88    OpenGL, only binding functions created objects (bind-to-create), even if
89    their names were obtained through one of the glGen* functions. This
90    extension does not allow on-the-spot creation of objects. Rather than rely
91    on bind-to-create (which would defeat the purpose of the extension), we add
92    glCreate* functions that produce new names that represent state vectors
93    initialized to their default values. Due to this last change, several
94    functions no longer require their <target> parameters, and so where
95    applicable, this parameter is absent from this extension.
96
97New Procedures and Functions
98
99    /* Transform Feedback object functions */
100
101    void CreateTransformFeedbacks(sizei n, uint *ids);
102
103    void TransformFeedbackBufferBase(uint xfb, uint index,
104                                     uint buffer);
105
106    void TransformFeedbackBufferRange(uint xfb, uint index,
107                                      uint buffer, intptr offset, sizeiptr size);
108
109    void GetTransformFeedbackiv(uint xfb, enum pname, int *param);
110
111    void GetTransformFeedbacki_v(uint xfb, enum pname, uint index,
112                                 int *param);
113
114    void GetTransformFeedbacki64_v(uint xfb, enum pname, uint index,
115                                   int64 *param);
116
117
118    /* Buffer object functions */
119
120    void CreateBuffers(sizei n, uint *buffers);
121
122    void NamedBufferStorage(uint buffer,
123                            sizeiptr size,
124                            const void *data,
125                            bitfield flags);
126
127    void NamedBufferData(uint buffer,
128                         sizeiptr size,
129                         const void *data,
130                         enum usage);
131
132    void NamedBufferSubData(uint buffer,
133                            intptr offset, sizeiptr size,
134                            const void *data);
135
136    void CopyNamedBufferSubData(uint readBuffer, uint writeBuffer,
137                                intptr readOffset, intptr writeOffset,
138                                sizeiptr size);
139
140    void ClearNamedBufferData(uint buffer,
141                              enum internalformat,
142                              enum format,
143                              enum type,
144                              const void *data);
145
146    void ClearNamedBufferSubData(uint buffer,
147                                 enum internalformat,
148                                 intptr offset,
149                                 sizeiptr size,
150                                 enum format,
151                                 enum type,
152                                 const void *data);
153
154    void *MapNamedBuffer(uint buffer, enum access);
155
156    void *MapNamedBufferRange(uint buffer,
157                              intptr offset, sizeiptr length,
158                              bitfield access);
159
160    boolean UnmapNamedBuffer(uint buffer);
161
162    void FlushMappedNamedBufferRange(uint buffer, intptr offset,
163                                     sizeiptr length);
164
165    void GetNamedBufferParameteriv(uint buffer,
166                                   enum pname, int *params);
167
168    void GetNamedBufferParameteri64v(uint buffer,
169                                   enum pname, int64 *params);
170
171    void GetNamedBufferPointerv(uint buffer,
172                                enum pname, void **params);
173
174    void GetNamedBufferSubData(uint buffer,
175                               intptr offset, sizeiptr size, void *data);
176
177
178    /* Framebuffer object functions */
179
180    void CreateFramebuffers(sizei n, uint *framebuffers);
181
182    void NamedFramebufferRenderbuffer(uint framebuffer,
183                                      enum attachment,
184                                      enum renderbuffertarget,
185                                      uint renderbuffer);
186
187    void NamedFramebufferParameteri(uint framebuffer,
188                                    enum pname,
189                                    int param);
190
191    void NamedFramebufferTexture(uint framebuffer,
192                                 enum attachment,
193                                 uint texture, int level);
194
195    void NamedFramebufferTextureLayer(uint framebuffer,
196                                      enum attachment,
197                                      uint texture, int level, int layer);
198
199    void NamedFramebufferDrawBuffer(uint framebuffer, enum mode);
200
201    void NamedFramebufferDrawBuffers(uint framebuffer, sizei n,
202                                     const enum *bufs);
203
204    void NamedFramebufferReadBuffer(uint framebuffer, enum mode);
205
206    void InvalidateNamedFramebufferData(uint framebuffer,
207                                        sizei numAttachments,
208                                        const enum *attachments);
209
210    void InvalidateNamedFramebufferSubData(uint framebuffer,
211                                           sizei numAttachments,
212                                           const enum *attachments,
213                                           int x, int y,
214                                           sizei width, sizei height);
215
216    void ClearNamedFramebufferiv(uint framebuffer, enum buffer,
217                                 int drawbuffer, const int *value);
218
219    void ClearNamedFramebufferuiv(uint framebuffer, enum buffer,
220                                  int drawbuffer, const uint *value);
221
222    void ClearNamedFramebufferfv(uint framebuffer, enum buffer,
223                                 int drawbuffer, const float *value);
224
225    void ClearNamedFramebufferfi(uint framebuffer, enum buffer,
226                                 int drawbuffer, float depth, int stencil);
227
228    void BlitNamedFramebuffer(uint readFramebuffer,
229                              uint drawFramebuffer,
230                              int srcX0,
231                              int srcY0,
232                              int srcX1,
233                              int srcY1,
234                              int dstX0,
235                              int dstY0,
236                              int dstX1,
237                              int dstY1,
238                              bitfield mask,
239                              enum filter);
240
241    enum CheckNamedFramebufferStatus(uint framebuffer, enum target);
242
243    void GetNamedFramebufferParameteriv(uint framebuffer,
244                                        enum pname,
245                                        int *param);
246
247    void GetNamedFramebufferAttachmentParameteriv(uint framebuffer,
248                                                  enum attachment,
249                                                  enum pname,
250                                                  int *params);
251
252
253    /* Renderbuffer object functions */
254
255    void CreateRenderbuffers(sizei n, uint *renderbuffers);
256
257    void NamedRenderbufferStorage(uint renderbuffer,
258                                  enum internalformat,
259                                  sizei width, sizei height);
260
261    void NamedRenderbufferStorageMultisample(uint renderbuffer,
262                                             sizei samples,
263                                             enum internalformat,
264                                             sizei width, sizei height);
265
266    void GetNamedRenderbufferParameteriv(uint renderbuffer,
267                                         enum pname, int *params);
268
269
270    /* Texture object functions */
271
272    void CreateTextures(enum target, sizei n, uint *textures);
273
274    void TextureBuffer(uint texture,
275                       enum internalformat, uint buffer);
276
277    void TextureBufferRange(uint texture,
278                            enum internalformat, uint buffer,
279                            intptr offset, sizeiptr size);
280
281    void TextureStorage1D(uint texture, sizei levels,
282                          enum internalformat,
283                          sizei width);
284
285    void TextureStorage2D(uint texture, sizei levels,
286                          enum internalformat,
287                          sizei width, sizei height);
288
289    void TextureStorage3D(uint texture, sizei levels,
290                          enum internalformat,
291                          sizei width, sizei height, sizei depth);
292
293    void TextureStorage2DMultisample(uint texture, sizei samples,
294                                     enum internalformat, sizei width,
295                                     sizei height,
296                                     boolean fixedsamplelocations);
297
298    void TextureStorage3DMultisample(uint texture, sizei samples,
299                                     enum internalformat, sizei width,
300                                     sizei height, sizei depth,
301                                     boolean fixedsamplelocations);
302
303    void TextureSubImage1D(uint texture, int level,
304                           int xoffset, sizei width,
305                           enum format, enum type,
306                           const void *pixels);
307
308    void TextureSubImage2D(uint texture, int level,
309                           int xoffset, int yoffset,
310                           sizei width, sizei height,
311                           enum format, enum type,
312                           const void *pixels);
313
314    void TextureSubImage3D(uint texture, int level,
315                           int xoffset, int yoffset, int zoffset,
316                           sizei width, sizei height, sizei depth,
317                           enum format, enum type,
318                           const void *pixels);
319
320    void CompressedTextureSubImage1D(uint texture, int level,
321                                     int xoffset,
322                                     sizei width,
323                                     enum format,
324                                     sizei imageSize, const void *data);
325
326    void CompressedTextureSubImage2D(uint texture, int level,
327                                     int xoffset, int yoffset,
328                                     sizei width, sizei height,
329                                     enum format,
330                                     sizei imageSize, const void *data);
331
332    void CompressedTextureSubImage3D(uint texture, int level,
333                                     int xoffset, int yoffset, int zoffset,
334                                     sizei width, sizei height, sizei depth,
335                                     enum format,
336                                     sizei imageSize, const void *data);
337
338    void CopyTextureSubImage1D(uint texture,
339                               int level,
340                               int xoffset,
341                               int x, int y,
342                               sizei width);
343
344    void CopyTextureSubImage2D(uint texture,
345                               int level,
346                               int xoffset, int yoffset,
347                               int x, int y,
348                               sizei width, sizei height);
349
350    void CopyTextureSubImage3D(uint texture,
351                               int level,
352                               int xoffset, int yoffset, int zoffset,
353                               int x, int y,
354                               sizei width, sizei height);
355
356    void TextureParameterf(uint texture,
357                           enum pname, float param);
358
359    void TextureParameterfv(uint texture,
360                            enum pname, const float *param);
361
362    void TextureParameteri(uint texture,
363                           enum pname, int param);
364
365    void TextureParameterIiv(uint texture,
366                             enum pname, const int *params);
367
368    void TextureParameterIuiv(uint texture,
369                              enum pname, const uint *params);
370
371    void TextureParameteriv(uint texture,
372                            enum pname, const int *param);
373
374    void GenerateTextureMipmap(uint texture);
375
376    void BindTextureUnit(uint unit, uint texture);
377
378    void GetTextureImage(uint texture, int level,
379                         enum format, enum type,
380                         sizei bufSize,
381                         void *pixels);
382
383    void GetCompressedTextureImage(uint texture, int level,
384                                   sizei bufSize,
385                                   void *pixels);
386
387    void GetTextureLevelParameterfv(uint texture,
388                                    int level,
389                                    enum pname, float *params);
390
391    void GetTextureLevelParameteriv(uint texture,
392                                    int level,
393                                    enum pname, int *params);
394
395    void GetTextureParameterfv(uint texture,
396                               enum pname, float *params);
397
398    void GetTextureParameterIiv(uint texture,
399                                enum pname, int *params);
400
401    void GetTextureParameterIuiv(uint texture,
402                                 enum pname, uint *params);
403
404    void GetTextureParameteriv(uint texture,
405                               enum pname, int *params);
406
407
408    /* Vertex Array object functions */
409
410    void CreateVertexArrays(sizei n, uint *arrays);
411
412    void DisableVertexArrayAttrib(uint vaobj, uint index);
413
414    void EnableVertexArrayAttrib(uint vaobj, uint index);
415
416    void VertexArrayElementBuffer(uint vaobj, uint buffer);
417
418    void VertexArrayVertexBuffer(uint vaobj, uint bindingindex, uint buffer,
419                                 intptr offset, sizei stride);
420
421    void VertexArrayVertexBuffers(uint vaobj, uint first, sizei count,
422                                  const uint *buffers,
423                                  const intptr *offsets,
424                                  const sizei *strides);
425
426    void VertexArrayAttribFormat(uint vaobj, uint attribindex, int size,
427                                 enum type, boolean normalized,
428                                 uint relativeoffset);
429
430    void VertexArrayAttribIFormat(uint vaobj, uint attribindex, int size,
431                                  enum type, uint relativeoffset);
432
433    void VertexArrayAttribLFormat(uint vaobj, uint attribindex, int size,
434                                  enum type, uint relativeoffset);
435
436    void VertexArrayAttribBinding(uint vaobj, uint attribindex,
437                                  uint bindingindex);
438
439    void VertexArrayBindingDivisor(uint vaobj, uint bindingindex,
440                                   uint divisor);
441
442    void GetVertexArrayiv(uint vaobj,
443                          enum pname,
444                          int *param);
445
446    void GetVertexArrayIndexediv(uint vaobj,
447                                 uint index,
448                                 enum pname,
449                                 int *param);
450
451    void GetVertexArrayIndexed64iv(uint vaobj,
452                                   uint index,
453                                   enum pname,
454                                   int64 *param);
455
456    /* Sampler object functions */
457
458    void CreateSamplers(sizei n, uint *samplers);
459
460
461    /* Program Pipeline object functions */
462
463    void CreateProgramPipelines(sizei n, uint *pipelines);
464
465
466    /* Query object functions */
467
468    void CreateQueries(enum target, sizei n, uint *ids);
469    void GetQueryBufferObjectiv(uint id, uint buffer, enum pname,
470                                intptr offset);
471    void GetQueryBufferObjectuiv(uint id, uint buffer, enum pname,
472                                 intptr offset);
473    void GetQueryBufferObjecti64v(uint id, uint buffer, enum pname,
474                                  intptr offset);
475    void GetQueryBufferObjectui64v(uint id, uint buffer, enum pname,
476                                   intptr offset);
477
478
479New Tokens
480
481    Accepted by the <pname> parameter of GetTextureParameter{if}v and
482    GetTextureParameterI{i ui}v:
483
484        TEXTURE_TARGET                                      0x1006
485
486    Accepted by the <pname> parameter of GetQueryObjectiv:
487
488        QUERY_TARGET                                        0x82EA
489
490    Accepted by the <pname> parameter of GetIntegeri_v:
491
492        TEXTURE_BINDING_1D                                  <existing>
493        TEXTURE_BINDING_1D_ARRAY                            <existing>
494        TEXTURE_BINDING_2D                                  <existing>
495        TEXTURE_BINDING_2D_ARRAY                            <existing>
496        TEXTURE_BINDING_2D_MULTISAMPLE                      <existing>
497        TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY                <existing>
498        TEXTURE_BINDING_3D                                  <existing>
499        TEXTURE_BINDING_BUFFER                              <existing>
500        TEXTURE_BINDING_CUBE_MAP                            <existing>
501        TEXTURE_BINDING_CUBE_MAP_ARRAY                      <existing>
502        TEXTURE_BINDING_RECTANGLE                           <existing>
503
504Additions to Chapter 2 of the OpenGL 4.4 (core) Specification (OpenGL
505Fundamentals)
506
507    Replace the final paragraph of Section 2.5.1.1, "Name Spaces, Name
508    Generation and Object Creation" with the following:
509
510    Objects may also be created directly by functions that return a new
511    name or names representing a freshly initialized object. Some functions
512    return a single object name directly whereas others are able to create a
513    large number of new objects, returning their names in an array. Examples of
514    the former are CreateProgram for program objects and FenceSync for fence
515    sync objects. Examples of the latter are CreateBuffers, CreateTextures and
516    CreateVertexArrays for buffers, textures and vertex arrays, respectively.
517
518Additions to Chapter 4 of the OpenGL 4.4 (core) Specification (Event Model)
519
520    Modifications to Section 4.2, "Query Objects and Asynchronous Queries"
521
522    (Insert the following after the description of GenQueries and before the
523    introduction of DeleteQueries, p 39)
524
525    Query objects may also be created with the command
526
527        void CreateQueries(enum target, sizei n, uint *ids);
528
529    CreateQueries returns <n> previously unused query object names in <ids>,
530    each representing a new query object with the specified <target>.
531    <target> must be one of the query object targets described in section
532    4.2.
533
534    The initial state of the resulting query object is that the result is
535    marked available (the value of QUERY_RESULT_AVAILABLE) for the query
536    object is TRUE) and the result value (the value of QUERY_RESULT) is
537    zero.
538
539    Errors
540
541    An INVALID_ENUM error is generated if <target> is not one of the query
542    object targets described in section 4.2.
543
544    An INVALID_VALUE error is generated if <n> is negative.
545
546
547    (Modify the introduction of GetQueryObject* as follows, p. ??, to add
548    the QUERY_TARGET <pname> and the GetQueryBufferObject* commands)
549
550    The state of a query object may be queried with the commands
551
552    void GetQueryObjectiv(uint id,enum pname,int *params);
553    void GetQueryObjectuiv(uint id,enum pname,uint *params);
554    void GetQueryObjecti64v(uint id,enum pname,int64 *params);
555    void GetQueryObjectui64v(uint id,enum pname,uint64 *params);
556    void GetQueryBufferObjectiv(uint id,uint buffer,enum pname,intptr offset);
557    void GetQueryBufferObjectuiv(uint id,uint buffer,enum pname,intptr offset);
558    void GetQueryBufferObjecti64v(uint id,uint buffer,enum pname,intptr offset);
559    void GetQueryBufferObjectui64v(uint id,uint buffer,enum pname,intptr offset);
560
561    <id> is the name of a query object.
562
563    For GetQueryBufferObject*, <buffer> is the name of a buffer object and
564    <offset> is an offset into <buffer> at which the queried value is
565    written.
566
567    For GetQueryObject*, the queried value may be returned either in client
568    memory or in a buffer object. If zero is bound to the current query
569    result buffer binding point (see QUERY_RESULT in
570    section~\ref{vert:vbo:bind), then <params> is treated as a pointer into
571    client memory at which the queried value is written. Otherwise, <params>
572    is treated as an offset into the query result buffer object at which the
573    queried value is written.
574
575    There may be an indeterminate delay ...
576
577    If <pname> is QUERY_TARGET, then the target of the query object is
578    returned as a single integer.
579
580    If <pname> is QUERY_RESULT, then the query object's result value is
581    returned as a single integer. If the value ...
582
583    If <pname> is QUERY_RESULT_NO_WAIT, then the query object's result value
584    is returned as a single integer if the result ...
585
586    If multiple queries are issued using the same object name prior to
587    calling these query commands, the result and availability information
588    returned ...
589
590    Errors
591
592    An INVALID_OPERATION error is generated if <id> is not the name of a
593    query object, or if the query object named by <id> is currently active.
594
595    An INVALID_OPERATION error is generated by GetQueryBufferObject* if
596    <buffer> is not the name of an existing buffer object.
597
598    An INVALID_ENUM error is generated if <pname> is not QUERY_RESULT,
599    QUERY_RESULT_AVAILABLE, QUERY_RESULT_NO_WAIT, or QUERY_TARGET.
600
601    An INVALID_OPERATION error is generated if the query writes to a buffer
602    object, and the specified buffer offset would cause data to be written
603    beyond the bounds of that buffer object.
604
605    An INVALID_VALUE error is generated by GetQueryBufferObject* if <offset>
606    is negative.
607
608
609    Modifications to Section 4.3, "Time Queries"
610
611    (Add following the description of QueryCounter on p. 45)
612
613    A timer query object is created with the commands
614
615        void QueryCounter(uint id, enum target);
616
617    ... <id> must be the name of an existing query object of that type.
618
619    Alternatively, TIMESTAMP query objects can be created by calling
620    CreateQueries with <target> set to TIMESTAMP.
621
622    When QueryCounter is called ... for that object is marked available.
623    Timer queries can be used within a BeginQuery / EndQuery block where the
624    <target> is ...
625
626    (Retain the remainder of the section.)
627
628Additions to Chapter 6 of the OpenGL 4.4 (core) Specification (Buffer Objects)
629
630    (Insert the following before the introduction of DeleteBuffers, p. 53)
631
632    In addition to generating an unused name and then binding it to a target
633    with BindBuffer, a buffer object may also be created with the command
634
635        void CreateBuffers(sizei n, uint *buffers);
636
637    CreateBuffers returns <n> previously unused buffer names in <buffers>, each
638    representing a new buffer object initialized as if it had been bound to
639    an unspecified target.
640
641    Errors
642
643    An INVALID_VALUE error is generated if <n> is negative.
644
645
646    Modifications to Section 6.2, "Creating and Modifying Buffer Object Data Stores"
647
648    (Modify the introduction of BufferStorage as follows, p. 59)
649
650    The data store of a buffer object is created with the commands
651
652        void BufferStorage(enum target, sizeiptr size,
653                           const void *data, bitfield flags);
654        void NamedBufferStorage(uint buffer, sizeiptr size,
655                                const void *data, bitfield flags);
656
657    For BufferStorage, the data store belongs to the buffer object bound to
658    <target>, which must be one of the values listed in table 6.1. For
659    NamedBufferStorage, <buffer> is the name of the buffer object. <size> is
660    the size of the data store in basic machine units, and <flags> contains
661    a bitfield describing the intended usage of the data store.
662
663    The data store of the buffer object is allocated as a result of these
664    commands, and cannot be de-allocated ...
665
666    (Retain the remainder of the section, but replace references to
667    "BufferStorage" with "*BufferStorage").
668
669    Errors
670
671    An INVALID_OPERATION error is generated by NamedBufferStorage if
672    <buffer> is not the name of an existing buffer object.
673
674
675    (Modify the introduction of BufferData as follows, p. 61)
676
677    A mutable data store may be allocated for a buffer object with the
678    commands
679
680        void BufferData(enum target, sizeiptr size,
681                        const void *data, enum usage);
682        void NamedBufferData(uint buffer, sizeiptr size,
683                             const void *data, enum usage);
684
685    For BufferData, the buffer object is that bound to <target>, which must
686    be one of the targets listed in table 6.1. For NamedBufferData, <buffer>
687    is the name of the buffer object.
688
689    <size> is the size of the data store in basic machine units, <data>
690    points to the source data in client memory, and <usage> indicates the
691    expected application usage pattern of the data store.
692
693    If <data> is non-NULL ...
694
695    (Retain the remainder of the section, but replace references to
696    "BufferData" with "*BufferData").
697
698    Errors
699
700    An INVALID_OPERATION error is generated by NamedBufferData if <buffer>
701    is not the name of an existing buffer object.
702
703
704    (Modify the introduction of BufferSubData as follows, p. 63)
705
706    To modify some or all of the data contained in a buffer object's data
707    store, the client may use the commands
708
709        void BufferSubData(enum target, intptr offset,
710                           sizeiptr size, const void *data);
711        void NamedBufferSubData(uint buffer, intptr offset,
712                                sizeiptr size, const void *data);
713
714    For BufferSubData, <target> specifies the target to which the buffer
715    object is bound, and must be one of the values listed in table 6.1. For
716    NamedBufferSubData, <buffer> is the name of the buffer object.
717
718    (Retain the remainder of the section.)
719
720    Errors
721
722    An INVALID_OPERATION error is generated by NamedBufferSubData if
723    <buffer> is not the name of an existing buffer object.
724
725
726    Modifications to Section 6.2.1, "Clearing Buffer Object Data Stores"
727
728    (Modify the introduction of ClearBufferSubData as follows, p. 64)
729
730    To fill all or part of a buffer object's data store with constant
731    values, use the commands
732
733        void ClearBufferSubData(enum target, enum internalformat, intptr offset,
734                                sizeiptr size, enum format, enum type,
735                                const void *data);
736        void ClearNamedBufferSubData(uint buffer, enum internalformat,
737                                     intptr offset, sizeiptr size, enum format,
738                                     enum type, const void *data);
739
740    For ClearBufferSubData, the buffer object is that bound to <target>,
741    which must be one of the values listed in table 6.1. For
742    ClearNamedBufferSubData, <buffer> is the name of the buffer object.
743
744    (Retain the remainder of the section.)
745
746    Errors
747
748    An INVALID_OPERATION error is generated by ClearNamedBufferSubData if
749    <buffer> is not the name of an existing buffer object.
750
751
752    (Retain the remainder of the section.)
753
754    (Modify the introduction of ClearBufferData as follows, p. 65)
755
756    The commands
757
758        void ClearBufferData(enum target, enum internalformat, enum format,
759                             enum type, const void *data);
760        void ClearNamedBufferData(uint buffer, enum internalformat, enum format,
761                                  enum type, const void *data);
762
763    are respectively equivalent to
764
765        ClearBufferSubData(target, internalformat, 0, size,
766                           format, type, data);
767
768    and
769
770        ClearNamedBufferSubData(buffer, internalformat, 0, size,
771                                format, type, data);
772
773    where <size> is the value of BUFFER_SIZE for the destination buffer
774    object.
775
776
777    Modifications to Section 6.3, "Mapping and Unmapping Buffer Data"
778
779    (Modify the introduction of MapBufferRange as follows, p. 65)
780
781    All or part of the data store of a buffer object may be mapped into the
782    client's address space with the commands
783
784        void *MapBufferRange(enum target, intptr offset, sizeiptr length,
785                             bitfield acesss);
786        void *MapNamedBufferRange(uint buffer, intptr offset, sizeiptr length,
787                                  bitfield access);
788
789    For MapBufferRange, the buffer object is that bound to <target>, which
790    and must be one of the values listed in table 6.1. For
791    MapNamedBufferRange, <buffer> is the name of the buffer object.
792
793    <offset> and <length> indicate the range of data in the buffer object
794    that is to be mapped, in terms of basic machine units. <access> is a
795    bitfield containing flags which describe the requested mapping. These
796    flags are described below.
797
798    (Retain the remainder of the section, but replace further references
799    to "MapBufferRange" with "Map*BufferRange").
800
801    Errors
802
803    An INVALID_OPERATION error is generated by MapNamedBufferRange if
804    <buffer> is not the name of an existing buffer object.
805
806
807    (Modify the introduction of MapBuffer with the following, p. 69)
808
809    The entire data store of a buffer object can be mapped into the client's
810    address space with the commands
811
812        void *MapBuffer(enum target, enum access);
813        void *MapNamedBuffer(uint buffer, enum access);
814
815    These commands are respectively equivalent to
816
817        MapBufferRange(target, 0, length, flags);
818
819    and
820
821        MapNamedBufferRange(buffer, 0, length, flags);
822
823    where <length> is ...
824
825    (Retain remainder of the section.)
826
827
828    (Modify the introduction of FlushMappedBufferRange as follows, p. 69)
829
830    If a buffer object is mapped with the MAP_FLUSH_EXPLICIT_BIT flag,
831    modifications to the mapped range may be indicated with the commands
832
833        void FlushMappedBufferRange(enum target,
834                                    intptr offset,
835                                    sizeiptr length);
836        void FlushMappedNamedBufferRange(uint buffer,
837                                         intptr offset,
838                                         sizeiptr length);
839
840    For FlushMappedBufferRange, the buffer object is that bound to <target>,
841    which must be one of the targets listed in Table 6.1. For
842    FlushMappedNamedBufferRange, <buffer> is the name of the buffer object.
843
844    <offset> and <length> ...
845
846    Retain the remainder of Section 6.3, but replace the two further references
847    to FlushMappedBufferRange with "FlushMapped*BufferRange").
848
849    Errors
850
851    An INVALID_OPERATION error is generated by FlushMappedNamedBufferRange
852    if <buffer> is not the name of an existing buffer object.
853
854
855    Modifications to Section 6.3.1, "Unmapping Buffers"
856
857    (Modify the introduction of UnmapBuffer as follows, p. 70)
858
859    After the client ..., the mapping must be relinquished with one
860    of the commands
861
862        boolean UnmapBuffer(enum target);
863        boolean UnmapNamedBuffer(uint buffer);
864
865    For UnmapBuffer, the buffer object is that bound to <target>, which must
866    be one of the targets listed in table 6.1. For UnmapNamedBuffer,
867    <buffer> is the name of the buffer object.
868
869    Unmapping a mapped buffer ...
870
871    (Retain the remainder of Section 6.3.1, but replace any further
872    reference to "UnmapBuffer" with "Unmap*Buffer").
873
874    If an error is generated, FALSE is returned.
875
876    Errors
877
878    An INVALID_OPERATION error is generated by UnmapNamedBuffer if <buffer>
879    is not the name of an existing buffer object.
880
881    An INVALID_OPERATION error is generated if the buffer object's
882    data store is already in the unmapped state.
883
884
885    Modifications to Section 6.6, "Copying Between Buffers"
886
887    (Modify the introduction of CopyBufferSubData as follows, p. 72)
888
889    All or part of the data store of a buffer object may be copied to the
890    data store of another buffer object with the commands
891
892        void CopyBufferSubData(enum readTarget, enum writeTarget,
893                               intptr readOffset, intptr writeOffset,
894                               sizeiptr size);
895        void CopyNamedBufferSubData(uint readBuffer, uint writeBuffer,
896                                    intptr readOffset, intptr writeOffset,
897                                    sizeiptr size);
898
899    For CopyBufferSubData, <readTarget> and <writeTarget> are the targets to
900    which the source and destination buffers are bound, and each must be one
901    of the targets listed in table 6.1. For CopyNamedBufferSubData,
902    <readBuffer> and <writeBuffer> are the names of the source and
903    destination buffers, respectively.
904
905    While any of these targets may be used, COPY_READ_BUFFER and
906    COPY_WRITE_BUFFER are provided specifically for copies, so that they can
907    be used without affecting other buffer binding targets that may be in
908    use.
909
910    <writeOffset> and <size> specify the range of data in the destination
911    buffer object that is to be replaced, in terms of basic machine units.
912    <readOffset> and <size> specify the range of data in the source buffer
913    object that is to be copied to the corresponding region of the
914    destination buffer object.
915
916    (Replace references in the Errors section of "the buffer object bound to
917    <readTarget> / <writeTarget>" with "the source / destination buffer
918    object", respectively).
919
920    Errors
921
922    An INVALID_OPERATION error is generated by CopyNamedBufferSubData if
923    <readBuffer> or <writeBuffer> is not the name of an existing buffer
924    object.
925
926
927    Modifications to Section 6.7, "Buffer Object Queries"
928
929    (Replace the introduction of GetBufferParameteri{64}v with the following,
930    p. 73)
931
932    To query information about a buffer object, use the commands
933
934        void GetBufferParameteriv(enum target, enum pname, int *data);
935        void GetBufferParamereri64v(enum target, enum pname, int64 *data);
936        void GetNamedBufferParameteriv(uint buffer, enum pname, int *data);
937        void GetNamedBufferParameteri64v(uint buffer, enum pname, int64 *data);
938
939    For GetBufferParameter*, the buffer object is that bound to <target>,
940    which must be one of the targets listed in table 6.1. For
941    GetNamedBufferParameter*, <buffer> is the name of the buffer object.
942
943    <pname> must be one of the buffer object parameters in table 6.2, other
944    than BUFFER_MAP_POINTER. The value of the specified parameter of the
945    target buffer object is returned in <data>.
946
947    Errors
948
949    An INVALID_OPERATION error is generated by GetNamedBufferParameter* if
950    <buffer> is not the name of an existing buffer object.
951
952
953    (Replace the introduction of GetBufferSubData with the following, p. 73)
954
955    To query the data store of a buffer object, use the commands
956
957        void GetBufferSubData(enum target, intptr offset,
958                              sizeiptr size, void *data);
959        void GetNamedBufferSubData(uint buffer, intptr offset,
960                                   sizeiptr size, void *data);
961
962    For GetBufferSubData, <target> specifies the target to which the source
963    buffer object is bound, and must be one of the values listed in table
964    6.1. For GetNamedBufferSubData, <buffer> specifies the name of the source
965    buffer object.
966
967    <offset> and <size> indicate ...
968
969    (Retain the remainder of the section, but replace references to
970    "the buffer object bound to <target>" with "the source buffer object").
971
972    Errors
973
974    An INVALID_OPERATION error is generated by GetNamedBufferSubData if
975    <buffer> is not the name of an existing buffer object.
976
977
978    (Replace the introduction of GetBufferPointerv with the following, p. 74)
979
980    While part or all of the data store of a buffer object is mapped, the
981    pointer to the mapped range of the data store can be queried with the
982    commands
983
984        void GetBufferPointerv(enum target, enum pname, const void **params);
985        void GetNamedBufferPointerv(uint buffer, enum pname,
986                                    const void **params);
987
988    For GetBufferPointerv, the buffer object is that bound tp <target>,
989    which must be one of the targets listed in table 6.1. For
990    GetNamedBufferPointerv, <buffer> is the name of the buffer object.
991
992    (Retain the remainder of the section.)
993
994    Errors
995
996    An INVALID_OPERATION error is generated by GetNamedBufferPointerv if
997    <buffer> is not the name of an existing buffer object.
998
999
1000Additions to Chapter 7 of the OpenGL 4.4 (core) Specification (Programs and
1001Shaders)
1002
1003    Modifications to Section 7.4, "Program Pipeline Objects"
1004
1005    (Insert the following after the description of BindProgramPipeline, p. 110)
1006
1007    Program pipeline objects may also be created with the command
1008
1009        void CreateProgramPipelines(sizei n, uint *pipelines);
1010
1011    CreateProgramPipelines returns <n> previously unused program pipeline
1012    names in <pipelines>, each representing a new program pipeline object
1013    which is a state vector comprising all the state and with the same
1014    initial values listed in table 23.31.
1015
1016    Errors
1017
1018    An INVALID_VALUE error is generated if <n> is negative.
1019
1020
1021Additions to Chapter 8 of the OpenGL 4.4 (core) Specification (Textures and
1022Samplers)
1023
1024    Modifications to Section 8.1, "Texture Objects"
1025
1026    (Insert the following after the description of BindTextures, p. 164)
1027
1028    The command
1029
1030        void BindTextureUnit(uint unit, uint texture);
1031
1032    binds an existing texture object to the texture unit numbered <unit>.
1033    <texture> must be zero or the name of an existing texture object. When
1034    <texture> is the name of an existing texture object, that object is
1035    bound to the target, in the corresponding texture unit, that was
1036    specified when the object was created. When <texture> is zero, each of
1037    the targets enumerated at the beginning of this section is reset to its
1038    default texture for the corresponding texture image unit.
1039
1040    Errors
1041
1042    An INVALID_OPERATION error is generated by BindTextureUnit if <texture>
1043    is not zero or the name of an existing texture object.
1044
1045
1046    Texture objects may also be created with the command
1047
1048        void CreateTextures(enum target, sizei n, uint *textures);
1049
1050    CreateTextures returns <n> previously unused texture names in
1051    <textures>, each representing a new texture object that is a state
1052    vector comprising all the state and with the same initial values listed
1053    in section 8.22. The new texture objects are and remain textures of the
1054    dimensionality and type specified by <target> until they are deleted.
1055
1056    Errors
1057
1058    An INVALID_VALUE error is generated if <n> is negative.
1059
1060
1061    Modifications to Section 8.2, "Sampler Objects"
1062
1063    (Insert the following after the description of GenSamplers, p. 165)
1064
1065    Sampler objects may also be created with the command
1066
1067        void CreateSamplers(sizei n, uint *samplers);
1068
1069    CreateSamplers returns <n> previously unused sampler names in
1070    <samplers>, each representing a new sampler object which is a state
1071    vector comprising all the state and with the same initial values listed
1072    in table 23.18.
1073
1074    Errors
1075
1076    An INVALID_VALUE error is generated if <n> is negative.
1077
1078
1079    Modifications to Section 8.6, "Alternate Texture Image Specification"
1080
1081    (Modify introduction and add to the list of commands comprising
1082    TexSubImage*D and CopyTexSubImage*D, p. 201)
1083
1084    To respecify only a rectangular subregion of the texel array of a
1085    texture object, use the commands
1086
1087        ...
1088        void TextureSubImage1D(uint texture,
1089                               int level, int xoffset, sizei width,
1090                               enum format, enum type,
1091                               const void *pixels);
1092        void TextureSubImage2D(uint texture,
1093                               int level, int xoffset, int yoffset,
1094                               sizei width, sizei height,
1095                               enum format, enum type,
1096                               const void *pixels);
1097        void TextureSubImage3D(uint texture,
1098                               int level,
1099                               int xoffset, int yoffset, int zoffset,
1100                               sizei width, sizei height, sizei depth,
1101                               enum format, enum type,
1102                               const void *pixels);
1103        void CopyTextureSubImage1D(uint texture,
1104                                   int level,
1105                                   int xoffset,
1106                                   int x, int y,
1107                                   sizei width);
1108        void CopyTextureSubImage2D(uint texture,
1109                                   int level,
1110                                   int xoffset, int yoffset,
1111                                   int x, int y,
1112                                   sizei width, sizei height);
1113        void CopyTextureSubImage3D(uint texture,
1114                                   int level,
1115                                   int xoffset, int yoffset, int zoffset,
1116                                   int x, int y,
1117                                   sizei width, sizei height);
1118
1119    For *TexSubImage*, the texture object is that bound to <target>. For
1120    *TextureSubImage*, <texture> is the name of the texture object. <target>
1121    or the effective target of <texture> (the value of TEXTURE_TARGET; see
1122    section 8.10) must match each command as shown in table 8.subtarg.
1123
1124    Command Name            Valid <target>s or effective <target>s
1125    ---------------------   --------------------------------------
1126    TexSubImage1D           TEXTURE_1D
1127    CopyTexSubImage1D
1128    TextureSubImage1D
1129    CopyTextureSubImage1D
1130
1131    TexSubImage2D           TEXTURE_2D,
1132    CopyTexSubImage2D       TEXTURE_1D_ARRAY,
1133    TextureSubImage2D       TEXTURE_RECTANGLE, or one of the
1134    CopyTextureSubImage2D   cube map face targets from table 8.18
1135
1136    TextureSubImage2D       TEXTURE_2D,
1137    CopyTextureSubImage2D   TEXTURE_1D_ARRAY, or
1138                            TEXTURE_RECTANGLE
1139
1140    TexSubImage3D           TEXTURE_3D,
1141    CopyTexSubImage3D       TEXTURE_2D_ARRAY, or
1142                            TEXTURE_CUBE_MAP_ARRAY
1143
1144    TextureSubImage3D       TEXTURE_3D,
1145    CopyTextureSubImage3D   TEXTURE_2D_ARRAY,
1146                            TEXTURE_CUBE_MAP_ARRAY or
1147                            TEXTURE_CUBE_MAP
1148    ----------------------------------------------------------------
1149    Table 8.subtarg: Valid texture <target> parameters or effective
1150    <texture> targets for texture subimage commands.
1151
1152    No change is made to the <internalformat> ...
1153
1154    The <level> parameter of each command specifies ...
1155
1156    Errors
1157
1158    An INVALID_ENUM error is generated by *TexSubImage* if <target> does
1159    not match the command, as shown in table 8.subtarg.
1160
1161    An INVALID_OPERATION error is generated by *TextureSubImage* if
1162    <texture> is not the name of an existing texture object.
1163
1164    An INVALID_OPERATION error is generated by *TextureSubImage* if the
1165    effective target of <texture> does not match the command, as shown in
1166    table 8.subtarg.
1167
1168    An INVALID_VALUE error is generated if the effective <target> is
1169    TEXTURE_RECTANGLE and <level> is not zero.
1170
1171
1172    Modifications to Section 8.7, "Compressed Texture Images"
1173
1174    To respecify only a rectangular subregion of the texel array of an
1175    texture object, with incoming data stored in a specific compressed
1176    format, use the commands
1177
1178        ...
1179        void CompressedTextureSubImage1D(uint texture, int level,
1180                                         int xoffset, sizei width,
1181                                         enum format,
1182                                         sizei imageSize, const void *data);
1183        void CompressedTextureSubImage2D(uint texture, int level,
1184                                         int xoffset, int yoffset,
1185                                         sizei width, sizei height,
1186                                         enum format,
1187                                         sizei imageSize, const void *data);
1188        void CompressedTextureSubImage3D(uint texture, int level,
1189                                         int xoffset, int yoffset,
1190                                         int zoffset,
1191                                         sizei width, sizei height,
1192                                         sizei depth, enum format,
1193                                         sizei imageSize, const void *data);
1194
1195    Modify the following text, beginning "respecify only a rectangular
1196    region ..." as follows:
1197
1198    The <target>, <texture>, <level>, <xoffset>, <yoffset>, <zoffset>,
1199    <width>, <height>, and <depth> parameters have the same meaning as in
1200    the corresponding commands from section 8.6 without the Compressed
1201    prefix (where those parameters are present). <data> points to compressed
1202    image data stored in the compressed image format corresponding to
1203    <format>.
1204
1205    ...
1206
1207    Errors
1208
1209    Modify existing errors to apply to all forms of the commands by dropping
1210    "bound to <target>" phrasing and using "effective <target>" instead of
1211    "<target>".
1212
1213    An INVALID_OPERATION error is generated by CompressedTextureSubImage*D
1214    if <texture> is not the name of an existing texture object.
1215
1216    An INVALID_OPERATION error is generated by CompressedTextureSubImage*D
1217    if the effective <target> is TEXTURE_RECTANGLE.
1218
1219
1220    Modifications to Section 8.9, "Buffer Textures"
1221
1222    (Modify the introduction of TexBuffer with the following, p. 214)
1223
1224    The commands
1225
1226        void TexBufferRange(enum target, enum internalformat,
1227                            uint buffer, intptr offset, sizeiptr size);
1228        void TextureBufferRange(uint texture, enum internalformat,
1229                                uint buffer, intptr offset, sizeiptr size);
1230
1231    attach the range of the storage for the buffer object named <buffer> for
1232    <size> basic machine units, starting at <offset> (also in basic machine
1233    units) to a buffer texture.
1234
1235    For TexBufferRange, the buffer texture is that currently bound to
1236    <target>. For TextureBufferRange, <texture> is the name of the buffer
1237    texture. <target> or the effective target of <texture> must be
1238    TEXTURE_BUFFER
1239
1240    If <buffer> is zero, then any buffer object attached to the buffer
1241    texture is detached, the values <offset> and <size> are ignored and the
1242    state for <offset> and <size> for the buffer texture are reset to zero.
1243    <internalformat> specifies the storage format for the texel array found
1244    in the range of the attached buffer object, and must be one of the sized
1245    internal formats from table 8.15.
1246
1247    Errors
1248
1249    Modify existing errors to apply to all forms of the command where
1250    parameters are equivalent.
1251
1252    An INVALID_OPERATION error is generated by TextureBufferRange if
1253    <texture> is not the name of an existing texture object.
1254
1255    An INVALID_OPERATION error is generated by TextureBufferRange if the
1256    effective <target> is not TEXTURE_BUFFER.
1257
1258    (Replace the introduction of TexBuffer with the following, p. 214)
1259
1260    The commands
1261
1262        TexBuffer(enum target, enum internalformat, uint buffer);
1263        TextureBuffer(uint texture, enum internalformat, uint buffer);
1264
1265    are respectively equivalent to
1266
1267        TexBufferRange(<target>, <internalformat>, <buffer>, 0, size);
1268
1269    and
1270
1271        TextureBufferRange(<texture>, <internalformat>, <buffer>, 0, size);
1272
1273    where <size> is set to the value of BUFFER_SIZE for <buffer>.
1274
1275    (Retain the remainder of the section.)
1276
1277
1278    Modifications to Section 8.10, "Texture Parameters"
1279
1280    (Modify introduction to the section)
1281
1282    Texture parameters control how the texel array of a texture object is
1283    treated when specified or changed, and when applied to a fragment. Each
1284    parameter is set with the commands
1285
1286        void TexParameter{if}(enum target, enum pname, T param);
1287        void TexParameter{if}v(enum target, enum pname, const T *params);
1288        void TexParameterI{i ui}v(enum target, enum pname, const T *params);
1289        void TextureParameter{if}(uint texture, enum pname, T param);
1290        void TextureParameter{if}v(uint texture, enum pname, const T *params);
1291        void TextureParameterI{i ui}v(uint texture, enum pname, const T *params);
1292
1293    For TexParameter*, the texture object is that bound to <target>. For
1294    TextureParameter*, <texture> is the name of the texture object. <target>
1295    or the effective target of <texture> must be one of [insert existing
1296    list of valid texture targets].
1297
1298    ...
1299
1300    Errors
1301
1302    Modify existing errors to apply to all forms of the command where
1303    parameters are equivalent.
1304
1305    An INVALID_OPERATION error is generated by TextureParameter* if
1306    <texture> is not the name of an existing texture object.
1307
1308    An INVALID_OPERATION error is generated by TextureParameter* if
1309    the effective <target> is not one of the valid targets listed above.
1310
1311    An INVALID_OPERATION error is generated by TextureParameter* if the
1312    effective <target> is either TEXTURE_2D_MULTISAMPLE or
1313    TEXTURE_2D_MULTISAMPLE_ARRAY , and pname is any sampler state from table
1314    23.23.
1315
1316
1317    Modifications to Section 8.11.2, "Texture Parameter Queries", p. 220
1318
1319    Parameters of a texture object may be queried with the commands
1320
1321        void GetTexParameter{if}v(enum target, enum pname, T *params);
1322        void GetTexParameterI{i ui}v(enum target, enum pname, T *params);
1323        void GetTextureParameter{if}v(uint texture, enum pname, T *params);
1324        void GetTextureParameterI{i ui}v(uint texture, enum pname, T *params);
1325
1326    For GetTexParameter*, the texture object is that bound to <target>. For
1327    GetTextureParameter*, <texture> is the name of the texture object.
1328
1329    The value of texture parameter <pname> for the texture is returned in
1330    <params>.
1331
1332    <target> or the effective target of <texture> must be one of TEXTURE_1D,
1333    TEXTURE_2D, TEXTURE_3D, TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY,
1334    TEXTURE_RECTANGLE, TEXTURE_CUBE_MAP, TEXTURE_CUBE_MAP_ARRAY,
1335    TEXTURE_2D_MULTISAMPLE, or TEXTURE_2D_MULTISAMPLE_ARRAY, indicating the
1336    currently bound one-, two-, or three-dimensional, one- or
1337    two-dimensional array, rectangle, cube map, cube map array,
1338    two-dimensional multisample, or two-dimensional multisample array
1339    texture object.
1340
1341    <pname> must be one of IMAGE_FORMAT_COMPATIBILITY_TYPE,
1342    TEXTURE_IMMUTABLE_FORMAT, TEXTURE_IMMUTABLE_LEVELS, TEXTURE_TARGET,
1343    TEXTURE_VIEW_MIN_LEVEL, TEXTURE_VIEW_NUM_LEVELS, TEXTURE_VIEW_MIN_LAYER,
1344    TEXTURE_VIEW_NUM_LAYERS, or one of the symbolic values in table 8.16.
1345
1346    Querying pname TEXTURE_BORDER_COLOR with GetTex*ParameterIiv or
1347    GetTex*ParameterIuiv returns the border color values as signed integers or
1348    unsigned integers, respectively; otherwise the values are returned as
1349    described in section 2.2.2. If the border color is queried with a type
1350    that does not match the original type with which it was specified, the
1351    result is undefined.
1352
1353    Querying <pname> TEXTURE_TARGET returns the <effective target> of the
1354    texture object. For GetTexParameter*, this is the <target> parameter.
1355    For GetTextureParameter*, it is the target to which <texture> was
1356    initially bound when it was created, or the value of the <target>
1357    parameter to the call to CreateTextures which created the texture.
1358
1359
1360    Errors
1361
1362    Modify existing errors to apply to all forms of the command where
1363    parameters are equivalent.
1364
1365    An INVALID_OPERATION error is generated by GetTextureParameter* if
1366    <texture> is not the name of an existing texture object.
1367
1368    An INVALID_OPERATION error is generated by GetTextureParameter* if the
1369    effective <target> is not one of the texture targets described above.
1370
1371
1372    Modifications to Section 8.11.3, "Texture Level Parameter Queries", p. 220
1373
1374    Parameters of a specified level-of-detail of a texture object may
1375    be queried with the commands
1376
1377
1378        void GetTexLevelParameter{if}v(enum target, int level,
1379                                       enum pname, T *params);
1380        void GetTextureLevelParameter{if}v(uint texture, int level,
1381                                           enum pname, T *params);
1382
1383    For GetTexLevelParameter*, the texture object is that bound to <target>.
1384    For GetTextureLevelParameter*, <texture> is the name of the texture
1385    object.
1386
1387    The value of texture parameter <pname> for level-of-detail <level> of
1388    the texture is returned in <params>. <pname> must be one of the symbolic
1389    values in tables 23.16- 23.17.
1390
1391    The effective target of the texture object must be one of [incorporate
1392    the existing list of valid targets, but remove "one of the cube map face
1393    targets from table 8.18" and "one of the six distinct 2D images making
1394    up the cube map texture object"] ...
1395
1396    For GetTexLevelParameter* only, target may also be one of the cube map
1397    face targets from table 8.18, indicating one of the six distinct
1398    two-dimensional images making up the cube map texture object. Note that
1399    TEXTURE_CUBE_MAP is not a valid target parameter for
1400    GetTexLevelParameter*.
1401
1402    For GetTextureLevelParameter* only, texture may also be a cube map
1403    texture object. In this case the query is always performed for face zero
1404    (the TEXTURE_CUBE_MAP_POSITIVE_X face), since there is no way to
1405    specify another face.
1406
1407    <level> determins which level-of-detail's state is returned...
1408
1409    Errors
1410
1411    Modify existing errors to apply to all forms of the command where
1412    parameters are equivalent.
1413
1414    An INVALID_OPERATION error is generated by GetTextureLevelParameter* if
1415    <texture> is not the name of an existing texture object.
1416
1417    An INVALID_OPERATION error is generated by GetTextureLevelParameter* if
1418    the effective <target> is not one of the targets described above as
1419    valid for the corresponding command.
1420
1421
1422    Modifications to Section 8.11.4, "Texture Image Queries"
1423
1424    (Replace the first paragraph with the following, p. 223)
1425
1426    Texture images may be obtained from a texture object with the commands
1427
1428        void GetTexImage(enum target, int level, enum format,
1429                         enum type, void *pixels);
1430        void GetTextureImage(uint texture, int level, enum format,
1431                             enum type, sizei bufSize, void *pixels);
1432
1433    For GetTexImage, <target> specifies the target to which the texture
1434    object is bound. <target> must be one of TEXTURE_1D, TEXTURE_2D,
1435    TEXTURE_3D, TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP_ARRAY
1436    or TEXTURE_RECTANGLE, indicating a one-, two- or three-dimensional, one-
1437    or two-dimensional array, cube map array or rectangle texture,
1438    respectively, of one of the targets from table 8.18, indicating the
1439    corresponding face of a cube map texture.
1440
1441    For GetTextureImage, <texture> is the name of the texture object
1442    containing the image to be retrieved. In addition to the types of
1443    textures accepted by the Get*TexImage commands, GetTextureImage also
1444    accepts cube map texture objects (with effective <target>
1445    TEXTURE_CUBE_MAP).
1446
1447    <level> is a level-of-detail number, <format> is a pixel format from
1448    table 8.3, and <type> is a pixel type from table 8.2.
1449
1450    For GetTextureImage, <bufSize> is the size of the buffer to receive the
1451    retrieved pixel data. GetTextureImage does not write more than <bufSize>
1452    bytes into <pixels>.
1453
1454    (Modify remaining paragraphs as shown)
1455
1456    These commands obtain component groups ... where the layers are treated
1457    as rows or images. Cube map textures are treated as three-dimensional
1458    images with a depth of 6, where the cube map faces are ordered as image
1459    layers as shown in table 9.2
1460
1461    These groups are then packed and placed ...
1462
1463    For three-dimensional, two-dimensional array, cube map array, and cube
1464    map textures, pixel storage operations are applied as if ...
1465
1466    The row length ...
1467
1468    Errors
1469
1470    Replace references to <lod> by <level>.
1471
1472    An INVALID_OPERATION error is generated by GetTextureImage if <texture>
1473    is not the name of an existing texture object.
1474
1475    An INVALID_ENUM error is generated by GetTexImage if <target> is not one
1476    of TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_1D_ARRAY,
1477    TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP_ARRAY, TEXTURE_RECTANGLE, or one of
1478    the targets from table 8.18.
1479
1480    An INVALID_OPERATION error is generated by GetTextureImage if <target>
1481    is not one of TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_1D_ARRAY,
1482    TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP_ARRAY, TEXTURE_RECTANGLE, or
1483    TEXTURE_CUBE_MAP.
1484
1485    An INVALID_OPERATION error is generated by GetTextureImage if the buffer
1486    size required to store the requested data is greater than <bufSize>
1487
1488
1489    (Replace the introduction of GetCompressedTexImage by the following, p. 225)
1490
1491    Texture images stored in compressed form may be obtained with the
1492    commands
1493
1494        void GetCompressedTexImage(enum target, int level, void *pixels);
1495        void GetCompressedTextureImage(uint texture, int level, sizei bufSize,
1496                                       void *pixels);
1497
1498    For GetCompressedTexImage, the texture is that
1499    which is bound to <target>.
1500    For GetCompressedTextureImage, <texture> is the name of the texture object.
1501
1502    <target>, <level>, <bufSize> and <pixels> are interpreted in the same
1503    manner as the corresponding parameters of GetTexImage and
1504    GetTextureImage.
1505
1506    GetCompressedTexImage writes <n> ubytes of compressed image data to the
1507    pixel pack buffer or client memory pointed to by <pixels>, while
1508    GetCompressedTextureImage writes min(n, bufSize) ubytes. <n> is the
1509    value of TEXTURE_COMPRESSED_IMAGE_SIZE for the texture image. The
1510    compressed image data is formatted according to the definition of the
1511    texture's internal format.
1512
1513    By default the pixel storage modes ...
1514
1515    Errors
1516
1517    An INVALID_OPERATION error is generated by GetCompressedTextureImage if
1518    <texture> is not the name of an existing texture object.
1519
1520    An INVALID_VALUE error is generated if <level> is negative, or greater
1521    than the maximum allowable level.
1522
1523    An INVALID_OPERATION error is generated if the texture image is stored
1524    with an uncompressed internal format.
1525
1526    An INVALID_OPERATION error is generated if a pixel pack buffer object is
1527    bound and packing the texture image into the buffer's memory would
1528    exceed the size of the buffer.
1529
1530    An INVALID_OPERATION error is generated by GetCompressedTextureImage if
1531    the buffer size required to store the requested data is greated than
1532    <bufSize>.
1533
1534
1535    Modifications to Section 8.14.4, "Manual Mipmap Generation"
1536
1537    (Modify the introduction of GenerateMipmap by the following, p. 237)
1538
1539    Mipmaps can be generated manually for a texture object with the commands
1540
1541        void GenerateMipmap(enum target);
1542        void GenerateTextureMipmap(uint texture);
1543
1544    For GenerateMipmap, <target> specifies the target to which the texture
1545    object is bound. For GenerateTextureMipmap, <texture> is the name of the
1546    texture object.
1547
1548    <target> or the effective target of <texture> must be
1549    one of TEXTURE_1D, TEXTURE_2D, TEXTURE_3D,
1550    TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP, or
1551    TEXTURE_CUBE_MAP_ARRAY.
1552
1553    If <target> or the effective target of <texture> is TEXTURE_CUBE_MAP or
1554    TEXTURE_CUBE_MAP_ARRAY, then the texture object must be cube complete or
1555    cube array complete respectively, as defined in section 8.17.
1556
1557    (include the remainder of the description of GenerateMipmap, starting
1558    with "Mipmap generation replaces...")
1559
1560    Errors
1561
1562    An INVALID_ENUM error is generated by GenerateMipmap if <target> is
1563    not one of the valid targets listed above.
1564
1565    An INVALID_OPERATION error is generated by GenerateTextureMipmap if
1566    <texture> is not the name of an existing texture object.
1567
1568    An INVALID_OPERATION error is generated by GenerateTextureMipmap if the
1569    effective <target> is not one of the valid targets listed above.
1570
1571    An INVALID_OPERATION error is generated by GenerateTextureMipmap if the
1572    effective <target> is TEXTURE_CUBE_MAP or TEXTURE_CUBE_MAP_ARRAY, and
1573    the texture object is not cube complete or cube array complete,
1574    respectively.
1575
1576
1577    Modifications to Section 8.19, "Immutable-Format Texture Images"
1578
1579    (Replace the list of "generic" errors generated by these commands,
1580    following the third paragraph of the section)
1581
1582    The TexStorage* commands specify properties of the texture object bound
1583    to the <target> parameter of each command.
1584
1585    The TextureStorage* commands behave similarly to the equivalent
1586    TexStorage* commands, but specify properties of the texture object named
1587    by the <texture> parameter of each command. The effective target of
1588    <texture> must be compatible with the <target> parameter of the
1589    equivalent TexStore* command.
1590
1591
1592    Errors
1593
1594    An INVALID_OPERATION error is generated by TexStorage* if zero is bound
1595    to <target>.
1596
1597    An INVALID_OPERATION error is generated by TextureStorage* if <texture>
1598    is not the name of an existing texture object.
1599
1600    An INVALID_VALUE error is generated if <width>, <height>, <depth> or
1601    <levels> is less than 1, for commands with the corresponding parameters.
1602
1603    An INVALID_ENUM error is generated if <internalformat> is one of the
1604    unsized base internal formats listed in table 8.11.
1605
1606
1607    (Modify the introduction of TexStorage1D as follows, p. 247)
1608
1609    The commands
1610
1611        void TexStorage1D(enum target, sizei levels,
1612                          enum internalformat, sizei width);
1613        void TextureStorage1D(uint texture, sizei levels,
1614                              enum internalformat, sizei width);
1615
1616    specify all the levels of a one-dimensional texture (or, for
1617    TexStorage1D, proxy) at the same time. TexStorage1D is described by the
1618    pseudocode below:
1619
1620    (Include original TexStorage1D pseudocode, p. 247)
1621
1622    (add to the Errors section for TexStorage1D)
1623
1624    Errors
1625
1626    In addition to the generic errors described at the start of this
1627    section,
1628
1629    An INVALID_OPERATION error is generated by TextureStorage1D if
1630    the effective <target> is not TEXTURE_1D.
1631
1632
1633    (Modify the introduction of TexStorage2D as follows, 247)
1634
1635    The commands
1636
1637        void TexStorage2D(enum target, sizei levels, enum internalformat,
1638                          sizei width, sizei height);
1639        void TextureStorage2D(uint texture, sizei levels, enum internalformat,
1640                              sizei width, sizei height);
1641
1642    specify all the levels of a two-dimensional, cube-map, one-dimensional
1643    array or rectangle texture (or, for TexStorage2D, proxy) at the same
1644    time. TexStorage2D is described by the <target>-dependent pseudocode
1645    below:
1646
1647    (Include original TexStorage2D pseudocode, p. 248)
1648
1649    (add to the Errors section for TexStorage2D)
1650
1651    Errors
1652
1653    In addition to the generic errors described at the start of this
1654    section,
1655
1656    An INVALID_OPERATION error is generated by TextureStorage2D if the
1657    effective <target> is not one of those listed above.
1658
1659
1660    (Modify the introduction of TexStorage3D as follows, p. 249)
1661
1662    The commands
1663
1664        void TexStorage3D(enum target, sizei levels, enum internalformat,
1665                          sizei width, sizei height, sizei depth);
1666        void TextureStorage3D(uint texture, sizei levels, enum internalformat,
1667                              sizei width, sizei height, sizei depth);
1668
1669    specify all the levels of a three-dimensional, two-dimensional array
1670    texture or cube-map array texture (or, for TexStorage3D, proxy).
1671    TexStorage3D is described by the <target>-dependent pseudocode below:
1672
1673    (Include original TexStorage3D pseudocode, p. 249)
1674
1675    (add to the Errors section for TexStorage3D)
1676
1677    Errors
1678
1679    In addition to the generic errors described at the start of this
1680    section,
1681
1682    An INVALID_OPERATION error is generated by TextureStorage3D if the
1683    effective <target> is not one of those listed above.
1684
1685
1686    (Modify the introduction of TexStorage2DMultisample as follows, p. 250)
1687
1688    The commands
1689
1690        void TexStorage2DMultisample(enum target, sizei samples,
1691                                     enum internalformat, sizei width,
1692                                     sizei height,
1693                                     boolean fixedsamplelocations);
1694        void TextureStorage2DMultisample(uint texture, sizei samples,
1695                                         enum internalformat, sizei width,
1696                                         sizei height,
1697                                         boolean fixedsamplelocations);
1698
1699    specify a two-dimensional multisample texture (or, for
1700    TexStorage2DMultisample, proxy). For TexStorage2DMultisample, <target>
1701    must be TEXTURE_2D_MULTISAMPLE or PROXY_TEXTURE_2D_MULTISAMPLE. Calling
1702    TexStorage2DMultisample is equivalent to calling TexImage2DMultisample
1703    with the equivalently named parameters set to the same values, except
1704    that the resulting texture has immutable format.
1705
1706    Errors
1707
1708    In addition to the generic errors described at the start of this
1709    section,
1710
1711    An INVALID_OPERATION error is generated by TextureStorage2DMultisample
1712    if the effective <target> is not TEXTURE_2D_MULTISAMPLE.
1713
1714
1715    (Modify the introduction of TexStorage3DMultisample as follows, p. 250)
1716
1717    The commands
1718
1719        void TexStorage3DMultisample(enum target, sizei samples,
1720                                     enum internalformat, sizei width,
1721                                     sizei height, sizei depth,
1722                                     boolean fixedsamplelocations);
1723        void TextureStorage3DMultisample(uint texture, sizei samples,
1724                                         enum internalformat, sizei width,
1725                                         sizei height, sizei depth,
1726                                         boolean fixedsamplelocations);
1727
1728    specify a two-dimensional multisample array texture (or, for
1729    TexStorage3DMultisample, proxy). For TexStorage3DMultisample, <target>
1730    must be TEXTURE_2D_MULTISAMPLE_ARRAY or
1731    PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY.
1732
1733    Calling TexStorage3DMultisample is equivalent to calling
1734    TexImage3DMultisample with the equivalently named parameters set to the
1735    same values, except that the resulting texture has immutable format.
1736
1737    Errors
1738
1739    In addition to the generic errors described at the start of this
1740    section,
1741
1742    An INVALID_OPERATION error is generated by TextureStorage3DMultisample
1743    if the effective <target> is not TEXTURE_2D_MULTISAMPLE_ARRAY.
1744
1745
1746Additions to Chapter 9 of the OpenGL 4.4 (core) Specification (Framebuffers and
1747Framebuffer Objects)
1748
1749    Modifications to Section 9.2, "Binding and Managing Framebuffer Objects"
1750
1751    (Insert the following, after the description of BindFramebuffer, p. 272)
1752
1753    Framebuffer objects may also be created with the command
1754
1755        void CreateFramebuffers(sizei n, uint *framebuffers);
1756
1757    CreateFramebuffers returns <n> previously unused framebuffer names in
1758    <framebuffers>, each representing a new framebuffer object which is a
1759    state vector, comprising all the state and with the same initial values
1760    listed in table 23.24, as well as one set of the state values listed in
1761    table 23.25 for each attachment point of the framebuffer, with the same
1762    initial values.
1763
1764    Errors
1765
1766    An INVALID_VALUE error is generated by CreateFramebuffers if <n> is
1767    negative.
1768
1769
1770    Modifications to Section 9.2.1, "Framebuffer Object Parameters"
1771
1772    (Modify the introduction of FramebufferParameteri as follows, p. 274)
1773
1774    Parameters of a framebuffer object are set using the commands
1775
1776        void FramebufferParameteri(enum target, enum pname, int param);
1777        void NamedFramebufferParameteri(uint framebuffer, enum pname, int param);
1778
1779    For FramebufferParameteri, the framebuffer object is that bound to
1780    <target>, which must be DRAW_FRAMEBUFFER, READ_FRAMEBUFFER, or
1781    FRAMEBUFFER. FRAMEBUFFER is equivalent to DRAW_FRAMEBUFFER. For
1782    NamedFramebufferParameteri, <framebuffer> is the name of the framebuffer
1783    object.
1784
1785    <pname> specifies the parameter of the framebuffer object to set.
1786
1787    When a framebuffer ...
1788
1789    Errors
1790
1791    An INVALID_OPERATION error is generated by NamedFramebufferParameteri if
1792    <framebuffer> is not the name of an existing framebuffer object.
1793
1794
1795    Modifications to Section 9.2.3, "Framebuffer Object Queries"
1796
1797    (Modify the introduction of GetFramebufferParameteriv as follows, p. 277)
1798
1799    Parameters of a framebuffer object may be queried with the commands
1800
1801        void GetFramebufferParameteriv(enum target,
1802                                       enum pname,
1803                                       int *params);
1804        void GetNamedFramebufferParameteriv(uint framebuffer,
1805                                            enum pname,
1806                                            int *params);
1807
1808    For GetFramebufferParameteriv, the framebuffer object is that bound to
1809    <target>, which must be DRAW_FRAMEBUFFER, READ_FRAMEBUFFER, or
1810    FRAMEBUFFER. FRAMEBUFFER is equivalent to DRAW_FRAMEBUFFER. For
1811    GetNamedFramebufferParameteriv, <framebuffer> may be zero, indicating
1812    the default draw framebuffer, or the name of the framebuffer object.
1813
1814    The value of framebuffer parameter <pname> for the framebuffer object is
1815    returned in <params>.
1816
1817    Errors
1818
1819    An INVALID_OPERATION error is generated by
1820    GetNamedFramebufferParameteriv if <framebuffer> is not zero or the name
1821    of an existing framebuffer object.
1822
1823
1824    (Modify the introduction of GetFramebufferAttachmentParameter as
1825    follows, p. 277)
1826
1827    Attachments of a framebuffer object or buffers of a default framebuffer
1828    may be queried with the commands
1829
1830        void GetFramebufferAttachmentParameteriv(enum target,
1831                                                 enum attachment,
1832                                                 enum pname,
1833                                                 int *params);
1834        void GetNamedFramebufferAttachmentParameteriv(uint framebuffer,
1835                                                      enum attachment,
1836                                                      enum pname,
1837                                                      int *params);
1838
1839    For GetFramebufferAttachmentParameteriv, the framebuffer object is that
1840    bound to <target>, which must be DRAW_FRAMEBUFFER, READ_FRAMEBUFFER, or
1841    FRAMEBUFFER. FRAMEBUFFER is equivalent to DRAW_FRAMEBUFFER. For
1842    GetNamedFramebufferAttachmentParameteriv, <framebuffer> is zero or the
1843    name of the framebuffer object. If <framebuffer> is zero, then the
1844    default draw framebuffer is queried.
1845
1846    If a default framebuffer is queried, then <attachment> must be one of
1847    FRONT_LEFT, FRONT_RIGHT, BACK_LEFT, or BACK_RIGHT, identifying a color
1848    buffer; DEPTH, identifying the depth buffer; or STENCIL, identifying the
1849    stencil buffer.
1850
1851    Otherwise, <attachment> must be one of the framebuffer object attachment
1852    points listed in table 9.1
1853
1854    (Retain the remainder of the section, but replace the reference to
1855    "GetFramebufferAttachmentParameteriv" with
1856    "GetNamedFramebufferAttachmentParameteriv or
1857    GetFramebuffferAttachmentParameteriv", p. 278)
1858
1859    Errors
1860
1861    An INVALID_OPERATION error is generated by
1862    GetNamedFramebufferAttachmentParameteriv if <framebuffer> is not zero or
1863    the name of an existing framebuffer object.
1864
1865
1866    Modifications to Section 9.2.4, "Renderbuffer Objects"
1867
1868    (Insert the following after the description of BindRenderbuffer, p. 280)
1869
1870    New renderbuffers may also be created with the command
1871
1872        void CreateRenderbuffers(sizei n, uint *renderbuffers);
1873
1874    CreateRenderbuffers returns <n> previously unused renderbuffer names in
1875    <renderbuffers>, each representing a new renderbuffer object which is a
1876    state vector comprising all the state and with the initial values listed
1877    in table 23.27. The state of each renderbuffer object is as if a name
1878    returned from GenRenderbuffers had been bound to the RENDERBUFFER
1879    target, except that any existing binding to RENDERBUFFER is not
1880    affected.
1881
1882    Errors
1883
1884    An INVALID_VALUE error is generated by CreateRenderbuffers if <n> is
1885    negative.
1886
1887    (Replace the introduction of RenderbufferStorageMultisample with the
1888    following, p. 282)
1889
1890    The data storage, format, dimensions, and number of samples of a
1891    renderbuffer object's image are established with the commands
1892
1893        void RenderbufferStorageMultisample(enum target,
1894                                            sizei samples,
1895                                            enum internalformat,
1896                                            sizei width, sizei height);
1897        void NamedRenderbufferStorageMultisample(uint renderbuffer,
1898                                                 sizei samples,
1899                                                 enum internalformat,
1900                                                 sizei width, sizei height);
1901
1902    For RenderbufferStorageMultisample, the renderbuffer object is that
1903    bound to <target>, which must be RENDERBUFFER. For
1904    NamedRenderbuferStorageMultisample, <renderbuffer> is the name of the
1905    renderbuffer object.
1906
1907    <internalformat> must be color-renderable, depth-renderable, or
1908    stencil-renderable (as defined in section 9.4). <width> and <height> are
1909    the dimensions, in pixels, of the renderbuffer.
1910
1911    (Retain the remainder of the section, but replace further references to
1912    "RenderbufferStorageMultisample" with "*RenderbufferStorageMultisample")
1913
1914    Errors
1915
1916    An INVALID_OPERATION error is generated by
1917    NamedRenderbufferStorageMultisample if <renderbuffer> is not the name of
1918    an existing renderbuffer object.
1919
1920
1921    (Insert the following at the end of Section 9.2.4, p. 283)
1922
1923    The command
1924
1925        void NamedRenderbufferStorage(uint renderbuffer,
1926                                      enum internalformat,
1927                                      sizei width, sizei height);
1928
1929    is equivalent to
1930
1931        NamedRenderbufferStorageMultisample(renderbuffer, 0, internalfomat,
1932                                            width, height);
1933
1934
1935    Modifications to Section 9.2.6, "Renderbuffer Object Queries"
1936
1937    (Replace the introduction of GetRenderbufferParameteriv by the following,
1938    p. 283)
1939
1940    Parameters of a renderbuffer object may be queried with the commands
1941
1942        void GetRenderbufferParameteriv(enum target,
1943                                        enum pname, int *params);
1944        void GetNamedRenderbufferParameteriv(uint renderbuffer,
1945                                         enum pname, int *params);
1946
1947    For GetRenderbufferParameteriv, the renderbuffer object is that bound to
1948    <target>, which must be RENDERBUFFER. For
1949    GetNamedRenderbufferParameteriv, <renderbuffer> is the name of the
1950    renderbuffer object.
1951
1952    The value of renderbuffer parameter <pname> for the renderbuffer object
1953    is returned in <params>. <pname> must be one of the symbolic values...
1954
1955    (Retain the remainder of the section but replace instances of "the
1956    renderbuffer currently bound to <target>" with "the renderbuffer
1957    object", p. 284)
1958
1959    Errors
1960
1961    An INVALID_OPERATION error is generated by GetRenderbufferParameteriv if
1962    zero is bound to <target>.
1963
1964    An INVALID_OPERATION error is generated by
1965    GetNamedRenderbufferParameteriv if <renderbuffer> is not the name of an
1966    existing renderbuffer object.
1967
1968
1969    Modifications to Section 9.2.7, "Attaching Renderbuffer Images to a
1970    Framebuffer"
1971
1972    (Modify the introduction of FramebufferRenderbuffer as follows, p. 284)
1973
1974    A renderbuffer object can be attached as one of the logical buffers of a
1975    framebuffer object with the commands
1976
1977        void FramebufferRenderbuffer(enum target, enum attachment,
1978                                     enum renderbuffertarget,
1979                                     uint renderbuffer);
1980        void NamedFramebufferRenderbuffer(uint framebuffer,
1981                                          enum attachment,
1982                                          enum renderbuffertarget,
1983                                          uint renderbuffer);
1984
1985    For FramebufferRenderbuffer the framebuffer object is that bound to
1986    <target>, which must be DRAW_FRAMEBUFFER, READ_FRAMEBUFFER or
1987    FRAMEBUFFER. FRAMEBUFFER is equivalent to DRAW_FRAMEBUFFER. For
1988    NamedFramebufferRenderbuffer, <framebuffer> is the name of the
1989    framebuffer object.
1990
1991    (Retain the remainder of the section but replace instances of
1992    "FramebufferRenderbuffer" with "*FramebufferRenderbuffer", and of "the
1993    framebuffer bound to <target>" with "the framebuffer object".
1994
1995    Errors
1996
1997    An INVALID_OPERATION error is generated by NamedFramebufferRenderbuffer
1998    if <framebuffer> is not the name of an existing framebuffer object.
1999
2000
2001    Modifications to Section 9.2.8, "Attaching Texture Images to a
2002    Framebuffer"
2003
2004    (Modify the introduction of FramebufferTexture as follows, p. 286)
2005
2006    To render directly into a texture image, a specified level of a texture
2007    object can be attached as one of the logical buffers of a framebuffer
2008    object with the commands
2009
2010        void FramebufferTexture(enum target, enum attachment,
2011                                uint texture, int level);
2012        void NamedFramebufferTexture(uint framebuffer, enum attachment,
2013                                     uint texture, int level);
2014
2015    For FramebufferTexture, the framebuffer object is that bound to
2016    <target>, which must be DRAW_FRAMEBUFFER, READ_FRAMEBUFFER or
2017    FRAMEBUFFER. FRAMEBUFFER is equivalent to DRAW_FRAMEBUFFER. For
2018    NamedFramebufferTexture, <framebuffer> is the name of the framebuffer
2019    object.
2020
2021    <attachment> must be one of the attachment points of the framebuffer
2022    listed in table 9.1.
2023
2024    If <texture> is zero, any image or array of images attached to the
2025    attachment point named by <attachment> is detached. Any additional
2026    parameters (<level>) are ignored when <texture> is zero.
2027
2028    If <texture> is non-zero, the specified mipmap <level> of the texture
2029    object named <texture> is attached to the framebuffer attachment point
2030    named by <attachment>.
2031
2032    If <texture> is the name of a three-dimensional texture, cube map texture,
2033    one- or two-dimensional array texture, cube map array texture, or two-
2034    dimensional multisample array texture, the texture level attached to the
2035    framebuffer attachment point is an array of images, and the framebuffer
2036    attachment is considered layered.
2037
2038    (Retain the remainder of the section.)
2039
2040    Errors
2041
2042    An INVALID_OPERATION error is generated by NamedFramebufferTexture if
2043    <framebuffer> is not the name of an existing framebuffer object.
2044
2045
2046    (Replace the introduction of FramebufferTextureLayer with the following,
2047    p. 288)
2048
2049    A single layer of a three-dimensional or array texture object can be
2050    attached as one of the logical buffers of a framebuffer object with the
2051    commands
2052
2053        void FramebufferTextureLayer(enum target, enum attachment,
2054                                     uint texture,
2055                                     int level, int layer);
2056        void NamedFramebufferTextureLayer(uint framebuffer, enum attachment,
2057                                          uint texture,
2058                                          int level, int layer);
2059
2060    These commands operate identically to the equivalent FramebufferTexture
2061    and NamedFramebufferTexture commands, respectively, except for the
2062    additional <layer> argument which selects a layer of the texture object
2063    to attach.
2064
2065    <layer> specifies the layer of a one- or two-dimensional image within
2066    <texture>, except for cube map and cube map array textures. For cube map
2067    textures, <layer> is translated into a cube map face as described in
2068    table 9.2. For cube map array textures, <layer> is translated into an
2069    array layer and a cube map face as described for layer-face numbers in
2070    section 8.5.3.
2071
2072    If <texture> is a three-dimensional texture, then ...
2073
2074    Errors
2075
2076    In addition to the corresponding errors for FramebufferTexture and
2077    NamedFramebufferTexture when called with the same parameters (other than
2078    <layer>):
2079
2080    An INVALID_OPERATION error is generated by NamedFramebufferTextureLayer
2081    if <framebuffer> is not the name of an existing framebuffer object.
2082
2083    (Remove the final two paragraphs of section 9.2.8, starting "Unlike
2084    FramebufferTexture3D...")
2085
2086
2087    Modifications to Section 9.2.8.1, "Effects of Attaching a Texture Image"
2088
2089    (change all references to FramebufferTexture* to *FramebufferTexture*,
2090    to include the NamedFramebufferTexture* variants)
2091
2092
2093    Modifications to Section 9.4.2, "Whole Framebuffer Completeness"
2094
2095    (Replace the defintion of CheckFramebufferStatus, p. 297)
2096
2097    The status of a framebuffer object or default framebuffer can be queried
2098    with the commands
2099
2100        enum CheckFramebufferStatus(enum target);
2101        enum CheckNamedFramebufferStatus(uint framebuffer, enum target);
2102
2103    For CheckFramebufferStatus, the framebuffer object is that bound to
2104    <target>. For CheckNamedFramebufferStatus, <framebuffer> is zero or the
2105    name of the framebuffer object.
2106
2107    <target> must be DRAW_FRAMEBUFFER, READ_FRAMEBUFFER or FRAMEBUFFER.
2108    FRAMEBUFFER is equivalent to DRAW_FRAMEBUFFER.
2109
2110    If <framebuffer> is zero, then the status of the default read or draw
2111    framebuffer (as determined by <target>) is returned.
2112
2113    A value is returned that identifies whether or not the framebuffer
2114    object or default framebuffer is complete when treated as a read or draw
2115    framebuffer (as determined by <target>). If the framebuffer object is
2116    complete, then FRAMEBUFFER_COMPLETE is returned. Otherwise, the value
2117    returned is one of the error codes defined at the start of section 9.4.2
2118    identifying one of the rules of framebuffer completeness that is
2119    violated.
2120
2121    Errors
2122
2123    If CheckFramebufferStatus generates an error, zero is returned.
2124
2125    An INVALID_ENUM error is generated by CheckFramebufferStatus and
2126    CheckNamedFramebufferStatus if <target> is not DRAW_FRAMEBUFFER,
2127    READ_FRAMEBUFFER or FRAMEBUFFER.
2128
2129    An INVALID_OPERATION error is generated by CheckNamedFramebufferStatus
2130    if <framebuffer> is not zero or the name of an existing framebuffer
2131    object.
2132
2133
2134Additions to Chapter 10 of the OpenGL 4.4 (core) Specification (Vertex
2135Specification and Drawing Commands)
2136
2137    Modifications to Section 10.3, "Vertex Arrays"
2138
2139    (Insert the following after the introduction of vertex arrays, first
2140    paragraph of Section 10.3, p. 314)
2141
2142    All of the state required to represent the vertex arrays is
2143    stored in a vertex array object (VAO).
2144
2145
2146    (Insert all of Section 10.4, "Vertex Array Objects" as new section 10.3.1,
2147    renumber subsequent sections and delete the original section 10.4, p. 314)
2148
2149    (Insert the following after the description of BindVertexArray, p. 327)
2150
2151    Vertex array objects may also be created with the command
2152
2153        void CreateVertexArrays(sizei n, uint *arrays);
2154
2155    CreateVertexArrays returns <n> previously unused vertex array object
2156    names in <arrays>, each representing a state vector comprising all the
2157    state and with the same initial values listed in tables 23.3 and 23.4.
2158
2159    Errors
2160
2161    An INVALID_VALUE error is generated by CreateVertexArrays if <n> is
2162    negative.
2163
2164
2165    (Insert the following after the description of IsVertexArray, p. 327)
2166
2167    To bind a buffer object to the element array buffer bind point of a
2168    vertex array object, use the command
2169
2170        void VertexArrayElementBuffer(uint vaobj, uint buffer);
2171
2172    <vaobj> is
2173      [compatibility profile:
2174       zero, indicating the default vertex array object, or]
2175    the name of the vertex array object, and <buffer> is zero or the name of
2176    the buffer object. If <buffer> is zero, any existing element array
2177    buffer binding to <vaobj> is removed.
2178
2179    Errors
2180
2181    An INVALID_OPERATION error is generated by VertexArrayElementBuffer if
2182    <vaobj> is not
2183      [compatibility profile: zero or]
2184    the name of an existing vertex array object.
2185
2186    An INVALID_OPERATION error is generated if <buffer> is not zero or the
2187    name of an existing buffer object.
2188
2189
2190    (Modify the introduction of EnableVertexAttribArray and
2191    DisableVertexAttribArray with the following, p. 320)
2192
2193    An individual generic vertex attribute array in a vertex array object
2194    is enabled with the commands
2195
2196        void EnableVertexAttribArray(uint index);
2197        void EnableVertexArrayAttrib(uint vaobj, uint index);
2198
2199    and is disabled with the commands
2200
2201        void DisableVertexAttribArray(uint index);
2202        void DisableVertexArrayAttrib(uint vaobj, uint index);
2203
2204    <index> is the generic vertex attribute array to enable or disable. For
2205    EnableVertexAttribArray and DisableVertexAttribArray, the vertex array
2206    object is the currently bound vertex array object. For
2207    EnableVertexArrayAttrib and DisableVertexArrayAttrib, <vaobj> is
2208      [compatibility profile:
2209       zero, indicating the default vertex array object, or]
2210    the name of the vertex array object.
2211
2212    Errors
2213
2214    An INVALID_OPERATION error is generated by EnableVertexAttribArray and
2215    DisableVertexAttribArray if no vertex array object is bound.
2216
2217    An INVALID_OPERATION error is generated by EnableVertexArrayAttrib and
2218    DisableVertexArrayAttrib if <vaobj> is not
2219      [compatibility profile: zero or]
2220    the name of an existing vertex array object.
2221
2222    An INVALID_VALUE error is generated if <index> is greater than or equal
2223    to the value of MAX_VERTEX_ATTRIBS.
2224
2225
2226    Modifications to Subsection 10.3.2 (which was previously 10.3.1),
2227    "Specifying Arrays for Generic Vertex Attributes"
2228
2229    (Replace the introduction of the subsection with the following, p. 314)
2230
2231    To specify the organization of arrays storing generic vertex attributes
2232    of a vertex array object, use the commands
2233
2234        void VertexAttribFormat(uint attribindex, int size,
2235                                enum type, boolean normalized,
2236                                uint relativeoffset);
2237        void VertexAttribIFormat(uint attribindex, int size,
2238                                 enum type, uint relativeoffset);
2239        void VertexAttribLFormat(uint attribindex, int size,
2240                                 enum type, uint relativeoffset);
2241        void VertexArrayAttribFormat(uint vaobj, uint attribindex, int size,
2242                                     enum type, boolean normalized,
2243                                     uint relativeoffset);
2244        void VertexArrayAttribIFormat(uint vaobj, uint attribindex, int size,
2245                                      enum type, uint relativeoffset);
2246        void VertexArrayAttribLFormat(uint vaobj, uint attribindex, int size,
2247                                      enum type, uint relativeoffset);
2248
2249    For VertexAttrib*Format, the vertex array object is that bound to
2250    VERTEX_ARRAY_BINDING. For VertexArrayAttrib*Format, <vaobj> is
2251      [compatibility profile:
2252       zero, indicating the default vertex array object, or]
2253    the name of the vertex array object.
2254
2255    (Retain remainder of language.)
2256
2257    Errors
2258
2259    An INVALID_OPERATION error is generated by VertexArrayAttrib*Format if
2260    <vaobj> is not
2261      [compatibility profile: zero or]
2262    the name of an existing vertex array object.
2263
2264
2265    (Modify the introduction of BindVertexBuffer with the following, p. 317)
2266
2267    The source of data for a generic vertex attribute may be determined by
2268    attaching a buffer object to a vertex array object with the commands
2269
2270        void BindVertexBuffer(uint bindingindex, uint buffer,
2271                              intptr offset, sizei stride);
2272        void VertexArrayVertexBuffer(uint vaobj, uint bindingindex,
2273                                     uint buffer, intptr offset,
2274                                     sizei stride);
2275
2276    For BindVertexBuffer, the vertex array object is the currently bound
2277    vertex array object. For VertexArrayVertexBuffer, <vaobj> is
2278      [compatibility profile:
2279       zero, indicating the default vertex array object, or]
2280    the name of the vertex array object.
2281
2282    <buffer> is either zero or
2283      [compatibility profile: an unused name.
2284       core profile: a name returned by GenBuffers or CreateBuffers.]
2285
2286    If <buffer> is zero, any buffer object attached to <bindingindex> is
2287    detached.
2288
2289    If <buffer> is not the name of an existing buffer object, the GL first
2290    creates a new state vector, initialized with a zero-sized memory buffer
2291    and comprising all the state and with the same initial values listed in
2292    table 6.2, just as for BindBuffer. <buffer> is then attached to the
2293    specified <bindingindex> of the vertex array object.
2294
2295    When sourcing vertex data from the buffer object, <offset> specifies the
2296    offset in basic machine units of the first element in the vertex buffer.
2297    Pointers to the <i>th and <i+1>st elements of the array differ by
2298    <stride> basic machine units, the pointer to the <i+1>st element being
2299    greater.
2300
2301    If the operation is successful no change is made to the state of the
2302    buffer object, and any previous attachment to <bindingindex> is broken.
2303
2304    Errors
2305
2306      [core profile only:
2307    An INVALID_OPERATION error is generated by BindVertexBuffer if no vertex
2308    array object is bound.
2309
2310    An INVALID_OPERATION error is generated if <buffer> is not zero or a
2311    name returned from a previous call to GenBuffers or CreateBuffers, or if
2312    such a name has since been deleted with DeleteBuffers.
2313      ]
2314
2315    An INVALID_OPERATION error is generated by VertexArrayVertexBuffer if
2316    <vaobj> is not
2317      [compatibility profile: zero or]
2318    the name of an existing vertex array object.
2319
2320    An INVALID_VALUE error is generated if <bindingindex> is greater than or
2321    equal to the value of MAX_VERTEX_ATTRIB_BINDINGS.
2322
2323    An INVALID_VALUE error is generated if <stride> or <offset> is negative,
2324    or if <stride> is greater than the value of MAX_VERTEX_ATTRIB_STRIDE.
2325
2326
2327    The source of data for multiple vertex attributes may be determined by
2328    attaching multiple existing buffer objects to a vertex array object with
2329    the commands
2330
2331        void BindVertexBuffers(uint first, sizei count,
2332                               const uint *buffers,
2333                               const intptr *offsets,
2334                               const sizei *strides);
2335        void VertexArrayVertexBuffers(uint vaobj, uint first, sizei count,
2336                                      const uint *buffers,
2337                                      const intptr *offsets,
2338                                      const sizei *strides);
2339
2340    For BindVertexBuffers, the vertex array object is the currently bound
2341    vertex array object. For VertexArrayVertexBuffers, <vaobj> is
2342      [compatibility profile:
2343       zero, indicating the default vertex array object, or]
2344    the name of the vertex array object.
2345
2346    <count> existing buffer objects are attached to vertex buffer binding
2347    points numbered <first> through <first> + <count> - 1. ...
2348
2349    BindVertexBuffers is equivalent (assuming no errors are generated) to
2350
2351    (Retain pseudocode example)
2352
2353    except the buffers  will not be created if they do not exist.
2354
2355    VertexArrayVertexBuffers is equivalent to the pseudocode above, but
2356    replacing BindVertexBuffer(args) with VertexArrayVertexBuffers(vaobj,
2357    args).
2358
2359    The values specified ...
2360
2361    Errors
2362
2363      [core profile only:
2364    An INVALID_OPERATION error is generated by BindVertexBuffers if no
2365    vertex array object is bound.
2366      ]
2367
2368    An INVALID_OPERATION error is generated by VertexArrayVertexBuffer if
2369    <vaobj> is not
2370      [compatibility profile: zero or]
2371    the name of an existing vertex array object.
2372
2373    (Retain existing list of errors)
2374
2375
2376    (Modify the introduction of VertexAttribBinding with the following, p. 340)
2377
2378    The association between a vertex attribute and the vertex buffer binding
2379    used by that attribute is set by the commands
2380
2381        void VertexAttribBinding(uint attribindex, uint bindingindex);
2382        void VertexArrayAttribBinding(uint vaobj, uint attribindex,
2383                                      uint bindingindex);
2384
2385    For VertexAttribBinding, the vertex array object is the currently bound
2386    vertex array object. For VertexArrayAttribBinding, <vaobj> is
2387      [compatibility profile:
2388       zero, indicating the default vertex array object, or]
2389    the name of the vertex array object.
2390
2391    Errors
2392
2393    An INVALID_OPERATION error is generated by VertexArrayAttribBinding if
2394    <vaobj> is not
2395      [compatibility profile: zero or]
2396    the name of an existing vertex array object.
2397
2398
2399    Modifications to Subsection 10.3.3, "Vertex Attribute Divisors"
2400
2401    (Replace the description of VertexBindingDivisor, p. 320)
2402
2403    The divisor value for attributes taken from a target vertex array object
2404    is set with the commands
2405
2406        void VertexBindingDivisor(uint bindingindex, uint divisor);
2407        void VertexArrayBindingDivisor(uint vaobj, uint bindingindex,
2408                                       uint divisor);
2409
2410    For VertexBindingDivisor, the vertex array object is the currently bound
2411    vertex array object. For VertexArrayBindingDivisor, <vaobj> is
2412      [compatibility profile:
2413       zero, indicating the default vertex array object, or]
2414    the name of the vertex array object. These commands set the divisor for
2415    the buffer bound to the specified <bindingindex> of the vertex array
2416    object to <divisor>.
2417
2418    Errors
2419
2420    An INVALID_OPERATION error is generated by VertexArrayBindingDivisor if
2421    <vaobj> is not
2422      [compatibility profile: zero or]
2423    the name of an existing vertex array object.
2424
2425    An INVALID_VALUE error is generated if <bindingindex> is greater than or
2426    equal to the value of MAX_VERTEX_ATTRIB_BINDINGS.
2427
2428
2429    Modifications to Section 10.4, "Vertex Array Objects"
2430
2431    (Move this section to subsection 10.3.1 and delete Section 10.4,
2432    renumber subsequent section, p. 325)
2433
2434    Modifications to Section 10.5 (was 10.6), "Vertex Array and Vertex Array
2435    Object Queries"
2436
2437    (Insert the following at the start of the section, p. 338)
2438
2439    To query parameters of a vertex array object, use the command
2440
2441        void GetVertexArrayiv(uint vaobj, enum pname, int *param);
2442
2443    <vaobj> is
2444      [compatibility profile:
2445       zero, indicating the default vertex array object, or]
2446    the name of the vertex array object. The value of parameter <pname> for
2447    attribute <index> of <vaobj> is returned in <param>. <pname> must be
2448    ELEMENT_ARRAY_BUFFER_BINDING.
2449
2450    Errors
2451
2452    An INVALID_OPERATION error is generated if <vaobj> is not
2453      [compatibility profile: zero or]
2454    the name of an existing vertex array object.
2455
2456    An INVALID_ENUM error is generated if <pname> is not
2457    ELEMENT_ARRAY_BUFFER_BINDING.
2458
2459
2460    To query parameters of an attribute of a vertex array object, use
2461    the commands
2462
2463        void GetVertexArrayIndexediv(uint vaobj,
2464                                     uint index,
2465                                     enum pname,
2466                                     int *param);
2467        void GetVertexArrayIndexed64iv(uint vaobj,
2468                                       uint index,
2469                                       enum pname,
2470                                       int64 *param);
2471
2472    <vaobj> is
2473      [compatibility profile:
2474       zero, indicating the default vertex array object, or]
2475    the name of the vertex array object. The value of parameter <pname> for
2476    attribute <index> of <vaobj> is returned in <param>.
2477
2478    For GetVertexArrayIndexediv, <pname> must be one of
2479    VERTEX_ATTRIB_ARRAY_ENABLED, VERTEX_ATTRIB_ARRAY_SIZE,
2480    VERTEX_ATTRIB_ARRAY_STRIDE, VERTEX_ATTRIB_ARRAY_TYPE,
2481    VERTEX_ATTRIB_ARRAY_NORMALIZED, VERTEX_ATTRIB_ARRAY_INTEGER,
2482    VERTEX_ATTRIB_ARRAY_LONG, VERTEX_ATTRIB_ARRAY_DIVISOR, or
2483    VERTEX_ATTRIB_RELATIVE_OFFSET. For GetVertexArrayIndexed64iv, <pname>
2484    must be VERTEX_BINDING_OFFSET.
2485
2486    Errors
2487
2488    An INVALID_OPERATION error is generated if <vaobj> is not
2489      [compatibility profile: zero or]
2490    the name of an existing vertex array object.
2491
2492    An INVALID_VALUE error is generated if <index> is greater than or equal
2493    to the value of MAX_VERTEX_ATTRIBS.
2494
2495    An INVALID_ENUM error is generated if <pname> is not one of the valid
2496    values listed above for the corresponding command.
2497
2498
2499Additions to Chapter 13 of the OpenGL 4.4 (core) Specification (Fixed-Function
2500Vertex Post-Processing)
2501
2502    Modifications to Section 13.2.2, "Transform Feedback Primitive Capture"
2503
2504    (Insert the following after the description of BindTransformFeedback, p.
2505    398)
2506
2507    New transform feedback objects may also be created with the command
2508
2509        void CreateTransformFeedbacks(sizei n, uint *ids);
2510
2511    CreateTransformFeedbacks returns <n> previously unused transform
2512    feedback object names in <ids>, each representing a new state vector,
2513    comprising the state and with all the same initial values listed in
2514    table 23.48.
2515
2516    Errors
2517
2518    An INVALID_VALUE error is generated by CreateTransformFeedbacks if <n>
2519    is negative.
2520
2521
2522    (Replace the paragraph beginning with "Regions of buffer objects are
2523    bound as ..." after the description of ResumeTransformFeedback, p. 400)
2524
2525    Regions of buffer objects are bound as targets of the currently bound
2526    transform feedback object by calling one of the BindBuffer* commands
2527    (see sections 6.1 and 6.2) with <target> set to
2528    TRANSFORM_FEEDBACK_BUFFER. Alternatively, regions of buffer objects may
2529    be bound directly to a transform feedback object with the commands
2530
2531        void TransformFeedbackBufferRange(uint xfb, uint index,
2532                                          uint buffer, intptr offset,
2533                                          sizeiptr size);
2534        void TransformFeedbackBufferBase(uint xfb, uint index, uint buffer);
2535
2536    <xfb> must be zero or the name of an existing transform feedback object,
2537    and <buffer> must be the name of an existing buffer object.
2538    TransformFeedbackBufferRange and TransformFeedbackBufferBase behave
2539    similarly to BindBufferRange and BindBufferBase, respectively, except
2540    that the target of the operation is <xfb>, and they do not affect any
2541    binding to the generic TRANSFORM_FEEDBACK_BUFFER target.
2542
2543    Errors
2544
2545    An INVALID_OPERATION error is generated if <xfb> is not zero or the name
2546    of an existing transform feedback object.
2547
2548    An INVALID_VALUE error is generated if <buffer> is not zero or the name
2549    of an existing buffer object.
2550
2551    An INVALID_VALUE error is generated if <index> is greater than or equal
2552    to the number of binding points for transform feedback, as described in
2553    section 6.7.1.
2554
2555    An INVALID_VALUE error is generated by TransformFeedbackBufferRange if
2556    <offset> is negative.
2557
2558    An INVALID_VALUE error is generated by TransformFeedbackBufferRange if
2559    <size> is less than or equal to zero.
2560
2561    An INVALID_VALUE error is generated by TransformFeedbackBufferRange if
2562    <offset> or <size> do not satisfy the constraints described for those
2563    parameters for transform feedback array bindings, as described in
2564    section 6.7.1.
2565
2566
2567Additions to Chapter 17 of the OpenGL 4.4 (core) Specification (Writing
2568Fragments and Samples to the Framebuffer)
2569
2570    Modifications to Section 17.4.1, "Selecting Buffers for Writing"
2571
2572    (Modify the introduction and description of DrawBuffer with the following,
2573    p. 467)
2574
2575    The first such operation is controlling the color buffers into which each
2576    of the fragment color values is written. This is accomplished with one of
2577    DrawBuffer, NamedFramebufferDrawBuffer, DrawBuffers or
2578    NamedFramebufferDrawBuffers.
2579
2580    The set of buffers of a framebuffer object to which fragment color zero
2581    is written is controlled with the commands
2582
2583        void DrawBuffer(enum buf);
2584        void NamedFramebufferDrawBuffer(uint framebuffer, enum buf);
2585
2586    For DrawBuffer, the framebuffer object is that bound to the
2587    DRAW_FRAMEBUFFER binding. For NamedFramebufferDrawBuffer, <framebuffer>
2588    is zero or the name of a framebuffer object. If <framebuffer> is zero,
2589    then the default framebuffer is affected.
2590
2591    Errors
2592
2593    An INVALID_OPERATION error is generated by NamedFramebufferDrawBuffer if
2594    <framebuffer> is not zero or the name of an existing framebuffer object.
2595
2596    An INVALID_OPERATION error is generated if the default framebuffer is
2597    affected and <buf> is a value (other than NONE) that does not indicate
2598    one of the color buffers allocated to the default framebuffer.
2599
2600    An INVALID_OPERATION error is generated if a framebuffer object is
2601    affected and <buf> is one of the constants from table 17.4 (other than
2602    NONE), or COLOR_ATTACHMENT<m> and <m> is greater than or equal to the
2603    value of MAX_COLOR_ATTACHMENTS.
2604
2605
2606    (Modify the introduction and description of DrawBuffers with the following,
2607    p. 469)
2608
2609    The set of buffers of a framebuffer object to which all fragment colors
2610    are written is controlled with the commands
2611
2612        void DrawBuffers(sizei n, const enum *bufs);
2613        void NamedFramebufferDrawBuffers(uint framebuffer, sizei n,
2614                                    const enum *bufs);
2615
2616    For DrawBuffer, the framebuffer object is that bound to the
2617    DRAW_FRAMEBUFFER binding. For NamedFramebufferDrawBuffer, <framebuffer>
2618    is zero or the name of a framebuffer object. If <framebuffer> is zero,
2619    then the default framebuffer is affected.
2620
2621    (Modify the language in the following paragraphs referring to
2622    "DRAW_FRAMEBUFFER_BINDING" to read "DRAW_FRAMEBUFFER_BINDING or
2623    <framebuffer>", p. 469)
2624
2625    (Modify the sentences beginning with "If the GL is bound to" to read "If
2626    the referenced framebuffer is", p. 469)
2627
2628    Errors
2629
2630    An INVALID_OPERATION error is generated by NamedFramebufferDrawBuffers
2631    if <framebuffer> is not zero or the name of an existing framebuffer
2632    object.
2633
2634    An INVALID_OPERATION error is generated if the default framebuffer is
2635    affected and any value in <bufs> is a constant (other than NONE or BACK)
2636    that does not indicate one of the color buffers allocated to the default
2637    framebuffer.
2638
2639    An INVALID_OPERATION error is generated if a framebuffer object is
2640    affected and any value in <bufs> is a constant from table 17.6, or
2641    COLOR_ATTACHMENT<m> and <m> is greater than or equal to the value of
2642    MAX_COLOR_ATTACHMENTS.
2643
2644
2645    Modifications in Section 17.4.3.1, "Clearing Individual Buffers".
2646
2647    (Modify the introduction of ClearBuffer{if ui}v with the following, p. 474)
2648
2649    Individual buffers of a framebuffer object may be cleared with the
2650    commands
2651
2652        void ClearBuffer{if ui}v(enum buffer, int drawbuffer, const T* value);
2653        void ClearNamedFramebuffer{if ui}v(uint framebuffer, enum buffer,
2654                                           int drawbuffer, const T* value);
2655
2656    For ClearBuffer*, the framebuffer object is that bound to the
2657    DRAW_FRAMEBUFFER binding. For ClearNamedFramebuffer*, <framebuffer> is
2658    zero or the name of a framebuffer object. If <framebuffer> is zero, then
2659    the default framebuffer is affected.
2660
2661    <buffer> and <drawbuffer> identify a buffer to clear, and <value>
2662    specifies the values to clear it to. The *fv, *iv, and *uiv forms of
2663    these commands should be used to clear fixed- and floating-point, signed
2664    integer, and unsigned integer color buffers respectively.
2665
2666    (Retain remainder of section, but insert references to ClearFramebuffer*
2667    wherever there are additional references to ClearBuffer*, p. 474-475)
2668
2669    (Modify the introduction of ClearBufferfi with the following, p. 475)
2670
2671    Both depth and stencil buffers of a framebuffer object may be cleared
2672    with the commands
2673
2674        void ClearBufferfi(enum buffer, int drawbuffer, float depth, int stencil);
2675        void ClearNamedFramebufferfi(uint framebuffer, enum buffer, int drawbuffer,
2676                                     float depth, int stencil);
2677
2678    For ClearBufferfi, the framebuffer object is that bound to the
2679    DRAW_FRAMEBUFFER binding. For ClearNamedFramebufferfi, <framebuffer> is
2680    zero or the name of a framebuffer object. If <framebuffer> is zero, then
2681    the default framebuffer is affected.
2682
2683    <buffer> must be DEPTH_STENCIL ...
2684
2685    Errors
2686
2687    An INVALID_OPERATION error is generated by ClearNamedFramebuffer* if
2688    <framebuffer> is not zero or the name of an existing framebuffer object.
2689
2690
2691    Modifications in Section 17.4.4, "Invalidating Framebuffer Contents"
2692
2693    (Modify the introduction of InvalidateSubFramebuffer as following, p. 476)
2694
2695    To signal that the GL need not preserve all contents of a framebuffer
2696    object (invalidating portions of every pixel or a subregion of pixels),
2697    use the commands
2698
2699        void InvalidateSubFramebuffer(enum target, sizei numAttachments,
2700                                      const enum *attachments, inx x,
2701                                      int y, sizei width, sizei height);
2702        void InvalidateNamedFramebufferSubData(uint framebuffer,
2703                                               sizei numAttachments,
2704                                               const enum *attachments,
2705                                               int x, int y,
2706                                               sizei width, sizei height);
2707
2708    For InvalidateSubFramebuffer, the framebuffer object is that bound to
2709    <target>, which must be DRAW_FRAMEBUFFER, READ_FRAMEBUFFER or
2710    FRAMEBUFFER. FRAMEBUFFER is equivalent to DRAW_FRAMEBUFFER. For
2711    InvalidateNamedFramebufferSubData, <framebuffer> is the name of the
2712    framebuffer object. If <framebuffer> is zero, the default draw
2713    framebuffer is affected.
2714
2715    (Retain the remainder of the language)
2716
2717    Errors
2718
2719    An INVALID_OPERATION error is generated by
2720    InvalidateNamedFramebufferSubData if <framebuffer> is not zero or the
2721    name of an existing framebuffer object.
2722
2723
2724    (Modify the introduction of InvalidateFramebuffer with the following,
2725    p. 477)
2726
2727    The commands
2728
2729        void InvalidateFramebuffer(enum target, sizei numAttachments,
2730                                   const enum *attachments);
2731        void InvalidateNamedFramebufferData(uint framebuffer,
2732                                            sizei numAttachments,
2733                                            const enum *attachments);
2734
2735    are equivalent to
2736
2737        InvalidateSubFramebuffer(target, numAttachments, attachments,
2738                                 0, 0, vw, vh);
2739
2740    and
2741
2742        InvalidateNamedFramebufferSubData(framebuffer, numAttachments,
2743                                          attachments, 0, 0, vw, vh);
2744
2745    respectively, where <vw> and <vh> are equal to the maximum viewport width
2746    and height, respectively, obtained by querying MAX_VIEWPORT_DIMS.
2747
2748Additions to Chapter 18 of the OpenGL 4.4 (core) Specification (Reading and
2749Copying Pixels)
2750
2751    Modifications in Section 18.2.1 "Selecting Buffers for Reading"
2752
2753    (Modify the introduction of ReadBuffer with the following, p. 478)
2754
2755    When reading pixels from a color buffer of a framebuffer object, the
2756    buffer selected for reading is termed the <read buffer>, and is
2757    controlled with the commands
2758
2759        void ReadBuffer(enum src);
2760        void NamedFramebufferReadBuffer(uint framebuffer, enum src);
2761
2762    For ReadBuffer, the framebuffer object is that bound to
2763    READ_FRAMEBUFFER. For NamedFramebufferReadBuffer, <framebuffer> is zero
2764    or the name of the framebuffer object. If <framebuffer> is zero, the
2765    default read framebuffer is affected.
2766
2767    If the default framebuffer is affected (see chapter 9), <src> must be
2768    one of the values listed in table 17.4 ...
2769
2770    If a framebuffer object is affected, <src> must be one of the values
2771    listed in table 17.5 ...
2772
2773    (Retain the remainder of this section)
2774
2775    Errors
2776
2777    An INVALID_OPERATION error is generated by NamedFramebufferReadBuffer if
2778    <framebuffer> is not zero or the name of an existing framebuffer object.
2779
2780    An INVALID_OPERATION error is generated if the default framebuffer is
2781    affected, and <src> is a value (other than NONE) that does not indicate
2782    any of the color buffers allocated to the default framebuffer.
2783
2784    An INVALID_OPERATION error is generated if a framebuffer object is
2785    affected, <src> is one of the constants from table 17.4 (other than
2786    NONE, or COLOR_ATTACHMENTm where m is greater than or equal to the value
2787    of MAX_COLOR_ATTACHMENTS.
2788
2789
2790
2791    Modifications in Section 18.3.1 "Blitting Pixel Rectangles"
2792
2793    (Modify the introduction of BlitFramebuffer with the following, p. 487)
2794
2795    To transfer a rectangle of pixel values from one region of a source
2796    framebuffer to another region of a destination framebuffer, use the
2797    commands The commands
2798
2799        void BlitFramebuffer(int srcX0, int srcY0,
2800                             int srcX1, int srcY1,
2801                             int dstX0, int dstY0,
2802                             int dstX1, int dstY1,
2803                             bitfield mask, enum filter);
2804        void BlitNamedFramebuffer(uint readFramebuffer, uint drawFramebuffer,
2805                                  int srcX0, int srcY0,
2806                                  int srcX1, int srcY1,
2807                                  int dstX0, int dstY0,
2808                                  int dstX1, int dstY1,
2809                                  bitfield mask, enum filter);
2810
2811    For BlitFramebuffer, the source and destination framebuffers are those
2812    bound to READ_FRAMEBUFFER and DRAW_FRAMEBUFFER respectively. For
2813    BlitNamedFramebuffer, <readFramebuffer> and <drawFramebuffer> are the
2814    names of the source and destination framebuffers respectively.
2815
2816    If no framebuffer is bound to READ_FRAMEBUFFER or DRAW_FRAMEBUFFER (for
2817    BlitFramebuffer), or if <readFramebuffer> or <drawFramebuffer> is zero
2818    (for BlitNamedFramebuffer), then the default read or draw framebuffer is
2819    used as the corresponding source or destination framebuffer,
2820    respectively.
2821
2822    <mask> is zero or the bitwise OR ...
2823
2824    (Retain the remainder of this section)
2825
2826    Errors
2827
2828    An INVALID_OPERATION error is generated by BlitNamedFramebuffer if
2829    <readFramebuffer> or <drawFramebuffer> is not zero or the name of an
2830    existing framebuffer object.
2831
2832
2833Additions to Chapter 22 of the OpenGL 4.4 (core) specification, "Context State
2834Queries"
2835
2836    (Add Subsection 22.4, "Transform Feedback State Queries", p. 527)
2837
2838    State of the currently bound transform feedback object may be queried by
2839    calling GetIntegerv, GetIntegeri_v, GetInteger64i_v, GetBooleanv, or
2840    other simple query functions with <pname> set to one of the tokens
2841    listed in table 23.48.
2842
2843    Alternatively, the state of a transform feedback object may be queried
2844    with the commands
2845
2846        void GetTransformFeedbackiv(uint xfb, enum pname, int *param);
2847
2848        void GetTransformFeedbacki_v(uint xfb, enum pname, uint index,
2849                                     int *param);
2850
2851        void GetTransformFeedbacki64_v(uint xfb, enum pname, uint index,
2852                                       int64 *param);
2853
2854    <xfb> must be zero, indicating the default transform feedback object, or
2855    the name of an existing transform feedback object. <pname> must be one
2856    of the tokens listed in table 23.48, depending on the command name as
2857    shown in the errors section below. For indexed state, <index> is the
2858    index of the transform feedback stream. <param> is the address of a
2859    variable to receive the result of the query.
2860
2861    Errors
2862
2863    An INVALID_OPERATION error is generated by GetTransformFeedbackiv,
2864    GetTransformFeedbacki_v and GetTransformFeedbacki64_v if <xfb> is not
2865    zero or the name of an existing transform feedback object.
2866
2867    An INVALID_ENUM error is generated by GetTransformFeedbackiv if <pname>
2868    is not TRANSFORM_FEEDBACK_PAUSED or TRANSFORM_FEEDBACK_ACTIVE.
2869
2870    An INVALID_ENUM error is generated by GetTransformFeedbacki_v if <pname>
2871    is not TRANSFORM_FEEDBACK_BUFFER_BINDING.
2872
2873    An INVALID_ENUM error is generated by GetTransformFeedbacki64_v if
2874    <pname> is not TRANSFORM_FEEDBACK_BUFFER_START or
2875    TRANSFORM_FEEDBACK_BUFFER_SIZE.
2876
2877    An INVALID_VALID error is generated by GetTransformFeedbacki_v and
2878    GetTransformFeedbacki64_v if <index> is greater than or equal to the
2879    number of binding points for transform feedback, as described in section
2880    6.7.1.
2881
2882
2883    (Add Subsection 22.5, "Indexed Binding State Queries", p. 527)
2884
2885    The name of the texture object bound to the active texture unit may be
2886    queried by calling GetIntegerv with <pname> TEXTURE_BINDING_1D,
2887    TEXTURE_BINDING_1D_ARRAY, TEXTURE_BINDING_2D, TEXTURE_BINDING_2D_ARRAY,
2888    TEXTURE_BINDING_2D_MULTISAMPLE, TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY,
2889    TEXTURE_BINDING_3D, TEXTURE_BINDING_BUFFER, TEXTURE_BINDING_CUBE_MAP,
2890    TEXTURE_BINDING_CUBE_MAP_ARRAY, or TEXTURE_BINDING_RECTANGLE.
2891    Likewise, the current sampler bound to the active
2892    texture unit may be queried by calling GetIntegerv with <pname>
2893    SAMPLER_BINDING.
2894
2895    To query the bound texture or sampler object bound to a specific texture
2896    unit without changing the active texture selector, call GetIntegeri_v
2897    with one of the valid <pname>s listed above, and with <index> set to the
2898    zero-based texture unit index to be queried.
2899
2900Additions to the AGL/GLX/WGL Specifications
2901
2902    TBD.
2903
2904GLX Protocol
2905
2906    TBD.
2907
2908New State
2909
2910    Append to Table 23.15, "Textures (state per texture object)"
2911
2912    +-----------------------------------+-------+------------------------+---------------------+------------------------------------+---------+
2913    | Get Value                         | Type  | Get Command            | Initial Value       | Description                        | Sec.    |
2914    +-----------------------------------+-------+------------------------+---------------------+------------------------------------+---------+
2915    | TEXTURE_TARGET                    | E     | GetTexParameteriv      | NONE                | Target of texture object           | 8.11    |
2916    |                                   |       | GetTextureParameteriv  |                     |                                    |         |
2917    +-----------------------------------+-------+------------------------+---------------------+------------------------------------+---------+
2918
2919
2920    Append to Table 23.44, "Query Object State"
2921
2922    +-----------------------------------+-------+--------------------+--------------------------------+------------------------------------+---------+
2923    | Get Value                         | Type  | Get Command        | Initial Value                  | Description                        | Sec.    |
2924    +-----------------------------------+-------+--------------------+--------------------------------+------------------------------------+---------+
2925    | QUERY_TARGET                      | E     | GetQueryObjectiv   | NONE                           | Target of query object             | 4.2     |
2926    +-----------------------------------+-------+--------------------+--------------------------------+------------------------------------+---------+
2927
2928
2929Modified state tables
2930
2931    Modify Table 23.3, "Vertex Array Object State"
2932
2933    Add GetVertexArrayAttribiv in 'Get Command' for
2934    VERTEX_ATTRIB_ARRAY_ENABLED,
2935    VERTEX_ATTRIB_ARRAY_SIZE,
2936    VERTEX_ATTRIB_ARRAY_STRIDE,
2937    VERTEX_ATTRIB_ARRAY_TYPE,
2938    VERTEX_ATTRIB_ARRAY_NORMALIZED,
2939    VERTEX_ATTRIB_ARRAY_INTEGER,
2940    VERTEX_ATTRIB_ARRAY_LONG,
2941    VERTEX_ATTRIB_ARRAY_DIVISOR, and
2942    VERTEX_ATTRIB_RELATIVE_OFFSET states
2943
2944
2945    Modify Table 23.4, "Vertex Array Object State"
2946
2947    Add GetVertexArrayiv in 'Get Command' for
2948    ELEMENT_ARRAY_BUFFER_BINDING state
2949
2950    Add GetVertexArrayIndexediv in 'Get Command' for
2951    VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
2952    VERTEX_ATTRIB_BINDING,
2953    VERTEX_ATTRIB_RELATIVE_OFFSET,
2954    VERTEX_BINDING_OFFSET, and
2955    VERTEX_BINDING_STRIDE states
2956
2957    Add GetVertexArrayIndexed64iv in 'Get Command' for
2958    VERTEX_BINDING_OFFSET state
2959
2960
2961    Modify Table 23.6, "Buffer Object State"
2962
2963    Add GetNamedBufferSubData in 'Get Command' for
2964    the entry described as "Buffer data".
2965
2966    Add GetNamedBufferParameteri64v in 'Get Command' for
2967    BUFFER_USAGE,
2968    BUFFER_ACCESS,
2969    BUFFER_ACCESS_FLAGS, and
2970    BUFFER_MAP_LENGTH states
2971
2972    Add GetNamedBufferParameteriv in 'Get Command' for
2973    BUFFER_SIZE,
2974    BUFFER_MAP_OFFSET,
2975    BUFFER_MAP_LENGTH,
2976    BUFFER_IMMUTABLE_STORAGE,
2977    BUFFER_STORAGE_FLAGS, and
2978    BUFFER_MAPPED states
2979
2980    Add GetNamedBufferPointerv in 'Get Command' for
2981    BUFFER_MAP_POINTER state
2982
2983
2984    Modify Table 23.12, "Textures (state per texture unit)"
2985
2986    Add GetIntegeri_v in 'Get Command' for
2987    TEXTURE_BINDING_1D,
2988    TEXTURE_BINDING_1D_ARRAY,
2989    TEXTURE_BINDING_2D,
2990    TEXTURE_BINDING_2D_ARRAY,
2991    TEXTURE_BINDING_2D_MULTISAMPLE,
2992    TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY
2993    TEXTURE_BINDING_3D,
2994    TEXTURE_BINDING_BUFFER,
2995    TEXTURE_BINDING_CUBE_MAP,
2996    TEXTURE_BINDING_CUBE_MAP_ARRAY, and
2997    TEXTURE_BINDING_RECTANGLE states
2998
2999
3000    Modify Table 23.14, "Textures (state per texture object)"
3001
3002    Add GetTextureParameteriv in 'Get Command' for
3003    TEXTURE_SWIZZLE_R,
3004    TEXTURE_SWIZZLE_G,
3005    TEXTURE_SWIZZLE_B,
3006    TEXTURE_SWIZZLE_A,
3007    TEXTURE_MIN_FILTER,
3008    TEXTURE_MAG_FILTER,
3009    TEXTURE_WRAP_S,
3010    TEXTURE_WRAP_T,
3011    TEXTURE_WRAP_R,
3012    DEPTH_STENCIL_TEXTURE_MODE,
3013    TEXTURE_COMPARE_MODE,
3014    TEXTURE_COMPARE_FUNC,
3015    IMAGE_FORMAT_COMPATIBILITY_TYPE,
3016    TEXTURE_IMMUTABLE_FORMAT,
3017    TEXTURE_IMMUTABLE_LEVELS,
3018    TEXTURE_VIEW_MIN_LEVEL,
3019    TEXTURE_VIEW_NUM_LEVELS,
3020    TEXTURE_VIEW_MIN_LAYER and
3021    TEXTURE_VIEW_NUM_LAYERS states
3022
3023    Add GetTextureParameterfv in 'Get Command' for
3024    TEXTURE_BORDER_COLOR,
3025    TEXTURE_MIN_LOD,
3026    TEXTURE_MAX_LOD,
3027    TEXTURE_BASE_LEVEL,
3028    TEXTURE_MAX_LEVEL and
3029    TEXTURE_LOD_BIAS states.
3030
3031
3032    Modify Table 23.16 and 2317, "Textures (state per texture image)"
3033
3034    Add GetTextureLevelParameterv in 'Get Command' for each state of
3035    the table.
3036
3037
3038    Modify Table 23.25. "Framebuffer (state per attachment point)"
3039
3040    Add GetNamedFramebufferAttachmentParameteriv in 'Get Command'
3041    for each state of the table.
3042
3043
3044    Modify Table 23.27. "Renderbuffer (state per renderbuffer object)"
3045
3046    Add GetNamedRenderbufferParameteriv in 'Get Command' for
3047    RENDERBUFFER_WIDTH,
3048    RENDERBUFFER_HEIGHT,
3049    RENDERBUFFER_INTERNAL_FORMAT,
3050    RENDERBUFFER_RED_SIZE,
3051    RENDERBUFFER_GREEN_SIZE,
3052    RENDERBUFFER_BLUE_SIZE,
3053    RENDERBUFFER_ALPHA_SIZE,
3054    RENDERBUFFER_DEPTH_SIZE,
3055    RENDERBUFFER_STENCIL_SIZE, and
3056    RENDERBUFFER_SAMPLES states
3057
3058
3059    Modify Table 23.48, "Transform Feedback State"
3060
3061    Add GetTransformFeedbackiv in 'Get Command' for
3062    TRANSFORM_FEEDBACK_BUFFER_BINDING,
3063    TRANSFORM_FEEDBACK_PAUSED and
3064    TRANSFORM_FEEDBACK_ACTIVE states
3065
3066    Add GetTransformFeedbacki64_v in 'Get Command' for
3067    TRANSFORM_FEEDBACK_BUFFER_START and
3068    TRANSFORM_FEEDBACK_BUFFER_SIZE states
3069
3070    Add GetTransformFeedbacki_v in 'Get Command' for
3071    TRANSFORM_FEEDBACK_BUFFER_BINDING state
3072
3073
3074New Implementation Dependent State
3075
3076    None.
3077
3078Usage Examples
3079
3080    Example 1:
3081        // Bind to Edit
3082        void streamChunks(const Chunks & chunks)
3083        {
3084            GLuint restore = 0;
3085            glGetIntegerv(GL_ARRAY_BUFFER_BINDING, restore)
3086            glBindBuffer(GL_ARRAY_BUFFER, chunks.buffer());
3087
3088            uint8* pointer = reinterpret_cast<uint8*>(glMapBufferRange(
3089              GL_ARRAY_BUFFER, 0, chunks.size(), GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT));
3090
3091            for(std::size_t i = 0; i < chunks.count(); ++i)
3092            {
3093                // Do something
3094                glFlushMappedBufferRange(GL_ARRAY_BUFFER, chunks.offset(), chunks.length());
3095            }
3096
3097            glUnmapNamedBuffer(GL_ARRAY_BUFFER);
3098            glBindBuffer(GL_ARRAY_BUFFER, restore);
3099        }
3100
3101        // Direct State Access, stream while rendering, no rendering state polution
3102        void streamChunks(const Chunks & chunks)
3103        {
3104            uint8* pointer = reinterpret_cast<uint8*>(glMapNamedBufferRange(
3105              chunks.buffer(), 0, chunks.size(), GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT));
3106
3107            for(int i = 0; i < chunks.count(); ++i)
3108            {
3109                // Do something
3110                glFlushMappedNamedBufferRange(chunks.buffer(), chunks.offset(), chunks.length());
3111            }
3112
3113            glUnmapNamedBuffer(chunks.buffer());
3114        }
3115
3116    Example 2: Creating a buffer object without polluting the OpenGL states
3117
3118        // Bind to Create
3119        GLuint CreateBuffer()
3120        {
3121          // Save the previous bound buffer
3122          GLuint restoreBuffer = 0;
3123          glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &restoreBuffer);
3124
3125          // Reserve the buffer name and create the buffer object
3126          uint buffer = 0;
3127          glGenBuffers(1, &buffer);
3128          glBindBuffer(GL_ARRAY_BUFFER, buffer);
3129
3130          // Restaure the previous bound buffer to avoid polluting
3131          // the rendering states
3132          glBindBuffer(GL_ARRAY_BUFFER, restoreBuffer);
3133
3134          return buffer;
3135        }
3136
3137        // Direct State Access
3138        GLuint CreateBuffer()
3139        {
3140          GLuint buffer = 0;
3141          glCreateBuffer(1, &buffer);
3142
3143          return buffer;
3144        }
3145
3146    Example 3: Creating a vertex array object without polluting the OpenGL states
3147
3148        // OpenGL 3.0 Bind to Create for vertex array object
3149        GLuint CreateVertexArray(GLuint BufferName[])
3150        {
3151          // Save the previous bound vertex array and array buffer
3152          GLuint restoreVertexArray = 0;
3153          glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &restoreVertexArray);
3154          GLuint restoreBuffer = 0;
3155          glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &restoreBuffer);
3156
3157          glGenVertexArrays(1, &VertexArrayName);
3158          glBindVertexArray(VertexArrayName);
3159            glEnableVertexAttribArray(semantic::attr::POSITION);
3160            glEnableVertexAttribArray(semantic::attr::TEXCOORD);
3161
3162            glBindBuffer(GL_ARRAY_BUFFER, BufferName[buffer::VERTEX]);
3163            glVertexAttribPointer(semantic::attr::POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(glf::vertex_v2fv2f), BUFFER_OFFSET(0));
3164            glVertexAttribPointer(semantic::attr::TEXCOORD, 2, GL_FLOAT, GL_FALSE, sizeof(glf::vertex_v2fv2f), BUFFER_OFFSET(sizeof(glm::vec2)));
3165
3166            glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, BufferName[buffer::ELEMENT]);
3167
3168          // The GL_ARRAY_BUFFER_BINDING is a context state, not a vertex array state.
3169          glBindBuffer(GL_ARRAY_BUFFER, restoreBuffer);
3170          glBindVertexArray(restoreVertexArray);
3171
3172          return vertexArrayName;
3173        }
3174
3175        // OpenGL 4.3 Bind to Create for vertex array object
3176        GLuint CreateVertexArray(GLuint BufferName[])
3177        {
3178          // Save the previous bound vertex array
3179          GLuint restoreVertexArray = 0;
3180          glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &restoreVertexArray);
3181
3182          GLuint vertexArrayName = 0;
3183          glGenVertexArrays(1, &vertexArrayName);
3184          glBindVertexArray(VertexArrayName);
3185            glEnableVertexAttribArray(semantic::attr::POSITION);
3186            glEnableVertexAttribArray(semantic::attr::TEXCOORD);
3187
3188            glVertexAttribBinding(semantic::attr::POSITION, 0);
3189            glVertexAttribFormat(semantic::attr::POSITION, 2, GL_FLOAT, GL_FALSE, 0);
3190
3191            glVertexAttribBinding(semantic::attr::TEXCOORD, 0);
3192            glVertexAttribFormat(semantic::attr::TEXCOORD, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 2);
3193
3194            glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, BufferName[buffer::ELEMENT]);
3195            glBindVertexBuffer(0, BufferName[buffer::VERTEX], 0, 0);
3196          glBindVertexArray(restoreVertexArray);
3197
3198          return vertexArrayName;
3199        }
3200
3201        // Direct State Access
3202        GLuint CreateVertexArray(GLuint BufferName[])
3203        {
3204          GLuint vertexArrayName = 0;
3205          glCreateVertexArrays(1, &vertexArrayName);
3206
3207          glEnableVertexArrayAttrib(VertexArrayName, semantic::attr::POSITION);
3208          glEnableVertexArrayAttrib(VertexArrayName, semantic::attr::TEXCOORD);
3209
3210          glVertexArrayAttribBinding(VertexArrayName, semantic::attr::POSITION, 0);
3211          glVertexArrayAttribFormat(VertexArrayName, semantic::attr::POSITION, 2, GL_FLOAT, GL_FALSE, 0);
3212
3213          glVertexArrayAttribBinding(VertexArrayName, semantic::attr::TEXCOORD, 0);
3214          glVertexArrayAttribFormat(VertexArrayName, semantic::attr::TEXCOORD, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 2);
3215
3216          glVertexArrayElementBuffer(VertexArrayName, BufferName[buffer::ELEMENT]);
3217          glVertexArrayVertexBuffer(VertexArrayName, 0, BufferName[buffer::VERTEX], 0, 0);
3218
3219          return vertexArrayName;
3220        }
3221
3222    Example 4: Querying the bound texture to a texture image unit for debugging
3223
3224        // Select to query
3225        // We need the <target> or we need to loop over all the possible targets
3226        GLuint GetBoundTexture(GLenum target, GLuint unit)
3227        {
3228          GLuint restore = 0;
3229          glGetIntegerv(GL_ACTIVE_TEXTURE, &restore);
3230
3231          glActiveTexture(unit);
3232
3233          GLuint name = 0;
3234          glGetIntegerv(target, &name);
3235
3236          glActiveTexture(restore);
3237        }
3238
3239        // Direct State Access
3240        // target_binding is e.g. GL_TEXTURE_BINDING_2D for the 2D texture
3241        GLuint GetBoundTexture(GLenum target_binding, GLuint unit)
3242        {
3243          GLuint name = 0;
3244          glGetIntegeri_v(target_binding, unit, &name);
3245          return name;
3246        }
3247
3248Transistioning guide to ARB_direct_state_access
3249
3250    This section is only for the purpose of transistioning an application to
3251    the modern direct state access approach. It is not part of the specification
3252    as such.
3253
3254    TBD.
3255
3256Interactions with OpenGL 3.0 or ARB_framebuffer_object
3257
3258    If neither OpenGL 3.0 nor ARB_framebuffer_object are supported,
3259    ignore the support for GenerateTextureMipmap, NamedFramebufferRenderbuffer,
3260    NamedFramebufferTexture, NamedFramebufferTextureLayer,
3261    NamedFramebufferDrawBuffer, NamedFramebufferDrawBuffers,
3262    NamedFramebufferReadBuffer, ClearNamedFramebufferiv,
3263    ClearNamedFramebufferuiv, ClearNamedFramebufferfv, ClearNamedFramebufferfi,
3264    BlitNamedFramebuffer, GetNamedFramebufferAttachmentParameteriv,
3265    CheckNamedFramebufferStatus, CreateRenderbuffers, NamedRenderbufferStorage,
3266    NamedRenderbufferStorageMultisample and GetNamedRenderbufferParameteriv.
3267
3268Interactions with OpenGL 3.0 or ARB_map_buffer_range
3269
3270    If neither OpenGL 3.0 nor ARB_map_buffer_range are supported,
3271    ignore the support for MapNamedBufferRange and FlushMappedNamedBufferRange
3272
3273Interactions with OpenGL 3.0 or ARB_vertex_array_object
3274
3275    If neither OpenGL 3.0 nor ARB_vertex_array_object are supported,
3276    ignore the support for CreateVertexArrays, DisableVertexArrayAttrib,
3277    EnableVertexArrayAttrib, VertexArrayElementBuffer, GetVertexArrayiv,
3278    and GetVertexArrayIndexediv.
3279
3280Interactions with OpenGL 3.1 or ARB_copy_buffer
3281
3282    If neither OpenGL 3.1 nor ARB_copy_buffer are supported,
3283    ignore the support for CopyNamedBufferSubData.
3284
3285Interactions with OpenGL 3.3 or ARB_instanced_arrays
3286
3287    If neither OpenGL 3.3 nor ARB_instanced_arrays are supported,
3288    ignore the support for VertexArrayAttribDivisor and
3289    VertexArrayBindingDivisor.
3290
3291Interactions with OpenGL 3.3 or ARB_sampler_objects
3292
3293    If neither OpenGL 4.1 nor ARB_separate_shader_objects are supported,
3294    ignore the support for CreateSamplers.
3295
3296Interactions with OpenGL 4.0 or ARB_transform_feedback2
3297
3298    If neither OpenGL 4.0 nor ARB_transform_feedback2 are supported,
3299    ignore the support for CreateTransformFeedbacks, GetTransformFeedbackiv,
3300    GetTransformFeedbacki_v, GetTransformFeedbacki64_v, and TextureBuffer.
3301
3302Interactions with OpenGL 4.1 or ARB_vertex_attrib_64bit
3303
3304    If neither OpenGL 4.1 nor ARB_vertex_attrib_64bit are supported,
3305    ignore the support for VertexArrayAttribLFormat.
3306
3307Interactions with OpenGL 4.1 or ARB_separate_shader_objects
3308
3309    If neither OpenGL 4.1 nor ARB_separate_shader_objects are supported,
3310    ignore the support for CreateProgramPipelines.
3311
3312Interactions with OpenGL 4.2 or ARB_texture_storage
3313
3314    If neither OpenGL 4.2 nor ARB_texture_storage are supported,
3315    ignore the support for TextureStorage1D, TextureStorage2D and
3316    TextureStorage3D.
3317
3318Interactions with OpenGL 4.3 or ARB_texture_storage_multisample
3319
3320    If neither OpenGL 4.2 nor ARB_texture_storage are supported,
3321    ignore the support for TextureStorage2DMultisample and
3322    TextureStorage3DMultisample.
3323
3324Interactions with OpenGL 4.3 or ARB_vertex_attrib_binding
3325
3326    If neither OpenGL 4.3 nor ARB_vertex_attrib_binding are supported,
3327    ignore the support for VertexArrayVertexBuffer, VertexArrayAttribFormat,
3328    VertexArrayAttribIFormat, VertexArrayAttribLFormat,
3329    VertexArrayAttribBinding, VertexArrayBindingDivisor.
3330
3331Interactions with OpenGL 4.3 or ARB_invalidate_subdata
3332
3333    If neither OpenGL 4.3 nor ARB_invalidate_subdata are supported,
3334    ignore the support for InvalidateNamedFramebufferData and
3335    InvalidateNamedFramebufferSubData.
3336
3337Interactions with OpenGL 4.3 or ARB_texture_buffer_range
3338
3339    If neither OpenGL 4.3 nor ARB_texture_buffer_range are supported,
3340    ignore the support for TextureBufferRange.
3341
3342Interactions with OpenGL 4.3 or ARB_clear_buffer_object
3343
3344    If neither OpenGL 4.3 nor ARB_clear_buffer_object are supported,
3345    ignore the support for ClearNamedBufferData and ClearNamedBufferSubData.
3346
3347Interactions with OpenGL 4.3 or ARB_framebuffer_no_attachments
3348
3349    If neither OpenGL 4.3 nor ARB_framebuffer_no_attachments are supported,
3350    ignore the support for NamedFramebufferParameteri and GetNamedFramebufferParameteriv.
3351
3352Interactions with OpenGL 4.4 or ARB_buffer_storage
3353
3354    If neither OpenGL 4.3 nor ARB_buffer_storage are supported,
3355    ignore the support for NamedBufferStorage.
3356
3357Interactions with OpenGL 4.4 or ARB_clear_texture
3358
3359    If neither OpenGL 4.4 nor ARB_clear_texture are supported,
3360    ignore the support for ClearNamedBufferData and ClearNamedBufferSubData.
3361
3362Interactions with OpenGL 4.4 or ARB_multi_bind
3363
3364    If neither OpenGL 4.4 nor ARB_multi_bind are supported,
3365    ignore the support for VertexArrayVertexBuffers.
3366
3367Interactions with OpenGL 4.4 or ARB_query_buffer_object
3368
3369     If neither OpenGL 4.4 nor ARB_query_buffer_object are supported, ignore
3370     the support for GetQueryBufferObjectiv, GetQueryBufferObjectuiv,
3371     GetQueryBufferObjecti64v and GetQueryBufferObjectui64v.
3372
3373TODO
3374
3375    Document more errors. Currently, only the errors that check the new
3376    parameters are documented. Errors for parameters equivalent to the non-DSA
3377    versions of functions are not documented.
3378
3379    Add Usage Examples
3380    Add Transitioning guide to ARB_direct_state_access
3381    Add language for 9.2.3 Framebuffer Object Queries
3382    Describe bufSize
3383
3384    Issues left: 0
3385
3386    What vendors extensions, vendor needs to resolve interaction with ARB_direct_state_access
3387
3388Issues
3389
3390    0) What are the difference between ARB_direct_state_access and
3391       EXT_direct_state_access?
3392
3393       <TBD>
3394
3395    1) Should MultiBind be the only way to bind functions in DSA?
3396
3397       Do we need BindTextureUnit to replace the couple ActiveTexture and
3398       BindTexture? Do we need both VertexArrayVertexBuffer and
3399       VertexArrayVertexBuffers?
3400
3401       RESOLVED: No, both approaches are arguably valuable, add
3402       BindTextureUnit, VertexArrayVertexBuffer and
3403       VertexArrayVertexBuffers.
3404
3405    2) NamedBufferData (and the corresponding function from the original EXT)
3406       do not include the <target> parameter. Does implementations may make
3407       initial assumptions about the usage of a data store based on this
3408       parameter. Where did it go? Should we bring it back?
3409
3410       RESOLVED: No need for a target parameter for buffer. Implemetations
3411       don't make usage assumption based on the <target> parameter. Only one
3412       vendor extension do so AMD_pinned_memory. A for consistent approach
3413       to specify a buffer usage would be to add a new flag for that <flags>
3414       parameter of BufferStorage.
3415
3416    3) Do we need <target> parameters to all the APIs? There are several APIs
3417       that either only allow one value, or for which the <target> parameter
3418       is of debatable worth.
3419
3420       RESOLVED: Only keep the target parameter when it is functional.
3421
3422    4) Do we need a <target> for query object creation?
3423
3424       RESOLVED: Yes. You can immediately query a result, and the number of
3425       bytes written depends on the target.
3426
3427    5) This extension omits TextureImageND (mutable texture definitions), but
3428       includes CompressedTextureImageND (mutable, compressed texture). Why?
3429       Can't we have immutable compressed textures?
3430
3431       RESOLVED: The core specification does not include
3432       CompressedTexStorageND, only CompressedTexImageND because immutable
3433       textures created with TextureStorageND can be both compressed and
3434       uncompressed.
3435
3436    6) Do TransformFeedbackBufferBase and TransformFeedbackBufferRange need
3437       a <target> parameter, as the only acceptable value should be
3438       TRANSFORM_FEEDBACK_BUFFER?
3439
3440       RESOLVED: No.
3441
3442    7) Do TransformFeedbackBufferBase and TransformFeedbackBufferRange also
3443       bind the buffer to the generic TRANSFORM_FEEDBACK_BUFFER target as
3444       well as the indexed one as BindBuffer{Base/Range} would?
3445
3446       RESOLVED: No.
3447
3448    8) Do we need the support for query conversions for DSA queries?
3449
3450       For example, with the default transform feedback we can retrive the
3451       state values for TRANSFORM_FEEDBACK_BUFFER_START and
3452       TRANSFORM_FEEDBACK_BUFFER_SIZE using GetDoublev.
3453
3454       RESOLVED: No.
3455
3456    9) The language for VertexArrayVertexBuffer is inserted in subsection
3457       10.3.1 after BindVertexBuffer, but vertex array objects are not
3458       introduced until 10.4 - after all the state that they encapsulate.
3459       This is backwards. We should probably give a brief overview of what
3460       vertex arrays are (first paragraph or so of 10.3), followed by
3461       introducing the VAO itself ("All the state required to represent
3462       vertex arrays is stored in a VAO. Blah blah."), followed by most of
3463       section 10.4, followed by all the state that's in the VAO (what is
3464       currently section 10.3). This allows the clean introduction of all
3465       vertex array state in both DSA and direct-to-context form. Should we
3466       make this change?
3467
3468       RESOLVED: YES. This draft moves section 10.4 to a new subsection at
3469       the start of section 10.3 and deletes the original 10.4. This allows
3470       the remainder of section 10.3 to refer back to VAOs.
3471
3472    10) What should be called GetVertexArrayIntegeri_v?
3473
3474        This name is inconsistent with OpenGL convensions and there are
3475        already two precedent in the specification
3476
3477        A/ In the core specification and alternative to "i" for indexed is to
3478        use "Indexed", but there is no precedent for the
3479        GetVertexArrayIntegeri_v construct.
3480
3481        glDepthRangeIndexed
3482        glEndQueryIndexed
3483        glGetQueryIndexediv
3484        glScissorIndexedv
3485        glViewportIndexedfv
3486
3487        Following this precedent for GetVertexArrayIntegeri_v and rename it
3488        GetVertexArrayIndexediv.
3489
3490        B/ Another precedent is:
3491
3492        void glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params);
3493
3494        "Iiv" is not very explicit out of context.
3495
3496        RESOLVED: GetVertexArrayIndexediv
3497
3498    11) Do we need GetVertexArrayAttribPointerv?
3499
3500        RESOLVED: No. Following the line of the resolution of issue 31, if we
3501        don't provide a DSA API for VertexAttrib*Pointer, there is no client
3502        vertex array support and pointer to query, hence this function as no
3503        purpose.
3504
3505    12) What's the purpose of the new Create* API?
3506
3507        With the Gen* API, objects are not created, only an object name is
3508        reserved. The actual operation creating the object happen after and
3509        may require additional informations: texture and query object requires
3510        a target to create the approciate data store.
3511
3512        The following function can create actually object:
3513        BindTexture
3514        BindBuffer
3515        BindFramebuffer
3516        BindVertexArray
3517        BindProgramPipeline
3518        BindRenderbuffer
3519        FenceSync
3520        BeginQuery*
3521        QueryCounter
3522        SamplerParameter*
3523        UseProgramStages
3524
3525        The Create* API is an alternative to the Gen* + Call approach to
3526        create an object where the object is created when its name is
3527        reserved.
3528
3529    13) What should GetTransformFeedbackBooleanv be called?
3530
3531        RESOLVED: We don't need it! The OpenGL specification doesn't have
3532        precedent for GetTransformFeedbackBooleanv but there are boolean
3533        states. For example VERTEX_ATTRIB_ARRAY_ENABLED is queried with
3534        GetVertexAttribiv of GetVertexArrayiv
3535
3536    14) Does InvalidateNamedFramebufferData and
3537        InvalidateNamedFramebufferSubData need a <target> parameter?
3538
3539        RESOLVED: No. For Invalidate{Sub,}Framebuffer the <target> parameter is
3540        only used to select between the framebuffer at the read binding point
3541        and the one at the draw binding point. Since the framebuffer being
3542        invalidated is identified directly by the <framebuffer> parameter, no
3543        <target> is necessary.
3544
3545    15) What should we do with the PixelStore?
3546
3547        They have that B2E flavor except that instead of binding an object
3548        to edit it, we need to query/set states to edit some objects like
3549        selectors. Just like B2E, there are generating side effects in
3550        applications. Hence, it is worth to investigate how we could DSA
3551        PixelStore.
3552
3553        PixelStore interacts with TextureSubImage*, CompressedTextureSubImage*
3554        functions that we are adding in this extension, and ReadPixels.
3555
3556        Possible solutions for this issue:
3557        a) Add a pointer parameter to the functions concerned taking a
3558           structure. with all the pixel store states. If null is passed,
3559           use the default pixel store states.
3560
3561        b) A pixel store object. (hard to imagine, different from other APIs,
3562           where to store those in an engine?)
3563
3564        c) Adding pixel store states to the texture object.
3565
3566        An alternative would be allowing the user to submit a structure with
3567        all the pixel store parameters.
3568
3569        The interactions with sparse textures make it PixelStore particularly
3570        interesting.
3571
3572        RESOLVED: The primary motivation for this extension is getting rid of
3573        selectors. Pixel store parameters are just global state. Fixing that
3574        is beyond the scope of this extension (and there is a lot of other
3575        state too!).
3576
3577    16) Do we need DSA for UniformSubroutinesuiv?
3578
3579        RESOLVED: Deferred. Do subroutines have a future?
3580
3581    17) How do we resolve the inconsistency between Create* and Gen* APIs?
3582
3583        The Create API is typically equivalent to the Gen API and Binding
3584        the object.
3585
3586        For example:
3587        // Direct State Access
3588        uint buffer;
3589        CreateBuffer(1, &buffer);
3590
3591        Is the logical equivalent to:
3592
3593        // Bind to Edit
3594        uint restoreBuffer;
3595        GetIntegerv(ARRAY_BUFFER_BINDING, &restoreBuffer);
3596        uint buffer;
3597        GenBuffers(1, &buffer);
3598        BindBuffer(ARRAY_BUFFER, buffer);
3599        BindBuffer(ARRAY_BUFFER, restoreBuffer);
3600
3601        Typically with DSA objects are created with [Create] while [Gen+Bind]
3602        is used to create the objects with B2E. Unfortunately, [Gen+Bind]
3603        is not systematic:
3604
3605        In OpenGL 4.4, here is the functions that create objects:
3606        - BindTexture
3607        - BindBuffer
3608        - BindProgramPipeline
3609        - BindRenderbuffer
3610        - BindSampler
3611        - UseProgramStages
3612        - SamplerParameter*
3613        - GetSamplerParameter*
3614        - IsSampler
3615        - BeginQuery
3616        - BeginQueryIndexed
3617        - QueryCounter
3618
3619        Effectively, the sampler object behaves as if it was created at Gen*.
3620
3621        The query API is resolved with CreateQueries that effectively
3622        creates the query object with a target that can also be TIMESTAMP
3623        which is used with QueryCounter with the Gen* method.
3624
3625        An approach to make the B2E API more consistent without breaking
3626        compatibility would be allowing any program pipeline function to
3627        create the program pipeline object so that effectively
3628        GenProgramPipelines would behave like CreateProgramPipelines.
3629
3630        RESOLVED: Only the Create* API provide a consistent behaviour.
3631
3632        We can't really fix the Gen* consistency but all the DSA functions
3633        behave identically if we use the Create* API. That is:
3634
3635        1/ The object is effectively created by Create*
3636        2/ A DSA function modifying an object, won't generated an invalid
3637           operation error if that object was created with the corresponding
3638           Create* function and if that object was deleted by the
3639           corresponding Delete* function.
3640
3641    18) Should we take the DSA effort further to improve API consistency
3642        further so that we could have a clear message so say "this is the
3643        DSA API"?
3644
3645        All the DSA functions could have the prefix "DSA" so that if we want
3646        an understandable message for the community would be:
3647
3648        "All the DSA functions starts by glDSA".
3649
3650        Considering the request for clarity by the OpenGL community, it seems
3651        valuable to consider this idea.
3652
3653        However, a lot of the DSA API is already in the core specification.
3654        To provide this API consistency, we would need to create aliases for
3655        existing functions.
3656
3657        Propose changes:
3658        1/ Rename all functions introduced by this extension removing
3659           "Named" and adding the prefix "DSA"
3660        2/ Add aliases to the following DSA functions already in core:
3661
3662        ClearTexImage -> DSAClearTexImage
3663        ClearTexSubImage -> DSAClearTexSubImage
3664        InvalidateTexSubImage -> DSAInvalidateTexSubImage
3665        InvalidateTexImage -> DSAInvalidateTexImage
3666        InvalidateBufferSubData -> DSAInvalidateBufferSubData
3667        InvalidateBufferData -> DSAInvalidateBufferData
3668        CompileShader -> DSACompileShader
3669        TextureView -> DSATexView
3670        CopyImageSubData -> DSACopyImageSubData
3671        UseProgramStages -> DSAProgramPipelineStages
3672        ProgramParameteri -> DSAProgramParameteri
3673        ProgramUniform* -> DSAProgramUniform*
3674        ProgramBinary -> DSAProgramBinary
3675        LinkProgram -> DSALinkProgram
3676        GetProgramBinary -> DSAGetProgramBinary
3677        GetProgramInfoLog -> DSAGetProgramInfoLog
3678        CreateShaderProgram -> DSACreateShaderProgram
3679        SamplerParameter* -> DSASamplerParameter*
3680        GetSamplerParameter* -> DSAGetSamplerParameter*
3681        ValidateProgramPipeline -> DSAValidateProgramPipeline
3682        UseProgramStages -> DSAProgramPipelineStages
3683        GetProgramPipelineInfoLog -> DSAGetProgramPipelineInfoLog
3684        GetProgramInterfaceiv -> DSAGetProgramInterfaceiv
3685        GetProgramResourceIndex -> DSAGetProgramResourceIndex
3686        GetProgramResourceName -> DSAGetProgramResourceName
3687        GetProgramResourceiv -> DSAGetProgramResourceiv
3688        GetProgramResourceLocation -> DSAGetProgramResourceLocation
3689        GetProgramResourceLocationIndex -> DSAGetProgramResourceLocationIndex
3690        GetAttachedShaders -> DSAGetAttachedShaders
3691        GetShaderiv -> DSAGetShaderiv
3692        GetShaderSource -> DSAGetShaderSource
3693        GetShaderPrecisionFormat -> DSAGetShaderPrecisionFormat
3694        GetProgramInfoLog -> DSAGetProgramInfoLog
3695        GetUniformfv -> DSAGetUniformfv
3696        GetUniformiv -> DSAGetUniformiv
3697        GetUniformuiv -> DSAGetUniformuiv
3698        GetUniformdv -> DSAGetUniformdv
3699        GetProgramStageiv -> DSAGetProgramStageiv
3700
3701        CreateShader -> DSACreateShaders
3702        CreateProgram -> DSACreatePrograms
3703
3704        GetSynciv -> DSAGetSynciv
3705        FenceSync -> DSAFenceSync
3706        WaitSync -> DSAWaitSync
3707        ClientWaitSync -> DSAClientWaitSync
3708
3709        Do we want to add delete functions?
3710
3711        RESOLVED: No. Some people liked this, some didn't. Some liked the
3712        prefix idea, but not the letters "DSA" (who wants to explain that in
3713        5 years?). Some people liked the idea of aliasing existing commands
3714        and some didn't. Some had other ideas for naming conventions. In the
3715        end we opted for "get 'er done!" and as a result we will have GL 4.5
3716        with DSA in it.
3717
3718        For those who really want the prefixed API, this can easily be done
3719        by renaming the commands when they are dynamically loaded.
3720        Additionally, with DSA, a C++ interface for GL can easily be written
3721        which will hide all the ugly details off things like C function names.
3722
3723    19) Can we use DSA functions on default objects? Default framebuffer,
3724        transform feedback, program pipeline, texture, vertex array?
3725
3726        RESOLVED:
3727
3728          - Default textures: NO. There are too many texture objects named
3729            zero, the default textures are rarely used, and adding selectors
3730            to all the commands is too much work for a corner case.
3731          - Default vertex array objects: YES, but only in the compatibility
3732            profile, where they exist (see issue 40).
3733          - Default transform feedback and program pipeline objects; YES.
3734          - Default framebuffer objects: YES, with certain exceptions as
3735            described in issue 34.
3736
3737    20) Should we introduce glCreate* function capable to create multiple
3738        program and shader objects? Same for glDelete*.
3739
3740        RESOLVED: There is very little value to add these functions. Unless we
3741        figure out a way to add more value to it, from the resolution of issue
3742        18 for example, no need to add them.
3743
3744    21) Why do we have TransformFeedbackBufferBase/Range but nothing for
3745        atomic counters, SSBOs, or UBOs?
3746
3747        RESOLVED: TransformFeedbackBufferBase/Range are the DSA version of
3748        BindBufferBase and BindBufferRange on transform feedback object with
3749        the Bind To Edit API. Atomic counters, SSBOs and UBOs binding are
3750        exclusively context states. There is no object to attach them to.
3751
3752    22) How should we query the bound textures with the DSA API?
3753
3754        With the current specification we need to use bind to edit:
3755
3756        GLuint GetTextureName(GLuint unit, GLenum target)
3757        {
3758          GLuint restore = 0;
3759          glGetIntegerv(GL_ACTIVE_TEXTURE, &restore);
3760
3761          glActiveTexture(unit);
3762
3763          GLuint name;
3764          glGetIntegerv(target, &name);
3765
3766          glActiveTexture(restore);
3767
3768          return name;
3769        }
3770
3771        Furthermore, with this extension <target> is a texture object state,
3772        not an input.
3773
3774        An approach to resolve this issue is using glGetIntegeri_v for
3775        textures:
3776
3777        void glGetIntegeri_v(GLenum target_binding,
3778          GLuint index,
3779          GLint * data);
3780
3781        <target_binding> is e.g. GL_TEXTURE_BINDING_2D for the
3782        two-dimensional texture binding.
3783
3784        Instead of using GL_TEXTURE0, an integer <index> identifies a
3785        texture unit.
3786
3787        NOTE: In the initially released version of this extension,
3788        queries of form
3789
3790            glGetIntegeri_v(GL_TEXTURE_BINDING, index, &texname);
3791
3792        were supported. This was a mistake and was not implementable,
3793        because there can always be multiple different bindings to a
3794        texture unit for different targets. This token and the
3795        corresponding state has been removed from this extension and
3796        from the OpenGL 4.5 API Specification. The glGetIntegeri_v query
3797        is still supported, but the target-specific binding tokens must
3798        be passed.
3799
3800    23) Do state tables chapter 23 needs to be updated to contain DSA queries too?
3801
3802        RESOLVED: Yes.
3803
3804    24) Do we need DSA functions for mutable textures?
3805
3806        RESOLVED: No. Immutable texture is a more robust approach to handle
3807        textures
3808
3809    25) Should the DSA API collapse Texture*ND functions into a single
3810        function per functionality?
3811
3812        - New extensions ARB_geometry_shader4, ARB_clear_texture,
3813          ARB_sparse_texture, ARB_copy_image have move away from separate ND
3814          functions
3815        - The TEXTURE_TARGET state allows IHVs baking the <target> parameter
3816          into the texture object. ISVs would like to do the same but can't
3817          because the target is required to select the correct texture
3818          function. Typically, if we fill a GL_TEXTURE_2D or a
3819          GL_TEXTURE_2D_ARRAY we need to call respectively TexSubImage2D or
3820          TexSubImage3D. A collapse glTexSubImage using three coordinates
3821          would resolve this issue.
3822
3823        What the set of texture functions do we want?
3824
3825        a) All ND functions:
3826
3827            void TextureStorage1D(uint texture, sizei levels, enum internalformat,
3828                                  sizei width);
3829
3830            void TextureStorage2D(uint texture, sizei levels, enum internalformat,
3831                                  sizei width, sizei height);
3832
3833            void TextureStorage3D(uint texture, sizei levels, enum internalformat,
3834                                  sizei width, sizei height, sizei depth);
3835
3836            void TextureStorage2DMultisample(uint texture, sizei samples, enum internalformat,
3837                                             sizei width, sizei height,
3838                                             boolean fixedsamplelocations);
3839
3840            void TextureStorage3DMultisample(uint texture, sizei samples, enum internalformat,
3841                                             sizei width, sizei height, sizei depth,
3842                                             boolean fixedsamplelocations);
3843
3844            void TextureSubImage1D(uint texture, int level,
3845                                   int xoffset, sizei width,
3846                                   enum format, enum type, const void *pixels);
3847
3848            void TextureSubImage2D(uint texture, int level,
3849                                   int xoffset, int yoffset,
3850                                   sizei width, sizei height,
3851                                   enum format, enum type, const void *pixels);
3852
3853            void TextureSubImage3D(uint texture, int level,
3854                                   int xoffset, int yoffset, int zoffset,
3855                                   sizei width, sizei height, sizei depth,
3856                                   enum format, enum type, const void *pixels);
3857
3858            void CompressedTextureSubImage1D(uint texture, int level,
3859                                             int xoffset, sizei width,
3860                                             enum format, sizei imageSize, const void *data);
3861
3862            void CompressedTextureSubImage2D(uint texture, int level,
3863                                             int xoffset, int yoffset,
3864                                             sizei width, sizei height,
3865                                             enum format, sizei imageSize, const void *data);
3866
3867            void CompressedTextureSubImage3D(uint texture, int level,
3868                                             int xoffset, int yoffset, int zoffset,
3869                                             sizei width, sizei height, sizei depth,
3870                                             enum format, sizei imageSize, const void *data);
3871
3872            void CopyTextureSubImage1D(uint texture, int level,
3873                                       int xoffset,
3874                                       int x, int y,
3875                                       sizei width);
3876
3877            void CopyTextureSubImage2D(uint texture, int level,
3878                                       int xoffset, int yoffset,
3879                                       int x, int y,
3880                                       sizei width, sizei height);
3881
3882            void CopyTextureSubImage3D(uint texture, int level,
3883                                       int xoffset, int yoffset, int zoffset,
3884                                       int x, int y,
3885                                       sizei width, sizei height);
3886
3887        b) Collapsed ND functions (all addressed with 3D coordinates):
3888
3889            void TextureStorage(uint texture, sizei levels, enum internalformat,
3890                                sizei width, sizei height, sizei depth);
3891
3892            void TextureStorageMultisample(uint texture, sizei samples, enum internalformat,
3893                                           sizei width, sizei height, sizei depth,
3894                                           boolean fixedsamplelocations);
3895
3896            void TextureSubImage(uint texture, int level,
3897                                 int xoffset, int yoffset, int zoffset,
3898                                 sizei width, sizei height, sizei depth,
3899                                 enum format, enum type, const void *pixels);
3900
3901            void CompressedTextureSubImage(uint texture, int level,
3902                                           int xoffset, int yoffset, int zoffset,
3903                                           sizei width, sizei height, sizei depth,
3904                                           enum format, sizei imageSize, const void *data);
3905
3906            void CopyTextureSubImage(uint texture, int level,
3907                                     int xoffset, int yoffset, int zoffset,
3908                                     int x, int y,
3909                                     sizei width, sizei height);
3910
3911        c) Both a) and b)
3912
3913        RESOLVED: a) All the ND versions only. This is what matches the OpenGL
3914        4.4 set of functionality.
3915
3916    26) DSA functions for VertexAttrib are missing, do we want them?
3917
3918        The list of the functions concerned is:
3919
3920        void VertexAttrib{1234}{sfd}( uint index, T values );
3921        void VertexAttrib{123}{sfd}v( uint index, const T *values );
3922        void VertexAttrib4{bsifd ub us ui}v( uint index, const T *values );
3923        void VertexAttrib4Nub( uint index, ubyte x, ubyte y, ubyte z, ubyte w );
3924        void VertexAttrib4N{bsi ub us ui}v( uint index, const T *values );
3925        void VertexAttribI{1234}{i ui}( uint index, T values );
3926        void VertexAttribI{1234}{i ui}v( uint index, const T *values );
3927        void VertexAttribI4{b s ub us}v( uint index, const T *values );
3928        void VertexAttribL{1234}d( uint index, const T values );
3929        void VertexAttribL{1234}dv( uint index, const T *values );
3930        void VertexAttribP{1234}ui(uint index,enum type,boolean normalized,uint value);
3931        void VertexAttribP{1234}uiv(uint index,enum type,boolean normalized,const uint *value);
3932
3933        RESOLVED: The default vertex attribute value is not a VAO state. No
3934        need to add any function. We can still use the existing functions on a
3935        software design based on DSA.
3936
3937    27) Should we add multi bind versions of TransformFeedbackBufferBase and
3938        TransformFeedbackBufferRange?
3939
3940        RESOLVED: No. On the contrary to the vertex array object, the
3941        transform feedback object doesn't contain a lot of state and actually
3942        most of the states are relatived to the bound buffers.
3943
3944        The purpose of BindVertexBuffers for the VAOs it to quickly switch
3945        buffers while remaining the same set of buffers in the rendering loop.
3946
3947        With the transform buffer object, we essentially only have buffers. If
3948        the OpenGL programmer want to quickly switch transform feedback
3949        buffers, he can create multiple transform feedback objects.
3950
3951    28) What ARB only extensions have interactions with
3952        ARB_direct_state_access?
3953
3954        RESOLVED: GL_ARB_sparse_texture and GL_ARB_sparse_buffer
3955
3956    29) Are we missing CreateSync?
3957
3958        RESOLVED: No. Sync object are created with FenceSync which behave
3959        similarly to the new Create* API expect that it returns a handle. The
3960        sync object is perfectly compatible with the DSA programming paradigm.
3961
3962    30) Do we need NamedFramebufferTextureND?
3963
3964        RESOLVED: No. In unextended OpenGL 4.4 there is at least one case that
3965        NamedFramebufferTexture and NamedFramebufferTextureLayer can't handle:
3966        non layered rendering to a cube map. In this extension, we extend
3967        FramebufferTextureLayer (and NamedFramebufferTextureLayer) to allow
3968        non-layered rendering to cube map faces. See also Issue 36.
3969
3970    31) Do we need VertexArray*Offset? These are present in
3971        EXT_direct_state_access.
3972
3973        RESOLVED: No. GL 4.4 intoduced ARB_vertex_attrib_binding which allows
3974        separately changing the buffer (via BindVertexBuffer) and setting the
3975        format (via VertexAttribFormat). In this version we provide DSA routines
3976        to match these: VertexArrayVertexBuffer and VertexArrayAttribFormat.
3977
3978        Futhermore, no need to add VertexArrayAttribBinding, we can use
3979        VertexArrayBindingDivisor which is based on ARB_vertex_attrib_binding
3980        too.
3981
3982        UNRESOLVED: If there's no VertexArrayAttribBinding, the example
3983        code needs to be rewritten accordingly.
3984
3985    32) Do we need DSA for renderbuffer?
3986
3987        RESOLVED: Keep renderbuffers. We don't need them as texture objects
3988        are a superset of renderbuffer objects but the group decided to keep
3989        them.
3990
3991    33) Atomic buffers only have a shader binding qualifier but no API.
3992        Should we add ProgramAtomicBufferBinding?
3993
3994        RESOLVED: Deferred.
3995
3996    34) Can the default framebuffer be targeted? If so, how?
3997
3998        RESOLVED: YES, with certain exceptions. Most commands accepting a
3999        <framebuffer> name accept zero and explicitly target the default
4000        read or draw framebuffer in this case, matching behavior of the
4001        non-Named versions. CheckFramebufferStatus adds a <target> selector.
4002        There is a minor loss of functionality for
4003        GetNamedFramebufferParameteriv,
4004        GetNamedFramebufferAttachmentParameteriv,
4005        InvalidateNamedFramebufferSubData, and
4006        InvalidateNamedFramebufferData. These commands accept <framebuffer>
4007        zero and target the default draw framebuffer. They cannot be used to
4008        target the default read framebuffer without adding an explicit
4009        selector, which we felt was too much work for a corner case.
4010
4011        DISCUSSION: Christophe suggested using CreateFramebuffers to create
4012        non-zero names for the read and draw framebuffer objects. We decided
4013        not to do this as it's quite complex to work out all the details.
4014
4015    35) Does the CheckNamedFramebufferStatus need a <target> parameter to
4016        specify what type of completeness should be checked for?
4017
4018        RESOLVED: Yes.
4019
4020        DISCUSSION: CheckFramebufferStatus checks framebuffer completeness
4021        independently for the "read framebuffer" and the "draw framebuffer"
4022        cases and it's not because one is complete that the other is
4023        complete as well.
4024
4025        Three approaches to resolve this issue:
4026
4027        a) Add a <target> to CheckNamedFramebufferStatus. The
4028           EXT_framebuffer_object way with clearer language.
4029
4030        b) Add a <target> to the framebuffer object just like we did for
4031           the texture object and the query object.
4032
4033        c) Always check for both. The application can use ReadBuffer(NONE)
4034           or DrawBuffer(NONE) if it is really concerned by respectively
4035           only the "read framebuffer" or "draw framebuffer" case.
4036
4037    36) Can we fix FramebufferTexture?
4038
4039        OpenGL 4.4 has 5 different functions to attach textures to a
4040        framebuffer where each function has specific behaviors, that either
4041        attached a texture image, enable layered or both according to the
4042        target. Specific functions like FramebufferTexture1D and
4043        FramebufferTexture3D apply only on the target 1D and target 3D
4044        respectively. Finally, we can only attach cube map faces using
4045        FramebufferTexture2D while there is no specific functional
4046        limitation to be able to do it with FramebufferTextureLayer. This
4047        inconsistency is largely due to legacy.
4048
4049        FramebufferTexture, single layer:
4050        - one-or two-dimensional texture
4051        - rectangle texture
4052        - two-dimensional multisample texture
4053
4054         FramebufferTexture, Layered:
4055        - three-dimensional texture
4056        - cube map texture
4057        - one-or two-dimensional array texture
4058        - two-dimensional multisample array texture
4059        - cube map array texture (intended - Bug 12336)
4060
4061        FramebufferTextureLayer, single layer:
4062        - three-dimensional texture
4063        - cube map array texture
4064        - one-or two-dimensional array texture
4065        - two-dimensional multisample array texture
4066        [*missing* cube map face]
4067
4068        FramebufferTexture1D, single layer:
4069        - one-dimensional texture
4070
4071        FramebufferTexture2D, single layer:
4072        - cube map face
4073        - rectangle texture
4074        - two-dimensional texture
4075        - two-dimensional multisample texture
4076
4077        FramebufferTexture3D, single layer:
4078        - three-dimensional texture
4079
4080        DSA is an opportunity for some clean up.
4081
4082        RESOLVED.  We will add NamedFramebufferTexture and
4083        NamedFramebufferTextureLayer, but not NamedFramebufferTexture1D/2D/3D.
4084        We'll augment FramebufferTextureLayer and NamedFramebufferTextureLayer
4085        with support for cube map textures, so that these methods are
4086        complete replacements for the (now legacy) FramebufferTextureND functions.
4087
4088    37) How to handle UNPACK_SKIP_IMAGES pixel store state if we
4089        resolve issue 25 by collapsing Texture*ND functions?
4090
4091        DISCUSSION:
4092
4093        The OpenGL 4.4 core specification specify a specific behavior for
4094        TexImage2D where UNPACK_SKIP_IMAGES is ignored using the following
4095        language:
4096
4097        "For the purposes of decoding the texture image, TexImage2D is
4098        equivalent to calling TexImage3D with corresponding arguments and
4099        depth of 1, except that UNPACK_SKIP_IMAGES is ignored"
4100
4101        However, the specification doesn't clarify anything for regarding
4102        the equivalent issue UNPACK_SKIP_ROWS with TexImage1D which seems to
4103        imply that UNPACK_SKIP_IMAGES and UNPACK_SKIP_ROWS have inconsistent
4104        behaviours.
4105
4106        A threaded producer and consumer OpenGL implementation might perform
4107        the unparking on the application thread in which case it may have no
4108        information about the texture object states, hence no access to the
4109        implied texture target that could have been used to select whether
4110        UNPACK_SKIP_IMAGES should be ignore or not.
4111
4112        In practice, even if UNPACK_SKIP_IMAGES was active for TexImage2D,
4113        it would have an effect only if the default value (zero) is replaced
4114        by a positive value.
4115
4116        The theory behind collapsing Tex*ND functions is that any set of
4117        coordinates is a generalization of any set of coordinates with N or
4118        less coordinates. There is no reason to forbid UNPACK_SKIP_IMAGES or
4119        UNPACK_SKIP_ROWS for collapsed any Tex* functions.
4120
4121        We can't simply relax UNPACK_SKIP_IMAGES on TexImage2D because an
4122        application may rely on the side effects of this behavior which
4123        would result in a backward compatibility break.
4124
4125        RESOLVED: Not applicable. We didn't include these commands.
4126
4127    38) Do we need the CopyTextureImageSubData command?
4128
4129        RESOLVED. No. It is already a DSA command. It would allow us to get
4130        rid of the (mostly meaningless) <target> parameter, but that is not a
4131        selector and it wouldn't be full replacement as it can't support
4132        renderbuffers.
4133
4134    39) Do we need BeginNamedQuery / EndNamedQuery / QueryNamedCounter?
4135
4136        RESOLVED. No. CreateQueries adds a <target>, so strictly speaking the
4137        <target> command isn't needed for BeginQuery/EndQuery, but in the end,
4138        this also isn't a selector, so we decided not to change it.
4139
4140    40) Should commands accepting a vertex array object name allow it to be
4141        zero in the compatibility profile?
4142
4143        RESOLVED: Yes. All commands accepting <vaobj> names accept zero,
4144        indicating the default VAO, in the compatibility profile only.
4145
4146        DISCUSSION: this case may have been overlooked because the extension
4147        was written against the core profile specification. EXT_dsa doesn't
4148        appear to allow it, although the error discussion there doesn't
4149        exclude it, either (with the odd result that it may imply that a VAO
4150        named zero will be created if it doesn't exist).
4151
4152        The introduction says that "this extension only expands
4153        functionality that still exists in core profile OpenGL." However,
4154        this is in tension with the desire to not have loss of functionality
4155        with the non-DSA functions in this case, and the resolution of issue
4156        19 is that DSA functions *can* be used on default objects.
4157
4158    41) Can READ_BUFFER and DRAW_BUFFERi state be queried with
4159        GetNamedFramebufferParameteriv?
4160
4161        RESOLVED: No. The non-DSA query does not support these
4162        tokens so neither does the DSA query.
4163
4164        Previous versions of the extension contained the following state
4165        table additions:
4166
4167           "Modify Table 23.24, "Framebuffer (state per framebuffer object)"
4168
4169            Add GetNamedFramebufferParameteriv in 'Get Command' for
4170            DRAW_BUFFERi and READ_BUFFER states"
4171
4172        However, there was no corresponding spec language change explaining
4173        how these additional tokens worked, and vendors did not implement
4174        support for it.
4175
4176Revision History
4177
4178    Rev.    Date        Author    Changes
4179    ----  -----------   --------- ---------------------------------------------
4180    51    17 Sep 2019   Jon Leech Modify DSA commands to generate
4181                                  INVALID_OPERATION errors instead of
4182                                  INVALID_ENUM for "effective texture
4183                                  <target>" mismatches, following the GL 4.6
4184                                  specification (gitlab #22).
4185
4186    50    14 Jun 2018   T. Karras Use English variable names and fix API usage
4187                                  in examples.
4188
4189    49    23 Jul 2017   Jon Leech Replace the long list of valid <target>
4190                                  parameters for BeginQueryIndexed,
4191                                  EndQueryIndexed, and GetQueryIndexediv
4192                                  with a reference to the list of query
4193                                  targets in section 4.2 (gitlab #18).
4194
4195    48    29 Sep 2016   Jon Leech Add interaction with ARB_query_buffer_object
4196                                  (Bug 13490).
4197
4198    47    22 Oct 2015   Jon Leech Add missing drawbuffer parameter to
4199                                  ClearNamedFramebufferfi (public Bug 1394,
4200                                  Bug 13469).
4201
4202    46    25 Jun 2015   Jon Leech Add issue 41 noting that read and drawbuffer
4203                                  state cannot be queried with
4204                                  GetNamedFramebufferParameteriv (Bug 14207).
4205
4206    45    20 Apr 2015   Jon Leech Change generated error fo *TexSubImage* with
4207                                  invalid <target> to INVALID_ENUM instead of
4208                                  INVALID_VALUE (Bug 13563).
4209
4210    44    27 Jan 2015   Jon Leech Remove unimplementable TEXTURE_BINDING token
4211                                  and state, and update Issue 22 (Bug 13278).
4212
4213    43    26 Sep 2014   Jon Leech Add GetQueryBufferObject* to New Commands +
4214                                  minor spacing fixes.
4215
4216    42    18 Sep 2014   Jon Leech Add GetQueryBufferObject* queries (Bug 1214).
4217
4218    41    24 Jul 2014   Jon Leech Allow cube map textures to be queried with
4219                                  GetTextureLevelParameter*. Don't allow
4220                                  cube map face targets as effective targets
4221                                  of *TextureSubImage2D, but do allow cube
4222                                  map textures as effective targets of the
4223                                  corresponding *3D commands (Bug 12451).
4224
4225    40    17 Jul 2014   Jon Leech Remove TRANSFORM_FEEDBACK_BUFFER_BINDING as
4226                                  a valid target for GetTransformFeedbackiv
4227                                  (Bug 12462).
4228
4229    39    17 Jul 2014   criccio   Fix missing VertexArrayAttribBinding function
4230
4231    38    16 Jul 2014   Jon Leech Fix drawBuffer -> drawbuffer capitalization.
4232
4233    37    15 Jul 2014   Jon Leech Specify that a zero <framebuffer> argument
4234                                  to GetNamedFramebufferParameteriv queries
4235                                  the default draw framebuffer, matching API
4236                                  spec.
4237
4238    36    10 Jul 2014   Jon Leech Fix error condition for
4239                                  Check*FramebufferStatus.
4240
4241    35    03 Jul 2014   Jon Leech Fix error condition for BindTextureUnit.
4242
4243    34    29 Jun 2014   Jon Leech Fix typo in spec prototype for
4244                                  TextureStorage2D. Clarify that not all
4245                                  GetTransformFeedback* commands accept
4246                                  all token names from the state table.
4247
4248    33    16 Jun 2014   Jon Leech Fix typos.
4249
4250                                  Require GetTextureImage to accept cube map
4251                                  texture objects and to respect
4252                                  three-dimensional pixel pack state in this
4253                                  case (Bug 12329).
4254
4255    32    16 Jun 2014   Jon Leech Reflow Issues list and add issue 40.
4256
4257                                  Finish merging errors and language from
4258                                  core API spec.
4259
4260                                  Allow CheckNamedFramebufferStatus to
4261                                  accept a zero <framebuffer> argument,
4262                                  indicating the default read or draw
4263                                  framebuffer.
4264
4265                                  Remove VERTEX_ATTRIB_ARRAY_POINTER query
4266                                  and add VERTEX_ATTRIB_RELATIVE_OFFSET (Bug
4267                                  12330).
4268
4269                                  Allow commands taking vertex object names
4270                                  to accept the name zero, indicating the
4271                                  default VAO, in the compatibility profile
4272                                  only (issues 19, 40).
4273
4274                                  Add parameter validation errors for
4275                                  TransformFeedbackBuffer{Base,Range} and
4276                                  GetTransformFeedback{i,i64}_v.
4277
4278    31    12 Jun 2014   Jon Leech Merge updated errors and language from the
4279                                  core API spec (only done up through
4280                                  CreateRenderbuffers, more to be done).
4281
4282    30    08 Jun 2014   Jon Leech Merged errors into body in new spec style
4283                                  (still not up to date with 4.5 API spec).
4284                                  Remove VertexArrayAttribBinding per issue
4285                                  31. Allow querying the default draw
4286                                  framebuffer with
4287                                  GetFramebufferAttachmentParameteriv
4288                                  (making errors consistent with spec body).
4289                                  Reflow a few paragraphs and adjust
4290                                  indentation for consistency. Assign enum
4291                                  values for QUERY_TARGET, TEXTURE_BINDING,
4292                                  and TEXTURE_TARGET.
4293
4294    29    06 Jun 2014   Jon Leech Remove 'or if such an object has been deleted'
4295                                  language from object name validation errors,
4296                                  since an 'existing' object has by definition
4297                                  not been deleted. Remove tabs.
4298
4299    28    03 Jun 2014   Jon Leech Fix typo 'img' -> 'pixels'.
4300
4301    27    30 May 2014   dkoch     Resolved issue 30, 36, and supporting edits.
4302                                  Resolved issue 25 and removed collapsed
4303                                  commands variants. Resolved issue 37.
4304                                  Resolved issue 15, 18 (wontfix).
4305                                  Removed CopyTextureImageSubData (Issue 38).
4306                                  Removed Begin/EndNamedQuery/QueryNamedCounter
4307                                  (Issue 39).
4308                                  Rename BindTextureBase to BindTextureUnit
4309
4310    26    28 May 2014   criccio   Improved the structural consistency.
4311
4312    25    27 May 2014   criccio   Documented issue 36.
4313                                  Added proposed language to resolve issue 36.
4314
4315    24    26 May 2014   criccio   Added issue 36.
4316                                  Added issue 37.
4317
4318    23    26 May 2014   dkoch     Fix typos, parameter names and references.
4319
4320    22    23 May 2014   criccio   Renamed CopyTextureSubImageData into
4321                                  CopyTextureImageSubData from Daniel comments.
4322                                  Updated issue 18 discussion.
4323                                  Added collapsed texture functions languages.
4324                                  Issue 25 is still to be fixed.
4325                                  Added new sample.
4326
4327    21    22 May 2014   criccio   Fixed Get*TextureImage parameters order.
4328                                  Completed modification to tables chapter 23.
4329                                  Added missing GetVertexArrayIndexed64iv.
4330                                  Fixed accepted enum for GetVertexArray*.
4331
4332    20    21 May 2014   criccio   Document issue 35 with the three alternatives
4333                                  envisioned.
4334                                  Clean up.
4335
4336    19    21 May 2014   dkoch     Added FramebufferTexture*D, QueryNamedCounter.
4337                                  Fixed CheckNamedFramebufferStatus and Issue 35.
4338
4339    18    21 May 2014   criccio   Fixed typos.
4340                                  Integrated Daniel review.
4341                                  Document issue 34.
4342                                  Updated table chapter 23.
4343
4344    17    20 May 2014   criccio   There is no default VAO in core profile, fix
4345                                  functions allowing zero.
4346                                  Added invalid operation error on
4347                                  TextureBuffer.
4348
4349    16    19 May 2014   criccio   Documented issue 30 and resolved it.
4350                                  Added issue 34.
4351                                  Added all the errors relative the object name
4352                                  passed to the new DSA functions.
4353
4354    15    18 May 2014   criccio   Resolved issue 19 and added errors relative
4355                                  to this issue.
4356                                  Updated and resolved issue 12.
4357                                  Updated and resolved issue 24.
4358                                  Resolved issue 27.
4359                                  Added language for query object interaction.
4360                                  Added issue 32.
4361                                  Resolved issue 11 accordingly to the
4362                                  resolution of issue 31.
4363                                  Updated and resolved issue 29.
4364                                  Resolved issue 20.
4365                                  Added example 1 to 3.
4366                                  Document issue 25 and 18.
4367                                  Added issue 33 and 34.
4368
4369    14    17 May 2014   criccio   Resolved issue 22.
4370                                  Add comments to the resolution of issue 31.
4371                                  Added language for missing functions.
4372
4373    13    17 May 2014   dkoch     Finish removing GetTransformFeedbackBooleanv.
4374                                  Added NamedFramebufferTextureND (Issue 30).
4375                                  Removed VertexArray*Offset (Issue 31).
4376                                  Minor editorial changes.
4377
4378    12    16 May 2014   criccio   Added BeginNamedQuery and EndNamedQuery
4379                                  function and a target state to the query
4380                                  object to complete the resolution of issue 4.
4381                                  Removed GetTransformFeedbackBooleanv function
4382                                  and added modifications for transform feedback
4383                                  state table to list the DSA functions to query
4384                                  the transform feedback states.
4385
4386    11    16 May 2014   dkoch     Fixed various typos. Resolved issue 4, 13, 14.
4387                                  Fixed prototypes and description of
4388                                  InvalidateNamed{Sub}Framebuffer.
4389
4390    10    16 May 2014   criccio   Added issues 0, 22, 24 to 29.
4391                                  Resolved issue 26.
4392                                  Fixed the language for GetCompressedTextureImage
4393                                  and GetTextureImage: <pixels> and <level>
4394                                  instead of <img> and <lod>.
4395                                  Additional reorganization of "New Procedures
4396                                  and Functions" section.
4397                                  Added dependence to OpenGL 2.0.
4398                                  Added interactions with all the extensions
4399                                  concerned since OpenGL 2.0.
4400
4401    9     16 May 2014   criccio   Fixed BlitNamedFramebuffer language inconsistency.
4402                                  Added list of missing functions in todo section.
4403                                  Reorganized "New Procedures and Functions"
4404                                  section for better readability.
4405
4406    8     16 May 2014   criccio   Applied DanielK: Typos, renamed
4407                                  VERTEX_ARRAY_ELEMENT_BINDING into
4408                                  ELEMENT_ARRAY_BUFFER_BINDING.
4409                                  Added and fixed issue 21.
4410
4411    7     15 May 2014   criccio   Removed left over for CompressedTextureImage1D,
4412                                  CompressedTextureImage2D and
4413                                  CompressedTextureImage3D.
4414                                  Removed left over for CopyTextureImage1D,
4415                                  CopyTextureImage2D, TextureImage1D,
4416                                  TextureImage2D and TextureImage3D.
4417
4418                                  Added and resolve issue 10.
4419                                  Fixed GetVertexArrayAttribPointerv prototype
4420                                  and language.
4421                                  Added issue 11.
4422                                  Resolved issue 5 and 3.
4423                                  Resolved issue 6 and fix associated prototype.
4424                                  Added issues 12 to 20.
4425                                  Updated issue 1 and 8 to be less specific.
4426                                  Added Transistioning guide to
4427                                  ARB_direct_state_access section.
4428
4429      6   15 May 2014   gsellers  More updates. Will it ever end?
4430
4431      5   15 Apr 2014   criccio   Clean up, typos.
4432
4433      4    2 Apr 2014   gsellers  More updates.
4434
4435      3    7 Fev 2014   gsellers  More updates. Ready for initial review. All
4436                                  functions mostly documented.
4437
4438      2   30 Jan 2014   gsellers  Updates - documented more functions.
4439
4440      1   23 Dec 2013   gsellers  Initial revision based on EXT_dsa.
4441