Advertisement

11.11.2008 at 05:13PM PST, ID: 23896633 | Points: 250
[x]
Attachment Details

Efficient way to access off-screen buffer memory

Asked by razn in Multimedia Programming, Graphics & Game Programming, Video Cards

Tags: , ,

Hi,
I have a graphic application the draw images into off-screen buffer. 1000 times in a second the buffer pixels should be captured to memory. ( I need to pass the off-screen pixels to another application that compress the frame.) I have a code sample that uses CreateDIBSection and pass pBits. This way pBits provides me direct access to the pixels.

What is the most efficient way to do it?

hDesktopCompatibleDC=CreateCompatibleDC(hDesktopDC);
hDesktopCompatibleBitmap=CreateDIBSection(hDesktopDC,&bmpInfo,DIB_RGB_COLORS,&pBits,NULL,0);
if(hDesktopCompatibleDC==NULL || hDesktopCompatibleBitmap == NULL)Start Free Trial
[+][-]11.12.2008 at 06:37AM PST, ID: 22939904

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 - Hierarchy / EE_QW_2_20070628