问题
I can render to the screen but I would like to be able to access the raw pixels that have been rendered by the shader. The only way I know how is to use glReadPixels off of the screen, but I would like to access them before they are draw to screen in order to save frames to disk.
Specifically I want to use shaders to process images that are never displayed: 1)grab image from disk 2)render it 3)output back to disk.
回答1:
Have you tried to render to the offscreen texture as in here?
来源:https://stackoverflow.com/questions/4412587/how-can-i-access-the-raw-pixel-data-of-an-opengl-es-2-off-screen-render-buffer