double buffer manipulation

Started by
5 comments, last by starsailor 22 years, 8 months ago
hallo everyone.. how does one go about to manipulate the render outputted to a buffer (as I suppose that it is?).. say that you wanna set the red channel to 255 post-render, before you display it? any help would be greatly appreciated. thanks.
Advertisement
I''m not sure, but I don''t think that you can do that in real-time.
is it possible to fill the buffer with something before the render? (apart from sett the glClearColor of course)..
well you can render a fullscreen texture instead glclear

With best regards,
Mirek Czerwiñski
http://kris.top.pl/~kherin/
With best regards, Mirek Czerwiñski
Three ways.

1. Render through DirectDraw. This way you can change any pixel of any color. You lose cross-platform compatibility, though.

2. If you''re clearing the screen with one color you can just render a quad onto the screen w/ no lighting.

3. I''m not sure this would work, but if it does it might be useful. If you want to change one or two pixels at a time, then just use glOrtho and render one quad per pixel. Of course, the more pixels you have to cover, the slower it runs.

I haven''t done it personally, but can''t you change the gamma of a card so that it''s redder or bluer or greener or something like that?
i havent used this so i dont know if thisll work
but look up glPixelMap..(...)
you prolly want to use GL_PIXEL_MAP_R_TO_R make all the R(ed) entrys 255 and hopefully all red will be at 255

another very simple method would be to draw a fullscreen quad over the scene

glColorMask( true, false, false, false )
glColor4f( 1,1,1,1);
glBlendFunc( one, one )
thanks for all the replies.. though I don''t really want to specifically change the red channel, that was just an example, what I really need is a pointer to a (hopefully existing ) linear frame buffer so that I can make 2d effects blended over the 3d stuff..

gph-gw: how do I render through directDraw?

This topic is closed to new replies.

Advertisement