Hi, is there any way to work straight with the buffer in order to apply post processing
effects?
No in the way of glGetPixels()… createTexture and then draw it.
The idea is to create a underwater view effect…
Regards
JyC
The straight-forward way is to use glCopyTexImage which omits the host copy you outlined with glReadPixels().
Or more complex, if you render to a p-buffer texture rectangle target you can bind it as texture directly.
There are ways to do post-processing effects, BUT there is no way to directly access a pixel like an array or so, without doing a glReadPixels.
Jan.
Typically post-processing effects are done using render-to-texture:
- Render your scene to an offscreen pbuffer
- Bind the pbuffer as a texture
- Process the image by looking up in the texture using a fragment program (or fixed functiont texturing)
- Write the results to the frame buffer
http://www.nvidia.com/dev_content/nvopenglspecs/WGL_ARB_render_texture.txt http://developer.nvidia.com/object/ogl_rtt.h
tml
Originally posted by Jan2000:
[b]There are ways to do post-processing effects, BUT there is no way to directly access a pixel like an array or so, without doing a glReadPixels.
Jan.[/b]