opengl es - glReadPixels doesn't read depth buffer values on iOS -


i can't seem read depth buffer values in opengl es2 on ios 4.3

afdepthpixels = (float*)malloc(sizeof(float) * iscreenwidth * iscreenheight); glreadpixels(0, 0, iscreenwidth, iscreenheight, gl_depth_component, gl_float, afdepthpixels); 

my depth buffer bound in place , operational, function reads nothing 0 values, , seems return immediately. if give gl_rgba, take quite while, , indeed return results. functionality not supported in es2 on ios?

thanks!

as guess, reading depth buffer isn't supported in es 2.x. per glreadpixels man page (direct khronos) permissible values 'format' in es 2 gl_alpha, gl_rgba , gl_rgb.

from memory, depth textures supported on recent versions of ios, should possible run pixel shader convert depth buffer can read rgba if you're otherwise @ dead end.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -