View Full Version : reading and writing to the video frame buffer
03-10-2006, 10:58 AM
I'm on Windows XP using Visual C++ 6.0.
I need to capture the image in the video frame buffer, modify it by putting a small graphic along the bottom sixteenth of the image, and write it back to the video frame buffer for display in somewhat real time.
Any leads to working code or function calls in openML, openGL, or other would be most appreciated. A solution comparable to the openGL DMbuffer extensions for XFree86 and IRIX operating systems would also work perfectly.
Thank you -
03-13-2006, 12:51 PM
If you are using OpenGL,
//Render you stuff
//Read from back buffer
For best performance, use the same format as the backbuffer.
03-13-2006, 11:00 PM
Maybe PBO can help, performance wise :
EDIT: Do you have a real reason to bring back the frame buffer (saving to disk, whatever) ?
Else, why not adding your small graphics directly at the right place using opengl ? That would be much MUCH faster.
03-14-2006, 02:28 AM
You have two frame buffers:
- video FB
- OpenGL FB
If I understand corectly, you want to grab frame from video FB add some graphics and write back to video FB. For such action, you don't need OpenGL and you must do all this things on CPU. Even more.. just grab 1/16 part of screen and modify it's content.
If you want to use OpenGL, you must grab frame, upload as OpenGL texture, render frame using OpenGL then render additional graphics, readback result from OpenGL and copy to video FB.
in short... video FB -> system memory -> OGL texture -> OGL FB -> render additional graphics -> system memory -> video FB
It will be much easier to use for example Quadro card with SDI output and pipeline will be:
video FB -> OpenGL texture -> OpenGL FB -> render additional graphics -> output to SDI. NVidia deliver additional OpenGL extenstion that expose interface to video frame buffer on Quadro card.
In this case you can apply any effect on incoming video stream using OpenGL and deliver proffesional quality output (key & fill).
03-17-2006, 12:10 AM
dduran, the whole desktop framebuffer is not the OpenGL framebuffer.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.