So on my program, I draw 2D rectangle using GLSL shader.
The rectangle is filled with texture. I have to use shader in order to do some computation and etc.
Now, my question is that how can I access the pixel value of the scene (rectangle w/ texture) after the shader?
Basically, after it goes through vertex then fragment shader, it draws something in the scene and I want to access those scene as data like unsigned char* or pixels
So on my program, I draw 2D rectangle using GLSL shader. The rectangle is
Share
glReadPixelshttp://www.opengl.org/sdk/docs/man/xhtml/glReadPixels.xmlMake sure you use a FBO or PBuffer as render target to avoid data corruption.