   [GLES2] depth buffer texture
  hello guys,i need to render the current depth buffer onto a texture map and use it for the second pass with opengl es 2 on iphone. but it turned out that opengl es 2 doesn't even support gl_FragDepth output and doesn't support GL_DEPTH_COMPONENT when creating fragment buffer object.here is my current code of creating the texture map:glTexImage2D( GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, mWidth, mHeight, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, NULL);glFramebufferTexture2D(GL_FRAMEBUFFER,GL_DEPTH_ATTACHMENT,GL_TEXTURE_2D,antiAliasingTexture,0 );this two lines doesn't give me any "framebuffer object is not complete" problem when i run my program. but if you check the opengl es 2 manual, you can see that GL_DEPTH_COMPONENT is not supported.and when i checked the values of the read back texture, i can only see 1.0can anyone give me an example of opengl es 2 depth buffer texture map?or it is simply not doable with opengl es 2?===================now i found another post here:http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=234519it says about the same phenomena that the gl_FragCoord.z is always around 1.0.the post provides a way to compute the depth value, but again, with opengl es 2, how can i write to the value? there is no gl_FragDepth
  In GLES2 depth component texture is only supported if extension GL_OES_depth_texture is present. Have you checked for its presence?If it's not present you can store depth in 32-bit or 16-bit texture packing one float into multiple rgb/rgba channels.   ;  thank you.I'm working on an iphone and from this interesting page i found that iphone doesn't support that.I will using color buffer instead.thank you.http://www.fabiensanglard.net/dEngine/index.php   