# how to use GL\_IMG\_texture\_stream?

**URL:** <https://forums.imgtec.com/t/how-to-use-gl-img-texture-stream/812>\
**Category:** PowerVR Insider\
**Created:** [August 25, 2010, 5:48am UTC](https://forums.imgtec.com/t/how-to-use-gl-img-texture-stream/812 "2010-08-25T05:48:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gbaup](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@gbaup](https://forums.imgtec.com/u/gbaup)\
**Post date:** [August 25, 2010, 5:48am UTC](https://forums.imgtec.com/t/how-to-use-gl-img-texture-stream/812/1 "2010-08-25T05:48:19Z")

</div>

i find&nbsp; glext.h for ogles1.1.

&nbsp;
  

===============
  

#ifndef \_\_glext\_h\_  
#define \_\_glext\_h\_
  

/\* $Id: glext.h 1.2 2008/03/31 09:44:00 benji.bowman Exp $ \*/  
=====================
  

&nbsp;
  

/\* GL\_IMG\_texture\_stream \*/  
#ifndef GL\_IMG\_texture\_stream  
#define GL\_TEXTURE\_STREAM\_IMG &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x8C0D &nbsp;  
#define GL\_TEXTURE\_NUM\_STREAM\_DEVICES\_IMG &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x8C0E &nbsp;  
#define GL\_TEXTURE\_STREAM\_DEVICE\_WIDTH\_IMG &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x8C0F  
#define GL\_TEXTURE\_STREAM\_DEVICE\_HEIGHT\_IMG &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x8EA0 &nbsp;  
#define GL\_TEXTURE\_STREAM\_DEVICE\_FORMAT\_IMG &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x8EA1 &nbsp;   
#define GL\_TEXTURE\_STREAM\_DEVICE\_NUM\_BUFFERS\_IMG &nbsp;&nbsp;&nbsp;&nbsp;0x8EA2 &nbsp;  
#endif
  

GL\_API void GL\_APIENTRY glTexBindStreamIMG(GLint device, GLint deviceoffset);  
GL\_API void GL\_APIENTRY glGetTexStreamDeviceAttributeivIMG(GLint device, GLenum pname, GLint \*params);  
GL\_API const GLubyte \* GL\_APIENTRY glGetTexStreamDeviceNameIMG(GLint device);
  

======================
  

&nbsp;
  

how to use&nbsp; Function?
  

&nbsp;
  

i find 
  

SDK PowerVRoaktargetARMV4Iretail
  

have gles1\_texture\_stream.exe
  

&nbsp;
  

But i want&nbsp;get Source Code?
  

&nbsp;
  

&nbsp;
  

i don't kown use glTexBindStreamIMG AND glGetTexStreamDeviceAttributeivIMG.
  

&nbsp;
  

who give me Example?
  

&nbsp;
  

TKS
gbaup2010-08-25 07:49:30

---

<div class="post-metadata">

**Author:** ![JoeDavis](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/joedavis/32/71_2.png) [@JoeDavis](https://forums.imgtec.com/u/JoeDavis)\
**Post date:** [August 25, 2010, 7:54am UTC](https://forums.imgtec.com/t/how-to-use-gl-img-texture-stream/812/2 "2010-08-25T07:54:54Z")

</div>

I believe the application you are referring to is a unit test for the drivers to ensure the texture stream extensions are working correctly. The code for this is only available under a DDK licence with us.  
  
  
  
  
  
Texture streaming is only available on a particular device if an OEM has chosen to implement and expose this functionality. For some devices, OEMs choose to implement this in such a way that 1st party drivers or applications utilise this functionality, but the ability to create and control texture streams is hidden from 3rd party developers.  
  
  
  
  
  
What device are you targeting and what are you trying to implement using these extensions (e.g. using camera captured or video decoded images in your application)?  
  
  
  
  
  
Section 6 on this page provides an explanation of how extensions are retrieved in a Win32 application (which is similar to the process you would need to follow for OGLES 1.x): [http://www.opengl.org/resources/features/OGLextensions/](http://www.opengl.org/resources/features/OGLextensions/)  
  
  
  
  
  
For an OGLES 1.x application, you would need to write something like this for the glTexBindStreamIMG extension:

Code:

  
typedef void (GL\_APIENTRYP PFNGLTEXBINDSTREAMIMGPROC) (GLint texStreamId, GLint bufferId);  
  
PFNGLTEXBINDSTREAMIMGPROC myglTexBindStreamIMG;  
...  
/\* Retrieve GL extension string \*/  
const GLubyte \*pszGLExtensions;  
pszGLExtensions = glGetString(GL\_EXTENSIONS);  
  
/\* Retrieve the texture stream extensions \*/  
if(strstr((char \*)pszGLExtensions, "GL\_IMG\_texture\_stream"))  
{  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myglTexBindStreamIMG = (PFNGLTEXBINDSTREAMIMGPROC)eglGetProcAddress("glTexBindStreamIMG");  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(!myglTexBindStreamIMG)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf("Unable to load extensions");  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return false;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}  

  
  
  
After this, you can use myglTexBindStreamIMG for all of your function calls.  
  
  
  
Let me know if this helps :)Joe2010-08-25 09:57:35

---

<div class="post-metadata">

**Author:** ![gbaup](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@gbaup](https://forums.imgtec.com/u/gbaup)\
**Post date:** [August 26, 2010, 12:31am UTC](https://forums.imgtec.com/t/how-to-use-gl-img-texture-stream/812/3 "2010-08-26T00:31:10Z")

</div>

thank you for answer the qustion.

&nbsp;
  

i find 
  

[https://gstreamer.ti.com/gf/project/gleslayer/scmsvn/?action=browse&path=%2Ftrunk%2FPackages%2FOMAP3\_Graphics\_SDK%2FGLESLAYER\_SGXPERF\_20%2Fsgxperf\_gles20\_vg.cpp&revision=58&view=markup](https://gstreamer.ti.com/gf/project/gleslayer/scmsvn/?action=browse&path=%2Ftrunk%2FPackages%2FOMAP3_Graphics_SDK%2FGLESLAYER_SGXPERF_20%2Fsgxperf_gles20_vg.cpp&revision=58&view=markup)
  

&nbsp;
  

&nbsp;hope help other.
  

&nbsp;
  

&nbsp;
