15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    EXT_texture_buffer_object
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_EXT_texture_buffer_object
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Pat Brown, NVIDIA Corporation (pbrown 'at' nvidia.com)
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciStatus
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    Shipping for GeForce 8 Series (November 2006, Release 95)
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciVersion
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    Last Modified Date:         February 21, 2014
205bd8deadSopenharmony_ci    NVIDIA Revision:            8
215bd8deadSopenharmony_ci
225bd8deadSopenharmony_ciNumber
235bd8deadSopenharmony_ci
245bd8deadSopenharmony_ci    330
255bd8deadSopenharmony_ci
265bd8deadSopenharmony_ciDependencies
275bd8deadSopenharmony_ci
285bd8deadSopenharmony_ci    OpenGL 2.0 is required.
295bd8deadSopenharmony_ci
305bd8deadSopenharmony_ci    NV_gpu_program4 or EXT_gpu_shader4 is required.
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ci    This extension is written against the OpenGL 2.0 specification.
335bd8deadSopenharmony_ci
345bd8deadSopenharmony_ci    This extension depends trivially on EXT_texture_array.
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ci    This extension depends trivially on NV_texture_shader.
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci    This extension depends trivially on EXT_texture_integer.
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ci    This extension depends trivially on ARB_texture_float.
415bd8deadSopenharmony_ci
425bd8deadSopenharmony_ci    This extension depends trivially on ARB_half_float_pixel.
435bd8deadSopenharmony_ci
445bd8deadSopenharmony_ci    This extension depends trivially on EXT_framebuffer_object,
455bd8deadSopenharmony_ci    ARB_framebuffer_object, and OpenGL 3.0.
465bd8deadSopenharmony_ci
475bd8deadSopenharmony_ciOverview
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ci    This extension provides a new texture type, called a buffer texture.
505bd8deadSopenharmony_ci    Buffer textures are one-dimensional arrays of texels whose storage comes
515bd8deadSopenharmony_ci    from an attached buffer object.  When a buffer object is bound to a buffer
525bd8deadSopenharmony_ci    texture, a format is specified, and the data in the buffer object is
535bd8deadSopenharmony_ci    treated as an array of texels of the specified format.
545bd8deadSopenharmony_ci
555bd8deadSopenharmony_ci    The use of a buffer object to provide storage allows the texture data to
565bd8deadSopenharmony_ci    be specified in a number of different ways:  via buffer object loads
575bd8deadSopenharmony_ci    (BufferData), direct CPU writes (MapBuffer), framebuffer readbacks
585bd8deadSopenharmony_ci    (EXT_pixel_buffer_object extension).  A buffer object can also be loaded
595bd8deadSopenharmony_ci    by transform feedback (NV_transform_feedback extension), which captures
605bd8deadSopenharmony_ci    selected transformed attributes of vertices processed by the GL.  Several
615bd8deadSopenharmony_ci    of these mechanisms do not require an extra data copy, which would be
625bd8deadSopenharmony_ci    required when using conventional TexImage-like entry points.
635bd8deadSopenharmony_ci
645bd8deadSopenharmony_ci    Buffer textures do not support mipmapping, texture lookups with normalized
655bd8deadSopenharmony_ci    floating-point texture coordinates, and texture filtering of any sort, and
665bd8deadSopenharmony_ci    may not be used in fixed-function fragment processing.  They can be
675bd8deadSopenharmony_ci    accessed via single texel fetch operations in programmable shaders.  For
685bd8deadSopenharmony_ci    assembly shaders (NV_gpu_program4), the TXF instruction is used.  For GLSL
695bd8deadSopenharmony_ci    (EXT_gpu_shader4), a new sampler type and texel fetch function are used.
705bd8deadSopenharmony_ci
715bd8deadSopenharmony_ci    Buffer textures can be substantially larger than equivalent
725bd8deadSopenharmony_ci    one-dimensional textures; the maximum texture size supported for buffer
735bd8deadSopenharmony_ci    textures in the initial implementation of this extension is 2^27 texels,
745bd8deadSopenharmony_ci    versus 2^13 (8192) texels for otherwise equivalent one-dimensional
755bd8deadSopenharmony_ci    textures.  (Note that this extension only guarantees support for buffer
765bd8deadSopenharmony_ci    textures with 2^16 texels, but we expect most implementations to exceed
775bd8deadSopenharmony_ci    that substantially.)  When a buffer object is attached to a buffer
785bd8deadSopenharmony_ci    texture, a size is not specified; rather, the number of texels in the
795bd8deadSopenharmony_ci    texture is taken by dividing the size of the buffer object by the size of
805bd8deadSopenharmony_ci    each texel.
815bd8deadSopenharmony_ci
825bd8deadSopenharmony_ciNew Procedures and Functions
835bd8deadSopenharmony_ci
845bd8deadSopenharmony_ci    void TexBufferEXT(enum target, enum internalformat, uint buffer);
855bd8deadSopenharmony_ci    
865bd8deadSopenharmony_ciNew Tokens
875bd8deadSopenharmony_ci
885bd8deadSopenharmony_ci    Accepted by the <target> parameter of BindBuffer, BufferData,
895bd8deadSopenharmony_ci    BufferSubData, MapBuffer, BindTexture, UnmapBuffer, GetBufferSubData,
905bd8deadSopenharmony_ci    GetBufferParameteriv, GetBufferPointerv, and TexBufferEXT, and
915bd8deadSopenharmony_ci    the <pname> parameter of GetBooleanv, GetDoublev, GetFloatv, and
925bd8deadSopenharmony_ci    GetIntegerv:
935bd8deadSopenharmony_ci
945bd8deadSopenharmony_ci        TEXTURE_BUFFER_EXT                              0x8C2A
955bd8deadSopenharmony_ci
965bd8deadSopenharmony_ci    Accepted by the <pname> parameters of GetBooleanv, GetDoublev,
975bd8deadSopenharmony_ci    GetFloatv, and GetIntegerv:
985bd8deadSopenharmony_ci
995bd8deadSopenharmony_ci        MAX_TEXTURE_BUFFER_SIZE_EXT                     0x8C2B
1005bd8deadSopenharmony_ci        TEXTURE_BINDING_BUFFER_EXT                      0x8C2C
1015bd8deadSopenharmony_ci        TEXTURE_BUFFER_DATA_STORE_BINDING_EXT           0x8C2D
1025bd8deadSopenharmony_ci        TEXTURE_BUFFER_FORMAT_EXT                       0x8C2E
1035bd8deadSopenharmony_ci
1045bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL Operation)
1055bd8deadSopenharmony_ci
1065bd8deadSopenharmony_ci    None.
1075bd8deadSopenharmony_ci
1085bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
1095bd8deadSopenharmony_ci
1105bd8deadSopenharmony_ci    (Insert new Section 3.8.4, Buffer Textures.  Renumber subsequent
1115bd8deadSopenharmony_ci    sections.)
1125bd8deadSopenharmony_ci
1135bd8deadSopenharmony_ci    In addition to one-, two-, and three-dimensional and cube map textures
1145bd8deadSopenharmony_ci    described in previous sections, one additional type of texture is
1155bd8deadSopenharmony_ci    supported.  A buffer texture is similar to a one-dimensional texture.
1165bd8deadSopenharmony_ci    However, unlike other texture types, the texel array is not stored as part
1175bd8deadSopenharmony_ci    of the texture.  Instead, a buffer object is attached to a buffer texture
1185bd8deadSopenharmony_ci    and the texel array is taken from the data store of an attached buffer
1195bd8deadSopenharmony_ci    object.  When the contents of a buffer object's data store are modified,
1205bd8deadSopenharmony_ci    those changes are reflected in the contents of any buffer texture to which
1215bd8deadSopenharmony_ci    the buffer object is attached.  Also unlike other textures, buffer
1225bd8deadSopenharmony_ci    textures do not have multiple image levels; only a single data store is
1235bd8deadSopenharmony_ci    available.
1245bd8deadSopenharmony_ci
1255bd8deadSopenharmony_ci    The command
1265bd8deadSopenharmony_ci
1275bd8deadSopenharmony_ci      void TexBufferEXT(enum target, enum internalformat, uint buffer);
1285bd8deadSopenharmony_ci
1295bd8deadSopenharmony_ci    attaches the storage for the buffer object named <buffer> to the active
1305bd8deadSopenharmony_ci    buffer texture, and specifies an internal format for the texel array found
1315bd8deadSopenharmony_ci    in the attached buffer object.  If <buffer> is zero, any buffer object
1325bd8deadSopenharmony_ci    attached to the buffer texture is detached, and no new buffer object is
1335bd8deadSopenharmony_ci    attached.  If <buffer> is non-zero, but is not the name of an existing
1345bd8deadSopenharmony_ci    buffer object, the error INVALID_OPERATION is generated.  <target> must be
1355bd8deadSopenharmony_ci    TEXTURE_BUFFER_EXT.  <internalformat> specifies the storage format, and
1365bd8deadSopenharmony_ci    must be one of the sized internal formats found in Table X.1.
1375bd8deadSopenharmony_ci
1385bd8deadSopenharmony_ci    When a buffer object is attached to a buffer texture, the buffer object's
1395bd8deadSopenharmony_ci    data store is taken as the texture's texel array.  The number of texels in
1405bd8deadSopenharmony_ci    the buffer texture's texel array is given by 
1415bd8deadSopenharmony_ci
1425bd8deadSopenharmony_ci      floor(<buffer_size> / (<components> * sizeof(<base_type>)),
1435bd8deadSopenharmony_ci
1445bd8deadSopenharmony_ci    where <buffer_size> is the size of the buffer object, in basic machine
1455bd8deadSopenharmony_ci    units and <components> and <base_type> are the element count and base data
1465bd8deadSopenharmony_ci    type for elements, as specified in Table X.1.  The number of texels in the
1475bd8deadSopenharmony_ci    texel array is then clamped to the implementation-dependent limit
1485bd8deadSopenharmony_ci    MAX_TEXTURE_BUFFER_SIZE_EXT.  When a buffer texture is accessed in a
1495bd8deadSopenharmony_ci    shader, the results of a texel fetch are undefined if the specified texel
1505bd8deadSopenharmony_ci    number is greater than or equal to the clamped number of texels in the
1515bd8deadSopenharmony_ci    texel array.
1525bd8deadSopenharmony_ci
1535bd8deadSopenharmony_ci    When a buffer texture is accessed in a shader, an integer is provided to
1545bd8deadSopenharmony_ci    indicate the texel number being accessed.  If no buffer object is bound to
1555bd8deadSopenharmony_ci    the buffer texture, the results of the texel access are undefined.
1565bd8deadSopenharmony_ci    Otherwise, the attached buffer object's data store is interpreted as an
1575bd8deadSopenharmony_ci    array of elements of the GL data type corresponding to <internalformat>.
1585bd8deadSopenharmony_ci    Each texel consists of one to four elements that are mapped to texture
1595bd8deadSopenharmony_ci    components (R, G, B, A, L, and I).  Element <m> of the texel numbered <n>
1605bd8deadSopenharmony_ci    is taken from element <n> * <components> + <m> of the attached buffer
1615bd8deadSopenharmony_ci    object's data store.  Elements and texels are both numbered starting with
1625bd8deadSopenharmony_ci    zero.  For texture formats with normalized components, the extracted
1635bd8deadSopenharmony_ci    values are converted to floating-point values according to Table 2.9.  The
1645bd8deadSopenharmony_ci    components of the texture are then converted to an (R,G,B,A) vector
1655bd8deadSopenharmony_ci    according to Table X.21, and returned to the shader as a four-component
1665bd8deadSopenharmony_ci    result vector with components of the appropriate data type for the
1675bd8deadSopenharmony_ci    texture's internal format.  The base data type, component count,
1685bd8deadSopenharmony_ci    normalized component information, and mapping of data store elements to
1695bd8deadSopenharmony_ci    texture components is specified in Table X.1.
1705bd8deadSopenharmony_ci    
1715bd8deadSopenharmony_ci                                                             Component
1725bd8deadSopenharmony_ci      Sized Internal Format     Base Type  Components  Norm   0 1 2 3
1735bd8deadSopenharmony_ci      ------------------------  ---------  ----------  ----   -------
1745bd8deadSopenharmony_ci      ALPHA8                     ubyte         1        Y     A . . .
1755bd8deadSopenharmony_ci      ALPHA16                    ushort        1        Y     A . . .
1765bd8deadSopenharmony_ci      ALPHA16F_ARB               half          1        N     A . . .
1775bd8deadSopenharmony_ci      ALPHA32F_ARB               float         1        N     A . . .
1785bd8deadSopenharmony_ci      ALPHA8I_EXT                byte          1        N     A . . .
1795bd8deadSopenharmony_ci      ALPHA16I_EXT               short         1        N     A . . .
1805bd8deadSopenharmony_ci      ALPHA32I_EXT               int           1        N     A . . .
1815bd8deadSopenharmony_ci      ALPHA8UI_EXT               ubyte         1        N     A . . .
1825bd8deadSopenharmony_ci      ALPHA16UI_EXT              ushort        1        N     A . . .
1835bd8deadSopenharmony_ci      ALPHA32UI_EXT              uint          1        N     A . . .
1845bd8deadSopenharmony_ci
1855bd8deadSopenharmony_ci      LUMINANCE8                 ubyte         1        Y     L . . .
1865bd8deadSopenharmony_ci      LUMINANCE16                ushort        1        Y     L . . .
1875bd8deadSopenharmony_ci      LUMINANCE16F_ARB           half          1        N     L . . .
1885bd8deadSopenharmony_ci      LUMINANCE32F_ARB           float         1        N     L . . .
1895bd8deadSopenharmony_ci      LUMINANCE8I_EXT            byte          1        N     L . . .
1905bd8deadSopenharmony_ci      LUMINANCE16I_EXT           short         1        N     L . . .
1915bd8deadSopenharmony_ci      LUMINANCE32I_EXT           int           1        N     L . . .
1925bd8deadSopenharmony_ci      LUMINANCE8UI_EXT           ubyte         1        N     L . . .
1935bd8deadSopenharmony_ci      LUMINANCE16UI_EXT          ushort        1        N     L . . .
1945bd8deadSopenharmony_ci      LUMINANCE32UI_EXT          uint          1        N     L . . .
1955bd8deadSopenharmony_ci
1965bd8deadSopenharmony_ci      LUMINANCE8_ALPHA8          ubyte         2        Y     L A . .
1975bd8deadSopenharmony_ci      LUMINANCE16_ALPHA16        ushort        2        Y     L A . .
1985bd8deadSopenharmony_ci      LUMINANCE_ALPHA16F_ARB     half          2        N     L A . .
1995bd8deadSopenharmony_ci      LUMINANCE_ALPHA32F_ARB     float         2        N     L A . .
2005bd8deadSopenharmony_ci      LUMINANCE_ALPHA8I_EXT      byte          2        N     L A . .
2015bd8deadSopenharmony_ci      LUMINANCE_ALPHA16I_EXT     short         2        N     L A . .
2025bd8deadSopenharmony_ci      LUMINANCE_ALPHA32I_EXT     int           2        N     L A . .
2035bd8deadSopenharmony_ci      LUMINANCE_ALPHA8UI_EXT     ubyte         2        N     L A . .
2045bd8deadSopenharmony_ci      LUMINANCE_ALPHA16UI_EXT    ushort        2        N     L A . .
2055bd8deadSopenharmony_ci      LUMINANCE_ALPHA32UI_EXT    uint          2        N     L A . .
2065bd8deadSopenharmony_ci
2075bd8deadSopenharmony_ci      INTENSITY8                 ubyte         1        Y     I . . .
2085bd8deadSopenharmony_ci      INTENSITY16                ushort        1        Y     I . . .
2095bd8deadSopenharmony_ci      INTENSITY16F_ARB           half          1        N     I . . .
2105bd8deadSopenharmony_ci      INTENSITY32F_ARB           float         1        N     I . . .
2115bd8deadSopenharmony_ci      INTENSITY8I_EXT            byte          1        N     I . . .
2125bd8deadSopenharmony_ci      INTENSITY16I_EXT           short         1        N     A . . .
2135bd8deadSopenharmony_ci      INTENSITY32I_EXT           int           1        N     A . . .
2145bd8deadSopenharmony_ci      INTENSITY8UI_EXT           ubyte         1        N     A . . .
2155bd8deadSopenharmony_ci      INTENSITY16UI_EXT          ushort        1        N     A . . .
2165bd8deadSopenharmony_ci      INTENSITY32UI_EXT          uint          1        N     A . . .
2175bd8deadSopenharmony_ci
2185bd8deadSopenharmony_ci      RGBA8                      ubyte         4        Y     R G B A
2195bd8deadSopenharmony_ci      RGBA16                     ushort        4        Y     R G B A
2205bd8deadSopenharmony_ci      RGBA16F_ARB                half          4        N     R G B A
2215bd8deadSopenharmony_ci      RGBA32F_ARB                float         4        N     R G B A
2225bd8deadSopenharmony_ci      RGBA8I_EXT                 byte          4        N     R G B A
2235bd8deadSopenharmony_ci      RGBA16I_EXT                short         4        N     R G B A
2245bd8deadSopenharmony_ci      RGBA32I_EXT                int           4        N     R G B A
2255bd8deadSopenharmony_ci      RGBA8UI_EXT                ubyte         4        N     R G B A
2265bd8deadSopenharmony_ci      RGBA16UI_EXT               ushort        4        N     R G B A
2275bd8deadSopenharmony_ci      RGBA32UI_EXT               uint          4        N     R G B A
2285bd8deadSopenharmony_ci
2295bd8deadSopenharmony_ci      Table X.1, Internal Formats for Buffer Textures.  For each format, the
2305bd8deadSopenharmony_ci      data type of each element is indicated in the "Base Type" column and the
2315bd8deadSopenharmony_ci      element count is in the "Components" column.  The "Norm" column
2325bd8deadSopenharmony_ci      indicates whether components should be treated as normalized
2335bd8deadSopenharmony_ci      floating-point values.  The "Component 0, 1, 2, and 3" columns indicate
2345bd8deadSopenharmony_ci      the mapping of each element of a texel to texture components.
2355bd8deadSopenharmony_ci
2365bd8deadSopenharmony_ci    In addition to attaching buffer objects to textures, buffer objects can be
2375bd8deadSopenharmony_ci    bound to the buffer object target named TEXTURE_BUFFER_EXT, in order to
2385bd8deadSopenharmony_ci    specify, modify, or read the buffer object's data store.  The buffer
2395bd8deadSopenharmony_ci    object bound to TEXTURE_BUFFER_EXT has no effect on rendering.  A buffer
2405bd8deadSopenharmony_ci    object is bound to TEXTURE_BUFFER_EXT by calling BindBuffer with <target>
2415bd8deadSopenharmony_ci    set to TEXTURE_BUFFER_EXT.  If no corresponding buffer object exists, one
2425bd8deadSopenharmony_ci    is initialized as defined in section 2.9.
2435bd8deadSopenharmony_ci
2445bd8deadSopenharmony_ci    The commands BufferData, BufferSubData, MapBuffer, and UnmapBuffer may all
2455bd8deadSopenharmony_ci    be used with <target> set to TEXTURE_BUFFER_EXT.  In this case, these
2465bd8deadSopenharmony_ci    commands operate in the same fashion as described in section 2.9, but on
2475bd8deadSopenharmony_ci    the buffer currently bound to the TEXTURE_BUFFER_EXT target.
2485bd8deadSopenharmony_ci
2495bd8deadSopenharmony_ci    Modify Section 3.8.11, Texture State and Proxy State (p. 178)
2505bd8deadSopenharmony_ci
2515bd8deadSopenharmony_ci    (insert into the first paragraph of the section, p. 178) ... a zero
2525bd8deadSopenharmony_ci    compressed size, and zero-sized components).  The buffer texture target
2535bd8deadSopenharmony_ci    contains an integer identifying the buffer object that buffer that
2545bd8deadSopenharmony_ci    provided the data store for the texture, initially zero, and an integer
2555bd8deadSopenharmony_ci    identifying the internal format of the texture, initially LUMINANCE8.
2565bd8deadSopenharmony_ci    Next, there are the two sets of texture properties; ...
2575bd8deadSopenharmony_ci
2585bd8deadSopenharmony_ci    Modify Section 3.8.12, Texture Objects (p. 180)
2595bd8deadSopenharmony_ci
2605bd8deadSopenharmony_ci    (modify first paragraphs of section, p. 180, simply adding references to
2615bd8deadSopenharmony_ci     buffer textures, which are treated as texture objects)
2625bd8deadSopenharmony_ci
2635bd8deadSopenharmony_ci    In addition to the default textures TEXTURE_1D, TEXTURE_2D, TEXTURE_3D,
2645bd8deadSopenharmony_ci    TEXTURE_CUBE_MAP, and TEXTURE_BUFFER_EXT, named one-, two-, and
2655bd8deadSopenharmony_ci    three-dimensional, cube map, and buffer texture objects can be created and
2665bd8deadSopenharmony_ci    operated upon. The name space for texture objects is the unsigned
2675bd8deadSopenharmony_ci    integers, with zero reserved by the GL.
2685bd8deadSopenharmony_ci
2695bd8deadSopenharmony_ci    A texture object is created by binding an unused name to TEXTURE_1D,
2705bd8deadSopenharmony_ci    TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, or TEXTURE_BUFFER_EXT. The
2715bd8deadSopenharmony_ci    binding is effected by calling
2725bd8deadSopenharmony_ci
2735bd8deadSopenharmony_ci      void BindTexture( enum target, uint texture );
2745bd8deadSopenharmony_ci
2755bd8deadSopenharmony_ci    with target set to the desired texture target and texture set to the
2765bd8deadSopenharmony_ci    unused name.  The resulting texture object is a new state vector,
2775bd8deadSopenharmony_ci    comprising all the state values listed in section 3.8.11, set to the same
2785bd8deadSopenharmony_ci    initial values. If the new texture object is bound to TEXTURE_1D,
2795bd8deadSopenharmony_ci    TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, or TEXTURE_BUFFER_EXT, it is and
2805bd8deadSopenharmony_ci    remains a one-, two-, three-dimensional, cube map, or buffer texture
2815bd8deadSopenharmony_ci    respectively until it is deleted.
2825bd8deadSopenharmony_ci
2835bd8deadSopenharmony_ci    BindTexture may also be used to bind an existing texture object to either
2845bd8deadSopenharmony_ci    TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, or
2855bd8deadSopenharmony_ci    TEXTURE_BUFFER_EXT. The error INVALID_OPERATION is generated if an attempt
2865bd8deadSopenharmony_ci    is made to bind a texture object of different dimensionality than the
2875bd8deadSopenharmony_ci    specified target. If the bind is successful no change is made to the state
2885bd8deadSopenharmony_ci    of the bound texture object, and any previous binding to target is broken.
2895bd8deadSopenharmony_ci
2905bd8deadSopenharmony_ci    ...
2915bd8deadSopenharmony_ci
2925bd8deadSopenharmony_ci    In the initial state, TEXTURE_1D, TEXTURE_2D, TEXTURE_3D,
2935bd8deadSopenharmony_ci    TEXTURE_CUBE_MAP, and TEXTURE_BUFFER_EXT have one-, two-,
2945bd8deadSopenharmony_ci    three-dimensional, cube map, and buffer texture state vectors respectively
2955bd8deadSopenharmony_ci    associated with them. In order that access to these initial textures not
2965bd8deadSopenharmony_ci    be lost, they are treated as texture objects all of whose names are 0. The
2975bd8deadSopenharmony_ci    initial one-, two-, three-dimensional, cube map, and buffer texture is
2985bd8deadSopenharmony_ci    therefore operated upon, queried, and applied as TEXTURE_1D, TEXTURE_2D,
2995bd8deadSopenharmony_ci    TEXTURE_3D, TEXTURE_CUBE_MAP, or TEXTURE_BUFFER_EXT respectively while 0
3005bd8deadSopenharmony_ci    is bound to the corresponding targets.
3015bd8deadSopenharmony_ci
3025bd8deadSopenharmony_ci    Texture objects are deleted by calling
3035bd8deadSopenharmony_ci
3045bd8deadSopenharmony_ci      void DeleteTextures( sizei n, uint *textures );
3055bd8deadSopenharmony_ci
3065bd8deadSopenharmony_ci    textures contains n names of texture objects to be deleted. After a
3075bd8deadSopenharmony_ci    texture object is deleted, it has no contents or dimensionality, and its
3085bd8deadSopenharmony_ci    name is again unused. If a texture that is currently bound to one of the
3095bd8deadSopenharmony_ci    targets TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, or
3105bd8deadSopenharmony_ci    TEXTURE_BUFFER_EXT is deleted, it is as though BindTexture had been
3115bd8deadSopenharmony_ci    executed with the same target and texture zero. Unused names in textures
3125bd8deadSopenharmony_ci    are silently ignored, as is the value zero.
3135bd8deadSopenharmony_ci
3145bd8deadSopenharmony_ci    (modify second paragraph, p. 182, adding buffer textures, plus cube map
3155bd8deadSopenharmony_ci    textures, which is an oversight in the core specification)
3165bd8deadSopenharmony_ci
3175bd8deadSopenharmony_ci    The texture object name space, including the initial one-, two-, and
3185bd8deadSopenharmony_ci    three-dimensional, cube map, and buffer texture objects, is shared among
3195bd8deadSopenharmony_ci    all texture units. A texture object may be bound to more than one texture
3205bd8deadSopenharmony_ci    unit simultaneously. After a texture object is bound, any GL operations on
3215bd8deadSopenharmony_ci    that target object affect any other texture units to which the same
3225bd8deadSopenharmony_ci    texture object is bound.
3235bd8deadSopenharmony_ci
3245bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment
3255bd8deadSopenharmony_ciOperations and the Frame Buffer)
3265bd8deadSopenharmony_ci
3275bd8deadSopenharmony_ci    None.
3285bd8deadSopenharmony_ci
3295bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions)
3305bd8deadSopenharmony_ci
3315bd8deadSopenharmony_ci    Modify Section 5.4, Display Lists (p. 237)
3325bd8deadSopenharmony_ci
3335bd8deadSopenharmony_ci    (modify "Vertex buffer objects" portion of the list of non-listable
3345bd8deadSopenharmony_ci    commands, p. 241)
3355bd8deadSopenharmony_ci
3365bd8deadSopenharmony_ci      Buffer objects: GenBuffers, DeleteBuffers, BindBuffer, BufferData,
3375bd8deadSopenharmony_ci      BufferSubData, MapBuffer, UnmapBuffer, and TexBufferEXT.
3385bd8deadSopenharmony_ci
3395bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 2.0 Specification (State and
3405bd8deadSopenharmony_ciState Requests)
3415bd8deadSopenharmony_ci
3425bd8deadSopenharmony_ci    Modify Section 6.1.13, Buffer Object Queries (p. 255)
3435bd8deadSopenharmony_ci
3445bd8deadSopenharmony_ci    (modify the first paragraph on p. 256) The command
3455bd8deadSopenharmony_ci    
3465bd8deadSopenharmony_ci      void GetBufferSubData( enum target, intptr offset,
3475bd8deadSopenharmony_ci                             sizeiptr size, void *data );
3485bd8deadSopenharmony_ci
3495bd8deadSopenharmony_ci    queries the data contents of a buffer object. target is ARRAY_BUFFER,
3505bd8deadSopenharmony_ci    ELEMENT_ARRAY_BUFFER, or TEXTURE_BUFFER_EXT. ...
3515bd8deadSopenharmony_ci
3525bd8deadSopenharmony_ci    (modify the last paragraph of the section, p. 256) While the data store of
3535bd8deadSopenharmony_ci    a buffer object is mapped, the pointer to the data store can be queried by
3545bd8deadSopenharmony_ci    calling
3555bd8deadSopenharmony_ci
3565bd8deadSopenharmony_ci      void GetBufferPointerv( enum target, enum pname, void **params );
3575bd8deadSopenharmony_ci
3585bd8deadSopenharmony_ci    with target set to ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER, or
3595bd8deadSopenharmony_ci    TEXTURE_BUFFER_EXT, and pname set to BUFFER MAP POINTER.
3605bd8deadSopenharmony_ci
3615bd8deadSopenharmony_ciAdditions to Appendix A of the OpenGL 2.0 Specification (Invariance)
3625bd8deadSopenharmony_ci
3635bd8deadSopenharmony_ci    None.
3645bd8deadSopenharmony_ci
3655bd8deadSopenharmony_ciAdditions to the AGL/GLX/WGL Specifications
3665bd8deadSopenharmony_ci
3675bd8deadSopenharmony_ci    None.
3685bd8deadSopenharmony_ci
3695bd8deadSopenharmony_ciDependencies on EXT_texture_array
3705bd8deadSopenharmony_ci
3715bd8deadSopenharmony_ci    If EXT_texture_array is supported, the introductory language describing
3725bd8deadSopenharmony_ci    buffer textures should acknowledge the existence of array textures.  Other
3735bd8deadSopenharmony_ci    than that, there are no dependencies between the two extensions.
3745bd8deadSopenharmony_ci
3755bd8deadSopenharmony_ciDependencies on NV_texture_shader
3765bd8deadSopenharmony_ci
3775bd8deadSopenharmony_ci    If NV_texture_shader is not supported, references to the signed normalized
3785bd8deadSopenharmony_ci    internal formats provided by that extension should be removed, and such
3795bd8deadSopenharmony_ci    formats may not be passed to TexBufferEXT.
3805bd8deadSopenharmony_ci
3815bd8deadSopenharmony_ciDependencies on EXT_texture_integer
3825bd8deadSopenharmony_ci
3835bd8deadSopenharmony_ci    If EXT_texture_integer is not supported, references to the signed and
3845bd8deadSopenharmony_ci    unsigned integer internal formats provided by that extension should be
3855bd8deadSopenharmony_ci    removed, and such formats may not be passed to TexBufferEXT.
3865bd8deadSopenharmony_ci
3875bd8deadSopenharmony_ciDependencies on ARB_texture_float
3885bd8deadSopenharmony_ci
3895bd8deadSopenharmony_ci    If ARB_texture_float is not supported, references to the floating-point
3905bd8deadSopenharmony_ci    internal formats provided by that extension should be removed, and such
3915bd8deadSopenharmony_ci    formats may not be passed to TexBufferEXT.
3925bd8deadSopenharmony_ci
3935bd8deadSopenharmony_ciDependencies on ARB_half_float_pixel
3945bd8deadSopenharmony_ci
3955bd8deadSopenharmony_ci    If ARB_texture_float is not supported, references to the 16-bit
3965bd8deadSopenharmony_ci    floating-point internal formats provided by ARB_texture_float should be
3975bd8deadSopenharmony_ci    removed, and such formats may not be passed to TexBufferEXT.  If an
3985bd8deadSopenharmony_ci    implementation supports ARB_texture_float, but does not support
3995bd8deadSopenharmony_ci    ARB_half_float_pixel, 16-bit floating-point texture formats may be
4005bd8deadSopenharmony_ci    available using normal texture mechanisms, but not with buffer textures.
4015bd8deadSopenharmony_ci
4025bd8deadSopenharmony_ciDependencies on EXT_framebuffer_object, ARB_framebuffer_object, and OpenGL
4035bd8deadSopenharmony_ci3.0
4045bd8deadSopenharmony_ci
4055bd8deadSopenharmony_ci    If framebuffer objects are supported (via EXT_framebuffer_object,
4065bd8deadSopenharmony_ci    ARB_framebuffer_object, or OpenGL 3.0), buffer textures may not be
4075bd8deadSopenharmony_ci    attached to framebuffer objects.  
4085bd8deadSopenharmony_ci
4095bd8deadSopenharmony_ci    No modifications to these extensions is technically required, since they
4105bd8deadSopenharmony_ci    already enumerate the set of valid texture targets supported (e.g.,
4115bd8deadSopenharmony_ci    TEXTURE_2D) and the list does not include TEXTURE_BUFFER_EXT.
4125bd8deadSopenharmony_ci
4135bd8deadSopenharmony_ciErrors
4145bd8deadSopenharmony_ci
4155bd8deadSopenharmony_ci    INVALID_OPERATION is generated by TexBufferEXT if <buffer> is non-zero and
4165bd8deadSopenharmony_ci    is not the name of an existing buffer object.
4175bd8deadSopenharmony_ci
4185bd8deadSopenharmony_ciNew State
4195bd8deadSopenharmony_ci
4205bd8deadSopenharmony_ci    (add to table 6.15, Texture State Per Texture Unit/Binding Point p. 276)
4215bd8deadSopenharmony_ci
4225bd8deadSopenharmony_ci                                                            Initial
4235bd8deadSopenharmony_ci    Get Value                           Type    Get Command  Value  Description                 Sec.    Attribute
4245bd8deadSopenharmony_ci    ---------------------------------   ----    ----------- ------- --------------------------- ------  ---------
4255bd8deadSopenharmony_ci    TEXTURE_BINDING_BUFFER_EXT          2*xZ+   GetIntegerv    0    Texture object bound to     3.8.12  texture
4265bd8deadSopenharmony_ci                                                                    TEXTURE_BUFFER_EXT
4275bd8deadSopenharmony_ci
4285bd8deadSopenharmony_ci    (add to table 6.16, Texture State Per Texture Object, p. 276)
4295bd8deadSopenharmony_ci
4305bd8deadSopenharmony_ci                                                            Initial
4315bd8deadSopenharmony_ci    Get Value                           Type    Get Command  Value  Description                 Sec.    Attribute
4325bd8deadSopenharmony_ci    ---------------------------------   ----    ----------- ------- --------------------------- ------  ---------
4335bd8deadSopenharmony_ci    TEXTURE_BUFFER_DATA_STORE_          nxZ+    GetIntegerv    0    Buffer object bound as      3.8.12  texture
4345bd8deadSopenharmony_ci      BINDING_EXT                                                   the data store for the 
4355bd8deadSopenharmony_ci                                                                    active image unit's buffer
4365bd8deadSopenharmony_ci                                                                    texture
4375bd8deadSopenharmony_ci    TEXTURE_BUFFER_FORMAT_EXT           nxZ+    GetIntegerv  LUMIN- Internal format for the     3.8.12  texture
4385bd8deadSopenharmony_ci                                                             ANCE8  active image unit's buffer
4395bd8deadSopenharmony_ci                                                                    texture
4405bd8deadSopenharmony_ci
4415bd8deadSopenharmony_ci    (add to table 6.37, Miscellaneous State, p. 298)
4425bd8deadSopenharmony_ci
4435bd8deadSopenharmony_ci                                                            Initial
4445bd8deadSopenharmony_ci    Get Value                           Type    Get Command  Value  Description                 Sec.    Attribute
4455bd8deadSopenharmony_ci    ---------------------------------   ----    ----------- ------- --------------------------- ------  ---------
4465bd8deadSopenharmony_ci    TEXTURE_BUFFER_EXT                   Z+     GetIntegerv    0    Buffer object bound to      3.8.12  texture
4475bd8deadSopenharmony_ci                                                                    the generic buffer texture
4485bd8deadSopenharmony_ci                                                                    binding point
4495bd8deadSopenharmony_ci
4505bd8deadSopenharmony_ciNew Implementation Dependent State
4515bd8deadSopenharmony_ci
4525bd8deadSopenharmony_ci    (modify Table 6.32, p. 293)
4535bd8deadSopenharmony_ci                                                    Minimum
4545bd8deadSopenharmony_ci    Get Value                    Type  Get Command   Value   Description            Sec.   Attribute
4555bd8deadSopenharmony_ci    ---------------------------  ----  -----------  -------  ---------------------  -----  ---------
4565bd8deadSopenharmony_ci    MAX_TEXTURE_BUFFER_SIZE_EXT   Z+   GetIntegerv   65536   number of addressable  3.8.4      -
4575bd8deadSopenharmony_ci                                                             texels for buffer
4585bd8deadSopenharmony_ci                                                             textures
4595bd8deadSopenharmony_ci
4605bd8deadSopenharmony_ciIssues
4615bd8deadSopenharmony_ci
4625bd8deadSopenharmony_ci    (1) Buffer textures are potentially large one-dimensional arrays that can
4635bd8deadSopenharmony_ci        be accessed with single-texel fetches.  How should this functionality
4645bd8deadSopenharmony_ci        be exposed?
4655bd8deadSopenharmony_ci
4665bd8deadSopenharmony_ci      RESOLVED:  Several options were considered.  The final approach creates
4675bd8deadSopenharmony_ci      a new type of texture object, called a buffer texture, whose texel array
4685bd8deadSopenharmony_ci      is taken from the data store from a buffer object.  The combined set of
4695bd8deadSopenharmony_ci      extensions using buffer objects provides numerous locations where the GL
4705bd8deadSopenharmony_ci      can read and write data to a buffer object:
4715bd8deadSopenharmony_ci
4725bd8deadSopenharmony_ci        EXT_vertex_buffer_object allows vertex attributes to be pulled from a
4735bd8deadSopenharmony_ci        buffer object.
4745bd8deadSopenharmony_ci
4755bd8deadSopenharmony_ci        EXT_pixel_buffer_object allows pixel operations (DrawPixels,
4765bd8deadSopenharmony_ci        ReadPixels, TexImage) to read or write data to a buffer object.
4775bd8deadSopenharmony_ci
4785bd8deadSopenharmony_ci        EXT_parameter_buffer_object and EXT_bindable_uniform allows assembly
4795bd8deadSopenharmony_ci        vertex, fragment, and geometry programs, and all GLSL shaders to read
4805bd8deadSopenharmony_ci        program parameter / uniform data from a buffer object.
4815bd8deadSopenharmony_ci
4825bd8deadSopenharmony_ci        EXT_texture_buffer_object allows programs to read texture data from a
4835bd8deadSopenharmony_ci        buffer object.
4845bd8deadSopenharmony_ci
4855bd8deadSopenharmony_ci        NV_transform_feedback allows programs to write transformed vertex
4865bd8deadSopenharmony_ci        attributes to a buffer object.
4875bd8deadSopenharmony_ci
4885bd8deadSopenharmony_ci      When combined, interesting feedback paths are possible, where large
4895bd8deadSopenharmony_ci      arrays of data can be generated by the GPU and the consumed by it in
4905bd8deadSopenharmony_ci      multi-pass algorithms, using the buffer object's storage to hold
4915bd8deadSopenharmony_ci      intermediate data.  This allows applications to run complicated
4925bd8deadSopenharmony_ci      algorithms on the GPU without necessarily pulling data back to host CPU
4935bd8deadSopenharmony_ci      for additional processing.
4945bd8deadSopenharmony_ci
4955bd8deadSopenharmony_ci      Given that buffer object memory is visible to users as raw memory, all
4965bd8deadSopenharmony_ci      uses of the memory must have well-defined data formats.  For VBO and
4975bd8deadSopenharmony_ci      PBO, those formats are explicitly given by calls such as VertexPointer,
4985bd8deadSopenharmony_ci      TexImage2D, or ReadPixels.  When used as a buffer texture, it is
4995bd8deadSopenharmony_ci      necessary to specify an internal format with which the bytes of the
5005bd8deadSopenharmony_ci      buffer object's data store are interpreted.
5015bd8deadSopenharmony_ci
5025bd8deadSopenharmony_ci      Another option considered was to greatly increase the maximum texture
5035bd8deadSopenharmony_ci      size for 1D texture.  This has the advantage of not requiring new
5045bd8deadSopenharmony_ci      mechanisms.  However, there are a couple limitations of this approach.
5055bd8deadSopenharmony_ci      First, conventional textures have their own storage that is not
5065bd8deadSopenharmony_ci      accessible elsewhere, which limits some of the sharing opportunities
5075bd8deadSopenharmony_ci      described above.  Second, buffer textures do have slightly different
5085bd8deadSopenharmony_ci      hardware implementations than 1D textures.  In the hardware of interest,
5095bd8deadSopenharmony_ci      "normal" 1D textures can be mipmapped and filtered, but have a maximum
5105bd8deadSopenharmony_ci      size that is considerably smaller than that supported for buffer
5115bd8deadSopenharmony_ci      textures.  If both texture types used the same API mechanism, it might
5125bd8deadSopenharmony_ci      be necessary to reprogram texture hardware and/or shaders depending on
5135bd8deadSopenharmony_ci      the size of the textures used.  This will incur CPU overhead to
5145bd8deadSopenharmony_ci      determine if such reprogramming is necessary and to perform the
5155bd8deadSopenharmony_ci      reprogramming if so.
5165bd8deadSopenharmony_ci
5175bd8deadSopenharmony_ci    (2) Since buffer textures borrow storage from buffer objects, whose
5185bd8deadSopenharmony_ci        storage is visible to applications, a format must be imposed on the
5195bd8deadSopenharmony_ci        bytes of the buffer object.  What texture formats are supported for
5205bd8deadSopenharmony_ci        buffer objects?
5215bd8deadSopenharmony_ci
5225bd8deadSopenharmony_ci      RESOLVED:  All sized one-, two-, and four-component internal formats
5235bd8deadSopenharmony_ci      with 8-, 16-, and 32-bit components are supported.  Unsized internal
5245bd8deadSopenharmony_ci      formats, and sized formats with other component sizes are also not
5255bd8deadSopenharmony_ci      supported.  Three-component (RGB) formats are not supported due to
5265bd8deadSopenharmony_ci      hardware limitations.
5275bd8deadSopenharmony_ci
5285bd8deadSopenharmony_ci      All component data types supported for normal textures are also
5295bd8deadSopenharmony_ci      supported for buffer textures.  This includes unsigned [0,1] normalized
5305bd8deadSopenharmony_ci      components (e.g., RGBA8), floating-point components from
5315bd8deadSopenharmony_ci      ARB_texture_float (e.g., RGBA32F_ARB), signed and unsigned integer
5325bd8deadSopenharmony_ci      components from EXT_texture_integer (e.g., RGBA8I_EXT, RGBA16UI_EXT),
5335bd8deadSopenharmony_ci      and signed [-1,+1] normalized components from NV_texture_shader (e.g.,
5345bd8deadSopenharmony_ci      SIGNED_RGBA8_NV).
5355bd8deadSopenharmony_ci
5365bd8deadSopenharmony_ci    (3) How can arrays of three-component vectors be accessed by applications?
5375bd8deadSopenharmony_ci
5385bd8deadSopenharmony_ci      RESOLVED:  Several approaches are possible.  
5395bd8deadSopenharmony_ci
5405bd8deadSopenharmony_ci      First, the vectors can be padded out to four components (RGBA), with an
5415bd8deadSopenharmony_ci      extra unused component for each texel.  This has a couple undesirable
5425bd8deadSopenharmony_ci      properties:  it adds 33% to the required storage and adding the extra
5435bd8deadSopenharmony_ci      component may require reformatting of original data generated by the
5445bd8deadSopenharmony_ci      application.  However, the data in this format can be retrieved with a
5455bd8deadSopenharmony_ci      single 32-, 64-, or 128-bit lookup.  
5465bd8deadSopenharmony_ci
5475bd8deadSopenharmony_ci      Alternately, the buffer texture can be defined using a single component,
5485bd8deadSopenharmony_ci      and a shader can perform three lookups to separately fetch texels 3*N,
5495bd8deadSopenharmony_ci      3*N+1, and 3*N+2, combining the result in a three-component vector
5505bd8deadSopenharmony_ci      representing "RGB" texel N.  This doesn't require extra storage or
5515bd8deadSopenharmony_ci      reformatting and doesn't require additional bandwidth for texture
5525bd8deadSopenharmony_ci      fetches.  But it does require additional shader instructions to obtain
5535bd8deadSopenharmony_ci      each texel.
5545bd8deadSopenharmony_ci
5555bd8deadSopenharmony_ci    (4) Does this extension support fixed-function fragment processing,
5565bd8deadSopenharmony_ci        somehow allowing buffer textures to be accessed without programmable
5575bd8deadSopenharmony_ci        shaders?
5585bd8deadSopenharmony_ci
5595bd8deadSopenharmony_ci      RESOLVED:  No.  We expect that it would be difficult to properly access
5605bd8deadSopenharmony_ci      a buffer texture and combine the returned texel with other color or
5615bd8deadSopenharmony_ci      texture data, given the extremely limited programming model provided by
5625bd8deadSopenharmony_ci      fixed-function fragment processing.
5635bd8deadSopenharmony_ci
5645bd8deadSopenharmony_ci      Note also that the single-precision floating-point representation
5655bd8deadSopenharmony_ci      commonly used by current graphics hardware is not sufficiently precise
5665bd8deadSopenharmony_ci      to exactly represent all texels in a large buffer texture.  For example,
5675bd8deadSopenharmony_ci      it is not possible to represent 2^24+1 using the 32-bit IEEE
5685bd8deadSopenharmony_ci      floating-point representation.
5695bd8deadSopenharmony_ci
5705bd8deadSopenharmony_ci    (5) What happens if a buffer object is deleted or respecified when bound
5715bd8deadSopenharmony_ci        to a buffer texture?
5725bd8deadSopenharmony_ci
5735bd8deadSopenharmony_ci      RESOLVED: BufferData is allowed to be used to update a buffer object that
5745bd8deadSopenharmony_ci      has already been bound to a texture with TexBuffer. The update to the data
5755bd8deadSopenharmony_ci      is not guaranteed to affect the texture until next time it is bound to a
5765bd8deadSopenharmony_ci      texture image unit.  When DeleteBuffers is called, any buffer that is
5775bd8deadSopenharmony_ci      bound to a texture is removed from the names array, but remains as long as
5785bd8deadSopenharmony_ci      it is bound to a texture.  The buffer is fully removed when the texture
5795bd8deadSopenharmony_ci      unbinds it or when the texture buffer object is deleted.
5805bd8deadSopenharmony_ci
5815bd8deadSopenharmony_ci    (6) Should applications be able to modify the data store of a buffer
5825bd8deadSopenharmony_ci        object while it is bound to a buffer texture?
5835bd8deadSopenharmony_ci
5845bd8deadSopenharmony_ci      RESOLVED: An application is allowed to update the data store for a buffer
5855bd8deadSopenharmony_ci      object when the buffer object is bound to a texture.
5865bd8deadSopenharmony_ci
5875bd8deadSopenharmony_ci    (7) Do buffer textures support texture parameters (TexParameter) or
5885bd8deadSopenharmony_ci        queries (GetTexParameter, GetTexLevelParameter, GetTexImage)?
5895bd8deadSopenharmony_ci
5905bd8deadSopenharmony_ci      RESOLVED:  No.  None of the existing parameters apply to buffer
5915bd8deadSopenharmony_ci      textures, and this extension doesn't introduce the need for any new
5925bd8deadSopenharmony_ci      ones.  Buffer textures have no levels, and the size in texels is
5935bd8deadSopenharmony_ci      implicit (based on the data store).  Given that the texels themselves
5945bd8deadSopenharmony_ci      are obtained from a buffer object, it seems more appropriate to retrieve
5955bd8deadSopenharmony_ci      such data with buffer object queries.  The only "parameter" of a buffer
5965bd8deadSopenharmony_ci      texture is the internal format, which is specified at the same time the
5975bd8deadSopenharmony_ci      buffer object is bound.
5985bd8deadSopenharmony_ci
5995bd8deadSopenharmony_ci      Note that the spec edits above don't add explicit error language for any
6005bd8deadSopenharmony_ci      of these cases.  That is because each of the functions enumerate the set
6015bd8deadSopenharmony_ci      of valid <target> parameters.  Not editing the spec to allow
6025bd8deadSopenharmony_ci      TEXTURE_BUFFER_EXT in these cases means that target is not legal, and an
6035bd8deadSopenharmony_ci      INVALID_ENUM error should be generated.
6045bd8deadSopenharmony_ci
6055bd8deadSopenharmony_ci    (8) What about indirect rendering with a mix of big- and little-endian
6065bd8deadSopenharmony_ci        clients?  If components are 16- or 32-bit, how are they interpreted?
6075bd8deadSopenharmony_ci
6085bd8deadSopenharmony_ci      RESOLVED:  Buffer object data are interpreted according to the native
6095bd8deadSopenharmony_ci      representation of the server.  If the server and client have different
6105bd8deadSopenharmony_ci      endianness, applications must perform byte swapping as needed to match
6115bd8deadSopenharmony_ci      the server's representation.  No mechanism is provided to perform this
6125bd8deadSopenharmony_ci      byte swapping on buffer object updates or when texels are fetched.
6135bd8deadSopenharmony_ci
6145bd8deadSopenharmony_ci      The same problem also exists when buffer objects are used for vertex
6155bd8deadSopenharmony_ci      arrays (VBO).  For buffer objects used for pixel packing and unpacking
6165bd8deadSopenharmony_ci      (ARB_pixel_buffer_object), the PixelStore byte swapping parameters
6175bd8deadSopenharmony_ci      (PACK_SWAP_BYTES, UNPACK_SWAP_BYTES) would presumably apply and could be
6185bd8deadSopenharmony_ci      used to perform the necessary byte swapping.
6195bd8deadSopenharmony_ci
6205bd8deadSopenharmony_ci    (9) Should the set of formats supported for buffer textures be enumerated,
6215bd8deadSopenharmony_ci        or should the extension instead nominally support all formats, but
6225bd8deadSopenharmony_ci        accept only an implementation-dependent subset?
6235bd8deadSopenharmony_ci
6245bd8deadSopenharmony_ci      RESOLVED:  Provide a specified set of supported formats.  This
6255bd8deadSopenharmony_ci      extension simply enumerates all 8-, 16-, and 32-byte internal formats
6265bd8deadSopenharmony_ci      with 1, 2, or 4 components, and specifies the mapping of unformatted
6275bd8deadSopenharmony_ci      buffer object data to texture components.  A follow-on extension could
6285bd8deadSopenharmony_ci      be done to support 3-component texels when better native hardware
6295bd8deadSopenharmony_ci      support is available.  
6305bd8deadSopenharmony_ci
6315bd8deadSopenharmony_ci      Other than 3-component texels, the set of formats supported seems pretty
6325bd8deadSopenharmony_ci      compehensive.  We expect that buffer textures would be used for general
6335bd8deadSopenharmony_ci      computational tasks, where there is little need for formats with smaller
6345bd8deadSopenharmony_ci      components (e.g., RGBA4444).  Such formats are generally not supported
6355bd8deadSopenharmony_ci      natively on CPUs today.  With the general computational model provided
6365bd8deadSopenharmony_ci      by NV_gpu_program4 and EXT_gpu_shader4, it would be possible to treat
6375bd8deadSopenharmony_ci      such "packed" formats as larger single-component formats and unpack them
6385bd8deadSopenharmony_ci      with a small number of shader instructions.
6395bd8deadSopenharmony_ci
6405bd8deadSopenharmony_ci      If and when double-precision floats or 64-bit integers are supported as
6415bd8deadSopenharmony_ci      basic types usable by shaders, we would expect that an extension would
6425bd8deadSopenharmony_ci      add new texture internal formats with 64-bit components and that those
6435bd8deadSopenharmony_ci      formats would also be supported for general-purpose textures and buffer
6445bd8deadSopenharmony_ci      textures as well.
6455bd8deadSopenharmony_ci
6465bd8deadSopenharmony_ci    (10) How are buffer textures supported in GLSL?
6475bd8deadSopenharmony_ci
6485bd8deadSopenharmony_ci      RESOLVED:  Create a new sampler type (samplerBuffer) for buffer textures
6495bd8deadSopenharmony_ci      and add a new lookup function (texelFetchBuffer) to explicitly access
6505bd8deadSopenharmony_ci      them using texture hardware.
6515bd8deadSopenharmony_ci
6525bd8deadSopenharmony_ci      Other possibilities considered included extending the notion of bindable
6535bd8deadSopenharmony_ci      uniforms to support uniforms whose corresponding buffer objects can be
6545bd8deadSopenharmony_ci      bound to texture resources (e.g., "texture bindable uniform" instead of
6555bd8deadSopenharmony_ci      "bindable uniform").  We also considered automatically assigning
6565bd8deadSopenharmony_ci      bindable uniforms to texture or shader resources as appropriate.  Note
6575bd8deadSopenharmony_ci      that the restrictions, size limits, and performance characterstics of
6585bd8deadSopenharmony_ci      buffer textures and parameter buffers (NV_parameter_buffer_object)
6595bd8deadSopenharmony_ci      differ.  Automatic handling of uniforms adds driver complexity and may
6605bd8deadSopenharmony_ci      tend to hide performance characteristics since it isn't clear what
6615bd8deadSopenharmony_ci      resource would be used for what variable.  Additionally, it could
6625bd8deadSopenharmony_ci      require shader recompilation if the size of a uniform array is variable,
6635bd8deadSopenharmony_ci      and the hardware resource used depended on the size.  
6645bd8deadSopenharmony_ci
6655bd8deadSopenharmony_ci      In the end, the texture approach seemed the simplest, and we chose that.
6665bd8deadSopenharmony_ci      It might be worth doing something more complex in the future.
6675bd8deadSopenharmony_ci
6685bd8deadSopenharmony_ci    (11) What is the TEXTURE_BUFFER_EXT buffer object binding point good for?
6695bd8deadSopenharmony_ci
6705bd8deadSopenharmony_ci      RESOLVED:  It can be used for loading data into buffer objects, and for
6715bd8deadSopenharmony_ci      mapping and unmapping buffers, both without disturbing other binding
6725bd8deadSopenharmony_ci      points.  Otherwise, it has no effect on GL operations, since buffer
6735bd8deadSopenharmony_ci      objects are bound to textures using the TexBufferEXT() command that does
6745bd8deadSopenharmony_ci      not affect the buffer object binding point.
6755bd8deadSopenharmony_ci
6765bd8deadSopenharmony_ci      Buffer object binding points have mixed usage.  In the
6775bd8deadSopenharmony_ci      EXT_vertex_buffer_object extension (OpenGL 1.5), there are two binding
6785bd8deadSopenharmony_ci      points.  The ELEMENT_ARRAY_BUFFER has a direct effect on rendering, as
6795bd8deadSopenharmony_ci      it modifies DrawElements() calls.  The effect of ARRAY_BUFFER is much
6805bd8deadSopenharmony_ci      more indirect; it is only used to affect subsequent vertex array calls
6815bd8deadSopenharmony_ci      (e.g., VertexPointer) and has no direct effect on rendering.  The reason
6825bd8deadSopenharmony_ci      for this is that the API was retrofitted on top of existing vertex array
6835bd8deadSopenharmony_ci      APIs.  If a new vertex array API were created that emphasized or even
6845bd8deadSopenharmony_ci      required the use of buffer objects, it seems likely that the buffer
6855bd8deadSopenharmony_ci      object would be included in the calls equivalent to today's
6865bd8deadSopenharmony_ci      VertexPointer() call.
6875bd8deadSopenharmony_ci
6885bd8deadSopenharmony_ci    (12) How is the various buffer texture-related state queried?
6895bd8deadSopenharmony_ci
6905bd8deadSopenharmony_ci      RESOLVED:  There are three pieces of state that can be queried:  (a) the
6915bd8deadSopenharmony_ci      texture object bound to buffer texture binding point for the active
6925bd8deadSopenharmony_ci      texture image unit, (b) the buffer object whose data store was used by
6935bd8deadSopenharmony_ci      that texture object, and (c) the buffer object bound to the
6945bd8deadSopenharmony_ci      TEXTURE_BUFFER_EXT binding point.
6955bd8deadSopenharmony_ci
6965bd8deadSopenharmony_ci      All three are queried with GetIntegerv, because it didn't seem worth the
6975bd8deadSopenharmony_ci      trouble to add one or more new query functions.  Note that for (a) and
6985bd8deadSopenharmony_ci      (b), the texture queried is the one bound to TEXTURE_BUFFER_EXT on the
6995bd8deadSopenharmony_ci      active texture image unit.
7005bd8deadSopenharmony_ci
7015bd8deadSopenharmony_ci    (13) Should we provide a new set of names for the signed normalized
7025bd8deadSopenharmony_ci         textures introduced in NV_texture_shader that match the convention
7035bd8deadSopenharmony_ci         used for floating-point and integer textures?
7045bd8deadSopenharmony_ci
7055bd8deadSopenharmony_ci      RESOLVED: No.
7065bd8deadSopenharmony_ci
7075bd8deadSopenharmony_ci    (14) Can a buffer object be attached to more than one buffer texture at
7085bd8deadSopenharmony_ci         once?
7095bd8deadSopenharmony_ci
7105bd8deadSopenharmony_ci      RESOLVED: Multiple buffer textures may attach to the same buffer object
7115bd8deadSopenharmony_ci      simultaneously.
7125bd8deadSopenharmony_ci
7135bd8deadSopenharmony_ci    (15) How does this extension interact with display lists?
7145bd8deadSopenharmony_ci
7155bd8deadSopenharmony_ci      RESOLVED:  Buffer object commands can't be compiled into a display list.
7165bd8deadSopenharmony_ci      The new command in this extension uses buffer objects, so we specify
7175bd8deadSopenharmony_ci      that it also can't be compiled into a display list.
7185bd8deadSopenharmony_ci
7195bd8deadSopenharmony_ci    (16) Can buffer textures be rendered to via framebuffer objects?
7205bd8deadSopenharmony_ci
7215bd8deadSopenharmony_ci      RESOLVED:  No, not in this extension.
7225bd8deadSopenharmony_ci
7235bd8deadSopenharmony_ci
7245bd8deadSopenharmony_ciRevision History
7255bd8deadSopenharmony_ci
7265bd8deadSopenharmony_ci    Rev.    Date    Author    Changes
7275bd8deadSopenharmony_ci    ----  --------  --------  -----------------------------------------
7285bd8deadSopenharmony_ci      8   02/21/14  pbrown    Clarify in the introduction that the minimum
7295bd8deadSopenharmony_ci                              required MAX_TEXTURE_BUFFER_SIZE_EXT is only
7305bd8deadSopenharmony_ci                              64K, and that the 2^27 number in the intro was
7315bd8deadSopenharmony_ci                              referred to the initial implementation.
7325bd8deadSopenharmony_ci
7335bd8deadSopenharmony_ci      7   10/08/09  pbrown    Minor typo fix in the introduction.
7345bd8deadSopenharmony_ci
7355bd8deadSopenharmony_ci      6   10/21/08  pbrown    Clarify that buffer textures can not be
7365bd8deadSopenharmony_ci                              used in conjunction with FBO.
7375bd8deadSopenharmony_ci
7385bd8deadSopenharmony_ci      5   04/16/08  pbrown    Clarify that either NV_gpu_program4 or 
7395bd8deadSopenharmony_ci                              EXT_gpu_shader4 is required, not simply
7405bd8deadSopenharmony_ci                              NV_gpu_program4.
7415bd8deadSopenharmony_ci
7425bd8deadSopenharmony_ci      4   10/30/07  ewerness  Add resolutions to various issues
7435bd8deadSopenharmony_ci
7445bd8deadSopenharmony_ci      3      --               Pre-release revisions.
745