• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    NV_EGL_stream_consumer_external
4
5Name Strings
6
7    GL_NV_EGL_stream_consumer_external
8
9Contributors
10
11    Acorn Pooley
12
13Contacts
14
15    Acorn Pooley, NVIDIA Corporation (apooley 'at' nvidia.com)
16
17Status
18
19    DRAFT
20
21Version
22
23    Version 3, July 19, 2012
24
25Number
26
27    OpenGL ES Extension #104
28
29Dependencies
30
31    Requires OpenGL ES 1.1 or OpenGL ES 2.0.
32
33    Requires EGL 1.2
34
35    Requires the EGL_KHR_stream and EGL_NV_stream_consumer_gltexture
36    extensions.  (Also requires any EGL stream_producer extension to
37    be useful.)
38
39    This extension is written based on the wording of the OpenGL ES
40    2.0 specification, the OpenGL ES Shading Language version 1.0, the
41    EGL_KHR_stream extension, and the EGL_NV_stream_consumer_gltexture
42    extension.  On an OpenGL ES 2.0 implementation, ignore sections
43    which are added only to the OpenGL ES 1.1 specification.
44
45    This extension is also written based on the wording of the OpenGL
46    ES 1.1 specification.  On an OpenGL ES 1.X implementation, ignore
47    sections which are added only to the OpenGL ES 2.0 or OpenGL ES
48    Shading Language specification.  Also ignore all mention of
49    MAX_VERTEX_TEXTURE_IMAGE_UNITS, and
50    MAX_COMBINED_TEXTURE_IMAGE_UNITS.
51
52    This extension borrows concepts and function names from the
53    GL_OES_EGL_image_external extension.  This extension is compatible
54    with, but does not require, the GL_OES_EGL_image_external
55    extension.  The presence of the GL_OES_EGL_image_external
56    extension affects the wording of this extension (and vice versa)
57    as described in this (the GL_NV_EGL_stream_consumer_external)
58    extension.
59
60Overview
61
62    This extension provides a mechanism for streaming image frames
63    into a GL texture.  This extension defines a new texture target,
64    TEXTURE_EXTERNAL_OES (which is else defined in the
65    GL_OES_EGL_image_external extension).  This texture target can
66    only be specified as being the consumer of an EGLStream.  (If the
67    GL_OES_EGL_image_external extension is present it may
68    alternatively be specified from an EGLImage as described in that
69    extension.)
70
71    There is no support for most of the functions that manipulate
72    other texture targets (e.g. you cannot use gl*Tex*Image*()
73    functions with TEXTURE_EXTERNAL_OES).  Also, TEXTURE_EXTERNAL_OES
74    targets never have more than a single LOD level.  Because of these
75    restrictions, it is possible to bind EGLStreams which have
76    internal formats not otherwise supported by OpenGL ES.  For
77    example some implementations may allow EGLStreams with planar or
78    interleaved YUV data to be GLES texture target siblings.  It is up
79    to the implementation exactly what formats are accepted.
80
81Glossary
82
83    Please see the EGL_KHR_stream specification for a glossary of
84    terms used by this specification.
85
86New Types
87
88    /* (OpenGL ES 2.x only)
89     * New sampler type allowed by the OpenGL ES Shading Language when
90     *      #extension GL_NV_EGL_stream_consumer_external
91     * is used, also available if GL_OES_EGL_image_external is
92     * supported and
93     *      #extension GL_OES_EGL_image_external
94     * is used.
95     */
96    samplerExternalOES
97
98New Tokens
99
100     Accepted as a target in the <target> parameter of BindTexture:
101
102        TEXTURE_EXTERNAL_OES                                0x8D65
103
104    (OpenGL ES 2.x only) Returned in the <type> parameter of GetActiveUniform:
105        SAMPLER_EXTERNAL_OES                                0x8D66
106
107    Accepted as <value> in GetIntegerv() and GetFloatv() queries:
108        TEXTURE_BINDING_EXTERNAL_OES                        0x8D67
109
110    Accepted as <value> in GetTexParameter*() queries:
111        REQUIRED_TEXTURE_IMAGE_UNITS_OES                    0x8D68
112
113
114Additions to Chapter 3 of the OpenGL 1.1 or OpenGL 2.0 Specification
115
116    - For OpenGL ES 2.0 add a new section: "3.7.14 External Textures,"
117    which follows section "3.7.13 Texture Objects."  For OpenGL ES 1.1
118    add the new section after section "3.7.11 Texture Objects." If the
119    GL_OES_EGL_image_external extension is also present, then skip
120    this addition (use section "3.7.14 External Textures," from that
121    extension as-is).  If the GL_OES_EGL_image_external extension is
122    not present then insert it as follows (this is a subset of the
123    section "3.7.14 External Textures" from
124    GL_OES_EGL_image_external).
125
126        "3.7.14 External Textures
127
128        External textures cannot be used with TexImage2D,
129        TexSubImage2D, CompressedTexImage2D, CompressedTexSubImage2D,
130        CopyTexImage2D, or CopyTexSubImage2D, and an INVALID_ENUM
131        error will be generated if this is attempted.  Their default
132        min filter is LINEAR.  It is an INVALID_ENUM error to set the
133        min filter value to anything other than LINEAR or NEAREST.
134        The default s and t wrap modes are CLAMP_TO_EDGE and it is an
135        INVALID_ENUM error to set the wrap mode to any other value.
136        (For OpenGL ES 1.x only: The texture parameter GENERATE_MIPMAP
137        is always FALSE, and setting it to any other value generates
138        an INVALID_ENUM error.  (For OpenGL ES 2.x only: Calling
139        GenerateMipmaps with <target> set to TEXTURE_EXTERNAL_OES
140        results in an INVALID_ENUM.)
141
142        Each TEXTURE_EXTERNAL_OES texture object may require up to 3
143        texture image units for each texture unit to which it is
144        bound.  The number of texture image units required by a bound
145        texture object can be queried using GetTexParameteriv() with
146        <target> set to the texture target in question, <value> set to
147        REQUIRED_TEXTURE_IMAGE_UNITS_OES, and ActiveTexture set to the
148        texture unit to which the texture object is bound.  When
149        <target> is set to TEXTURE_EXTERNAL_OES this value will be
150        between 1 and 3 (inclusive).  For other valid texture targets
151        this value will always be 1.  Note that, when a
152        TEXTURE_EXTERNAL_OES texture object is bound, the number of
153        texture image units required by a single texture unit may be
154        1, 2, or 3, while for other texture objects each texture unit
155        requires exactly 1 texture image unit.
156
157        (For OpenGL ES 1.x only) DrawArrays and DrawElements will fail
158        and generate an INVALID_OPERATION error if the number of
159        texture image units required is greater than the number
160        available.  The number of required texture image units is
161        equal to the sum of the requirements for each enabled texture
162        unit.  For each texture unit the requirement is the value
163        returned by GetTexParameteriv() when <value> is set to
164        REQUIRED_TEXTURE_IMAGE_UNITS_OES, <target> is set to the
165        target which is enabled, and ActiveTexture has been set to the
166        texture unit in question.
167
168        (For OpenGL ES 2.x only) DrawArrays and DrawElements will fail
169        and generate an INVALID_OPERATION error if the number of
170        texture image units required is greater than the number
171        available.  The number of required texture image units for
172        each stage (fragment or vertex) is equal to the sum of the
173        requirements for each sampler referenced by the stage.  A
174        sampler is considered referenced if its location (returned by
175        GetUniformLocation) is not -1.  For each referenced sampler
176        the requirement is the value returned by GetTexParameteriv()
177        when <value> is set to REQUIRED_TEXTURE_IMAGE_UNITS_OES,
178        <target> is set to the target corresponding to the sampler
179        type, and ActiveTexture has been set to the texture unit
180        corresponding to the value of the sampler uniform.  The
181        condition can be detected by calling ValidateProgram.
182
183        (For OpenGL ES 2.x only) A shader that uses external texture
184        samplers may require some number of hidden uniform variables
185        to implement the conversion from YUV to RGB, and this may
186        reduce the amount of space available for uniforms defined by
187        the shader program.  This may cause a shader program which was
188        working to stop working when a different external texture is
189        used (i.e. when Uniform1i or BindTexture is called).  If there
190        are not enough uniforms available then calls to DrawArrays or
191        DrawElements will fail and generate an INVALID_OPERATION
192        error.  This condition can be detected by calling
193        ValidateProgram.
194
195        Sampling an external texture will return an RGBA vector in the
196        same colorspace as the source image frame.  If the source
197        image frame is stored in YUV (or some other basis) then the
198        YUV values will be transformed to RGB values. (But these RGB
199        values will be in the same colorspace as the original image.
200        Colorspace here includes the linear or non-linear encoding of
201        the samples. For example, if the original image is in the sRGB
202        color space then the RGB value returned by the sampler will
203        also be sRGB, and if the original image is stored in ITU-R
204        Rec. 601 YV12 then the RGB value returned by the sampler will
205        be an RGB value in the ITU-R Rec. 601 colorspace.) The
206        parameters of the transformation from one basis (e.g.  YUV) to
207        RGB (color conversion matrix, sampling offsets, etc) are taken
208        from the producer of the EGLStream that is associated with the
209        external texture.
210
211        If the image frames in the EGLStream contain alpha values then
212        the value of the alpha component returned is taken from the
213        image; otherwise the alpha component is 1.0.
214
215
216    - In both OpenGL ES 1.x and OpenGL ES 2.0 add a new subsection after
217      the previously described "3.7.14 External Textures" section:
218
219        "3.7.14.1 External Textures as Stream Consumers
220
221        To use a TEXTURE_EXTERNAL_OES texture as the consumer of an
222        EGLStream, bind the texture to the active texture unit, and
223        call eglStreamConsumerGLTextureExternalNV() as described in the
224        EGL_NV_stream_consumer_gltexture extension.  The EGLStream
225        must be in the EGL_STREAM_STATE_CREATED_KHR state (i.e. it
226        must not be associated with any consumer or producer yet).
227
228        The width, height, format, type, internalformat, border, and
229        image data of the TEXTURE_EXTERNAL_OES texture will all be
230        determined based on the specified EGLStream <stream> once
231        <stream> is associated with a producer.  Until <stream> is
232        associated with a producer these attributes are undefined.
233        Once <stream> is associated with a producer and the producer
234        has inserted one (or more) images into <stream> (as described
235        in the EGL_NV_stream_consumer_gltexture extension) these
236        attributes are determined (internally by the implementation),
237        but they are not exposed to the GL client and there is no way
238        to query their values.
239
240        (Add this paragraph only if OES_EGL_image_external is also
241        supported.) If the TEXTURE_EXTERNAL_OES texture is already
242        bound to an EGLImage then that binding is broken when the
243        texture becomes the consumer of <stream> (i.e. when
244        eglStreamConsumerGLTextureNV() returns successfully).
245
246        The TEXTURE_EXTERNAL_OES texture remains the consumer of
247        <stream> until the first of any of these events occur:
248            - The texture is associated with a different EGLStream
249              (with a later call to eglStreamConsumerGLTextureNV).
250            - The texture is bound to an EGLImage (with a call to
251              EGLImageTargetTexture2DOES).
252            - The texture is deleted in a call to DeleteTextures().
253        When any of these events occurs the texture is no longer the
254        consumer of <stream>, and <stream> transitions to the
255        EGL_STREAM_STATE_DISCONNECTED_KHR state (as described in the
256        EGL_NV_stream_consumer_gltexture and EGL_KHR_stream
257        extensions).
258
259        Sampling an external texture which is not the consumer of any
260        EGLStream and is not associated with any EGLImage sibling will
261        return a sample value of (0,0,0,1).
262
263        Sampling an external texture which is the consumer of an
264        EGLStream will return a sample value of (0,0,0,1) unless an
265        image frame is currently 'latched' into the texture.  An image
266        frame is 'latched' into the texture by any successful call to
267        eglStreamConsumerAcquireNV (as described in the
268        EGL_NV_stream_consumer_gltexture extension).  A call to
269        eglStreamConsumerReleaseNV() unlatches the image frame from
270        the texture.
271
272        Any context which is bound to the thread that
273        eglStreamConsumerAcquireNV and eglStreamConsumerReleaseNV is
274        called from will "see" the affect of the 'latching' or
275        'unlatching' immediately.  Contexts not bound to that thread
276        may or may not "see" the effects of latching until the
277        texture is bound (or re-bound) to the context by calling
278        glBindTexture.
279
280
281Changes to section "2.10.4 Shader Variables" of the OpenGL ES 2.0
282specification (ignore for OpenGL ES 1.x)
283
284    - In the subsection "Uniform Variables" paragraph 13, last sentence, add
285
286        "SAMPLER_EXTERNAL_OES"
287    to the list of types that can be returned.
288
289Changes to section "2.10.5 Shader Execution" of the OpenGL ES 2.0
290specification (ignore for OpenGL ES 1.x)
291
292    - In the subsection "Validation", add to the bullet points in the second
293      paragraph:
294
295        "- the number of texture image units required is greater than
296           the number available (see REQUIRED_TEXTURE_IMAGE_UNITS_OES,
297           MAX_COMBINED_TEXTURE_IMAGE_UNITS, MAX_VERTEX_TEXTURE_IMAGE_UNITS,
298           and MAX_TEXTURE_IMAGE_UNITS).
299
300        - the number of uniforms required to implement the shader program is
301           greater than the number available."
302
303Changes to section "3.7.5 Texture Parameters" of the OpenGL ES 1.1 specification
304
305    - Add to the end of the section a new paragraph:
306
307            "When <target> is TEXTURE_EXTERNAL_OES only NEAREST and LINEAR are
308        accepted as TEXTURE_MIN_FILTER, only CLAMP_TO_EDGE is accepted as
309        TEXTURE_WRAP_S and TEXTURE_WRAP_T, and only FALSE is accepted as
310        GENERATE_MIPMAP.  Attempting to set other values for
311        TEXTURE_MIN_FILTER, TEXTURE_WRAP_S, TEXTURE_WRAP_T, or GENERATE_MIPMAP
312        will result in an INVALID_ENUM error.
313
314Changes to section "3.7.4 Texture Parameters" of the OpenGL ES 2.0 Specification
315
316    - Add to the end of the section a new paragraph:
317
318            "When <target> is TEXTURE_EXTERNAL_OES only NEAREST and LINEAR are
319        accepted as TEXTURE_MIN_FILTER and only CLAMP_TO_EDGE is accepted as
320        TEXTURE_WRAP_S and TEXTURE_WRAP_T.  Attempting to set other values for
321        TEXTURE_MIN_FILTER, TEXTURE_WRAP_S, or TEXTURE_WRAP_T will result in
322        an INVALID_ENUM error.
323
324Changes to section "3.7.10 Texture State" of the OpenGL ES 1.1 Specification
325and section "3.7.12 Texture State" of the OpenGL ES 2.0 Specification
326
327    - Add an additional sentence at the end of the section:
328
329            "In the initial state of a TEXTURE_EXTERNAL_OES texture object,
330        the value assigned to TEXTURE_MIN_FILTER and TEXTURE_MAG_FILTER is
331        LINEAR, and the s and t wrap modes are both set to
332        CLAMP_TO_EDGE."
333
334Changes to section "3.7.11 Mipmap Generation" of the OpenGL ES 2.0 Specification
335(ignore for OpenGL ES 1.x)
336
337    - Add two additional paragraphs to the end of the section:
338
339            "When <target> is set to TEXTURE_EXTERNAL_OES, GenerateMipmap
340        always fails and generates an INVALID_ENUM error."
341
342Changes to section "3.7.11 Texture Objects" of the OpenGL ES 1.1 specification
343(ignore for OpenGL ES 2.x)
344
345    - Modify this section as follows: (changed lines marked with *, and added
346      lines are marked with +)
347
348*           "In addition to the default textures TEXTURE_2D and
349*       TEXTURE_EXTERNAL_OES, named two-dimensional and external texture
350        objects can be created and operated upon.  The name space for texture
351        objects is the unsigned integers, with zero reserved by the GL.
352
353            A texture object is created by binding an unused name to
354*       TEXTURE_2D or TEXTURE_EXTERNAL_OES. The binding is effected by calling
355               void BindTexture( enum target, uint texture );
356*       with target set to the desired texture target and texture set to the
357        unused name. The resulting texture object is a new state vector,
358        comprising all the state values listed in section 3.7.10, set to the
359+       same initial values. If the new texture object is bound to TEXTURE_2D
360+       or TEXTURE_EXTERNAL_OES it is and remains a two-dimensional or
361+       external texture respectively until it is deleted.
362
363            BindTexture may also be used to bind an existing texture object to
364*       TEXTURE_2D or TEXTURE_EXTERNAL_OES. If the bind is successful no
365        change is made to the state of the bound texture object, and any
366        previous binding to target is broken.
367
368            While a texture object is bound, GL operations on the target to
369        which it is bound affect the bound object, and queries of the target
370        to which it is bound return state from the bound object. If texture
371        mapping is enabled, the state of the bound texture object directs the
372        texturing operation.
373
374*       In the initial state, TEXTURE_2D and TEXTURE_EXTERNAL_OES have
375*       two-dimensional and external texture state vectors respectively
376*       associated with them.  In order that access to these initial textures
377*       not be lost, they are treated as texture objects all of whose names
378*       are 0. The initial two-dimensional and external texture are therefore
379*       operated upon, queried, and applied as TEXTURE_2D or
380*       TEXTURE_EXTERNAL_OES respectively while 0 is bound to the
381*       corresponding targets.
382
383            Texture objects are deleted by calling
384               void DeleteTextures( sizei n, uint *textures );
385        textures contains n names of texture objects to be deleted. After a
386        texture object is deleted, it has no contents, and its name is again
387        unused. If a texture that is currently bound to the target TEXTURE_2D
388*       or TEXTURE_EXTERNAL_OES is deleted, it is as though BindTexture had
389        been executed with the same target and texture zero. Unused names in
390        textures are silently ignored, as is the value zero.
391
392            The command
393               void GenTextures( sizei n, uint *textures );
394        returns n previously unused texture object names in textures. These
395        names are marked as used, for the purposes of GenTextures only, but
396        they acquire texture state only when they are first bound, just as if
397        they were unused.
398
399            The texture object name space, including the initial texture
400        object, is shared among all texture units. A texture object may be
401        bound to more than one texture unit simultaneously. After a texture
402        object is bound, any GL operations on that target object affect any
403        other texture units to which the same texture object is bound.
404
405            Texture binding is affected by the setting of the state
406        ACTIVE_TEXTURE.
407
408            If a texture object is deleted, it is as if all texture units which
409        are bound to that texture object are rebound to texture object zero.
410
411Changes to section "3.7.13 Texture Objects" of the OpenGL ES 2.0 specification
412(ignore for OpenGL ES 1.x)
413
414    - Modify this section as follows: (changed lines marked with *, and added
415      lines are marked with +)
416
417*           "In addition to the default textures TEXTURE_2D, TEXTURE_CUBE_MAP,
418*       and TEXTURE_EXTERNAL_OES, named two-dimensional, cube map, and
419        external texture objects can be created and operated upon.  The name
420        space for texture objects is the unsigned integers, with zero reserved
421        by the GL.
422
423            A texture object is created by binding an unused name to
424*       TEXTURE_2D, TEXTURE_CUBE_MAP, or TEXTURE_EXTERNAL_OES. The binding is
425        effected by calling
426               void BindTexture( enum target, uint texture );
427        with target set to the desired texture target and texture set to the
428        unused name. The resulting texture object is a new state vector,
429        comprising all the state values listed in section 3.7.12, set to the
430        same initial values. If the new texture object is bound to TEXTURE_2D,
431*       TEXTURE_CUBE_MAP, or TEXTURE_EXTERNAL_OES it is and remains a
432*       two-dimensional, cube map, or external texture respectively until it
433        is deleted.
434
435            BindTexture may also be used to bind an existing texture object to
436*       either TEXTURE_2D, TEXTURE_CUBE_MAP, or TEXTURE_EXTERNAL_OES. The error
437        INVALID_OPERATION is generated if an attempt is made to bind a texture
438*       object of different target than the specified target. If the bind is
439        successful no change is made to the state of the bound texture object,
440        and any previous binding to target is broken.
441
442            While a texture object is bound, GL operations on the target to
443        which it is bound affect the bound object, and queries of the target to
444        which it is bound return state from the bound object. If texture
445        mapping is enabled, the state of the bound texture object directs the
446        texturing operation.
447
448*           In the initial state, TEXTURE_2D, TEXTURE_CUBE_MAP, and
449*       TEXTURE_EXTERNAL_OES have two-dimensional, cube map, and external
450        texture state vectors respectively associated with them.  In order
451        that access to these initial textures not be lost, they are treated as
452        texture objects all of whose names are 0. The initial two-dimensional,
453*       cube map, and external texture are therefore operated upon, queried,
454*       and applied as TEXTURE_2D, TEXTURE_CUBE_MAP, or TEXTURE_EXTERNAL_OES
455        respectively while 0 is bound to the corresponding targets.
456
457            Texture objects are deleted by calling
458               void DeleteTextures( sizei n, uint *textures );
459        textures contains n names of texture objects to be deleted. After a
460        texture object is deleted, it has no contents or dimensionality, and
461        its name is again unused. If a texture that is currently bound to one
462*       of the targets TEXTURE_2D, TEXTURE_CUBE_MAP, or TEXTURE_EXTERNAL_OES
463        is deleted, it is as though BindTexture had been executed with the
464        same target and texture zero.  Unused names in textures are silently
465        ignored, as is the value zero.
466
467            The command
468               void GenTextures( sizei n, uint *textures );
469        returns n previously unused texture object names in textures. These
470        names are marked as used, for the purposes of GenTextures only, but
471        they acquire texture state only when they are first bound, just as if
472        they were unused.
473
474            The texture object name space, including the initial texture
475        object, is shared among all texture units. A texture object may be
476        bound to more than one texture unit simultaneously. After a texture
477        object is bound, any GL operations on that target object affect any
478        other texture units to which the same texture object is bound.
479
480            Texture binding is affected by the setting of the state
481        ACTIVE_TEXTURE.
482
483            If a texture object is deleted, it is as if all texture units which
484        are bound to that texture object are rebound to texture object zero.
485
486Changes to section "3.7.13 Texture Application" of the OpenGL ES 1.1
487specification (ignore for OpenGL ES 2.x)
488
489    - Replace the first sentence of the first paragraph with:
490
491            "Texturing is enabled or disabled using the generic Enable and
492        Disable commands, with the symbolic constant TEXTURE_2D or
493        TEXTURE_EXTERNAL_OES to enable or disable texturing with the
494        TEXTURE_2D or TEXTURE_EXTERNAL_OES texture target, respectively.  If
495        TEXTURE_EXTERNAL_OES is enabled it takes precedence over TEXTURE_2D,
496        TEXTURE_CUBE_MAP_OES, TEXTURE_RECTANGLE_ARB, and
497        TEXTURE_RECTANGLE_NV."
498
499Changes to section "3.8.2 Shader Execution" of the OpenGL ES 2.0
500specification (ignore for OpenGL ES 1.x)
501
502    - Add to the end of the last paragraph of the subsection "Texture Access"
503
504        "The REQUIRED_TEXTURE_IMAGE_UNITS_OES parameter can change based on the
505        number of external textures which are currently bound (see section
506        3.7.14)."
507
508Changes to section "6.1.3 Enumerated Queries" of the OpenGL ES 1.1 specification
509
510    - Change:
511        "...TEXTURE_2D..."
512      to
513        "...TEXTURE_2D or TEXTURE_EXTERNAL..."
514      in the last paragraph.
515
516Changes to section "6.1.3 Enumerated Queries" of the OpenGL ES 2.0 specification
517
518    - Change:
519        "...TEXTURE_2D or TEXTURE_CUBE_MAP..."
520      to
521        "...TEXTURE_2D, TEXTURE_CUBE_MAP, or TEXTURE_EXTERNAL..."
522      in the second paragraph.
523
524
525Changes to section "6.2 State Tables" of the OpenGL ES 1.1 specification
526
527    - Add to "Table 6.13 Textures (state per texture unit and binding point)"
528
529        +-------------------+-------+-------------+-------+------------------+
530        | TEXTURE_BINDING_- | 8*xZ+ | GetIntegerv | 0     | Texture object   |
531        |   EXTERNAL_OES    |       |             |       | bound to         |
532        |                   |       |             |       | TEXTURE_-        |
533        |                   |       |             |       |    EXTERNAL_OES  |
534        +-------------------+-------+-------------+-------+------------------+
535        | TEXTURE_-         | 2*xB  | IsEnabled   | False | True if external |
536        |   EXTERNAL_OES    |       |             |       | texturing is     |
537        |                   |       |             |       | enabled          |
538        +-------------------+-------+-------------+---+----------------------+
539
540    - Add to "Table 6.14 Textures (state per texture object)"
541
542        +--------------------+-------+-----------------+---+----------------+
543        | REQUIRED_TEXTURE_- | n*xZ3 | GetTexParameter | 1 | Number of      |
544        |   IMAGE_UNITS_OES  |       |                 |   | texture image  |
545        |                    |       |                 |   | units required |
546        |                    |       |                 |   |    by texture  |
547        +--------------------+-------+-----------------+---+----------------+
548
549Changes to section "6.2 State Tables" of the OpenGL ES 2.0 specification
550
551    - Add to "Table 6.7 Textures (state per texture unit and binding point)"
552
553        +-------------------+-------+-------------+-------+------------------+
554        | TEXTURE_BINDING_- | 8*xZ+ | GetIntegerv | 0     | Texture object   |
555        |   EXTERNAL_OES    |       |             |       | bound to         |
556        |                   |       |             |       | TEXTURE_-        |
557        |                   |       |             |       |    EXTERNAL_OES  |
558        +-------------------+-------+-------------+-------+------------------+
559
560    - Add to "Table 6.8 Textures (state per texture object)"
561
562        +--------------------+-------+-----------------+---+----------------+
563        | REQUIRED_TEXTURE_- | n*xZ3 | GetTexParameter | 1 | Number of      |
564        |   IMAGE_UNITS_OES  |       |                 |   | texture image  |
565        |                    |       |                 |   | units required |
566        |                    |       |                 |   |    by texture  |
567        +--------------------+-------+-----------------+---+----------------+
568
569Changes to section 3.7 of the OpenGL ES Shading Language specification
570
571    - Add to the list of keywords:
572
573        "samplerExternalOES"
574
575Changes to section 4.1 of the OpenGL ES Shading Language specification
576
577    - Add to the list of basic types:
578
579        "samplerExternalOES   a handle for accessing an external texture"
580
581Changes to section 4.5.3 of the OpenGL ES Shading Language specification
582
583    - Add to the list of "vertex language has the following predeclared
584    globally scoped default precision statements:"
585
586        "precision lowp samplerExternalOES;"
587
588    - Add to the list of "fragment language has the following predeclared
589    globally scoped default precision statements:"
590
591        "precision lowp samplerExternalOES;"
592
593Changes to section 8.7 of the OpenGL ES Shading Language specification
594
595    - Add to the table the following sampler functions:
596
597        "vec4 texture2D(
598                    samplerExternalOES sampler,
599                    vec2 coord)
600        vec4 texture2DProj(
601                    samplerExternalOES sampler,
602                    vec3 coord)
603        vec4 texture2DProj(
604                    samplerExternalOES sampler,
605                    vec4 coord)"
606
607
608Changes to section 9 of the OpenGL ES Shading Language specification
609
610    - Add to token list:
611
612        "SAMPLEREXTERNAL"
613
614    - Add following "type_specifier_no_prec:"
615
616        "SAMPLEREXTERNAL"
617
618Changes to section "A.7 Counting of Varyings and Uniforms" of the OpenGL ES
619Shading Language specification
620
621    - Change the first sentence of the last paragraph to
622
623        "Part of the storage may be reserved by an implementation for its own
624        use e.g. for computation of transcendental functions or conversion of
625        external textures."
626
627
628Issues
629
630    In addition to issues below, see issues from the
631    GL_OES_EGL_image_external extension.
632
633    1.  Is this extension needed, or is the
634        EGL_NV_stream_consumer_gltexture extension plus the existing
635        GL_OES_EGL_image_external extension enough to cover this?
636
637        SUGGESTION: yes
638
639        DISCUSSION: The EGL_NV_stream_consumer_gltexture and
640        GL_OES_EGL_image_external extensions together define all the
641        types, tokens, and entry points needed to expose this
642        functionality.  The GL_OES_EGL_image_external extension fully
643        describes how external textures work.  The
644        EGL_NV_stream_consumer_gltexture extension fully describes how
645        to associate an EGLStream with an external texture.
646
647        However, there were questions about exactly how it was
648        supposed to work.  This extension clarifies some of those
649        questions.
650
651        Also, this allows the GL driver to expose the extension
652        independent of the EGL driver.  This might be important in
653        situations where 2 GLES drivers exist on the same system, one
654        of which supports this functionality and the other not.
655
656    2.  Should this be an NV, EXT, or OES extension?
657
658        It was originally drafted as OES, but then quickly changed to
659        NV as the policy in the ES group is to not draft extensions
660        as OES until they are ratified.  The assumption is that this
661        will be an OES if the ES group agrees with it, or possibly an
662        EXT otherwise.  For now, while it is a draft, it will be NV.
663
664    3.  Why are the new enumerants suffixed with _OES if this is an NV
665        extension?
666
667        SUGGESTION: These enumerants are all already added (with _OES
668        suffixes) by the GL_OES_EGL_image_external extension.  Adding
669        the same enums with NV suffix would be confusing.
670
671Dependencies on OES_EGL_image_external.
672
673    This extension builds on the ideas of the OES_EGL_image_external
674    extension.  If both are supported then this extension adds
675    language to that extension.  If this extension is supported
676    without that one then some parts of that extension get included by
677    this extension.  This is mentioned inline in this extension.  Some
678    of the sections added by this extension are verbatim copies from
679    that extension.  If both are supported these sections should only
680    be added once.
681
682Dependencies on EGL_KHR_image_base and EGL_KHR_image
683
684    This extension neither depends on nor affects the wording of
685    EGL_KHR_image_base or EGL_KHR_image.  This extension borrows ideas
686    from the EGLImage related extensions, but does not require them.
687
688Revision History
689
690    #3 - (July 19, 2012) Acorn Pooley
691         Fix name used with #extension in glsl.
692    #2 - (Aug 3, 2011) Acorn Pooley
693         Rename from GL_OES_EGL_stream_consumer_external to
694         GL_NV_EGL_stream_consumer_external
695    #1 - (Aug 2, 2011) Acorn Pooley
696         Original draft
697
698# vim:ai:ts=4:sts=4:expandtab:textwidth=70
699