Archived

This topic is now archived and is closed to further replies.

starsailor

double buffer manipulation

Recommended Posts

starsailor    122
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.

Share this post


Link to post
Share on other sites
gph-gw    122
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?

Share this post


Link to post
Share on other sites
zedzeek    528
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 )

Share this post


Link to post
Share on other sites
starsailor    122
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?

Share this post


Link to post
Share on other sites