Skip to main content
GameDev.net gamedev.net
🔒 Locked

double buffer manipulation

Started by starsailor Aug 21, 2001 at 6:51 AM 5 replies 500+ views
Original Post
starsailor
starsailor
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.
wolfman8k
wolfman8k
I''m not sure, but I don''t think that you can do that in real-time.
starsailor
starsailor
is it possible to fill the buffer with something before the render? (apart from sett the glClearColor of course)..
MirekCz
MirekCz
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
gph-gw
gph-gw
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?
zedzeek
zedzeek
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 )
starsailor
starsailor
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?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.