FPCM_GET_FRAME_BITMAP for only area that needs updating

DLL Edition of the F-IN-BOX
Delphium
Posts: 6
Joined: Sun Sep 03, 2006 12:29 pm

FPCM_GET_FRAME_BITMAP for only area that needs updating

Postby Delphium » Thu Feb 15, 2007 12:02 pm

In the DX demo, each time a FPCN_UPDATE_RECT is recieved, a FPCM_GET_FRAME_BITMAP is sent to retrieve a bitmap of the entire frame.

Wouldn't it be faster if only the bits that needed updating were rendered and retrieved? (I see that the rect that needs updating is already present in (SFPCNUpdateRect*)pNMHDR.)

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Thu Feb 15, 2007 3:23 pm

Thank you for your question.

Yes, FPCM_GET_FRAME_BITMAP retrieves a full bitmap, but actually only those pixels which are belong to the rect (that should be updated) are recalculated (it's necessary to get alpha component of each pixel).

If you don't need a real value of alpha component, you don't need FPCM_GET_FRAME_BITMAP. Use FPCS_TRANSPARENT style, and receive pointer to pixels data in FPCN_PAINT handler.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

Delphium
Posts: 6
Joined: Sun Sep 03, 2006 12:29 pm

Postby Delphium » Thu Feb 15, 2007 11:52 pm

Ok, I'll use the dirty rectangle that you provide to only copy the updated area to my texture.

Thanks Artem, I appreciate you timely and thorough support.


Return to “DLL Edition”

Who is online

Users browsing this forum: No registered users and 15 guests

cron