Hi everyone,
I am using a depth texture that works correctly on other devices (ios, tegra), but not on adreno. I am using opengl es 3.0, so the set up calls follow those specs. Here's the relevant call:
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, w, h, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 0);
Note that when I use the older, opengl es 2.0 version of the call, it works:
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_STENCIL_OES, w, h, 0, GL_DEPTH_STENCIL_OES, GL_UNSIGNED_INT_24_8_OES, 0);
When the opengl es 3 way is sampled from a shader, it seems to return 0.0 no matter what. The opengl es 2.0 version returns the expected value when sampled in a the shader.
The problem is that I can't use the older version (GL_DEPTH_STENCIL_OES instead of GL_DEPTH24_STENCIL8), because that causes problems when blitting to the default framebuffer on some devices (because the default framebuffer depth attachment seems to have internal format of GL_DEPTH24_STENCIL8 and not GL_DEPTH_STENCIL_OES).
Any ideas why GL_DEPTH_STENCIL_OES works, but GL_DEPTH24_STENCIL8 doesn't? Thanks!