View Full Version : Editing Screen Buffer
03-07-2004, 10:00 AM
How can I change the screen buffer (color buffer)? I want to add something (it doesn't matter what) to rasterized image. In other words, I want to work on rendered image/modify memory.
Are they any functions in OpenGL (or glu, glut) supporting post-render screen manupilation?
03-07-2004, 10:06 PM
You can use glReadPixels/glDrawPixels to read and write from/to the framebuffer.
But remeber that none of these function are very fast as they have to transfer data from the GPU's memory to RAM and the other way around.
03-08-2004, 02:29 PM
I was thinking about that, but, as you wrote, these functions are not the fastest. So I am looking for a method of direct-writing/reading to/form screen buffer. If anyone has any idea, how to do this, I would be grateful for help.
03-08-2004, 03:07 PM
Originally posted by EraZer:
So I am looking for a method of direct-writing/reading to/form screen buffer. If anyone has any idea, how to do this, I would be grateful for help.
OpenGL doesn't provide a way of directly editing the frame buffer. However, depending on how you want to edit your frame buffer you can just copy it to a texture and use it(glCopyTexImageXX). With fragment programs you can then edit every texel(fragment) individually in any way you want. Fixed function/Reg combinders offers a more limited form of functionality, but still provides basic add/sub/mul/scale features.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.