This site is no longer active and is available for archival purposes only. Registration and login is disabled.

EasyCE 2.0


My way of doing landscapes

Postby Johan » Jan 12, 2002 @ 7:22pm

Hi all,

I'm kind of new to this forum, but I am not new to graphics programming for the Pocket PC. :)

I have tried most approaches of implementing fast landscape support for the Pocket PC, and the only feasible solution I found was to access all pixel surfaces (buffers) in a format compatible with the display format and avoid rotating at all costs. GapiTools does not perform a single rotation on any device (except for precalced bitmaps conversion).

This approach requires a bit more logic in the drawing functions, to translate the coordinates used for drawing and flip x/y loops to optimize speed (n+1 is faster than n+240 for example), but the increase in speed for copying a pixel surface to the display more than makes up for it.

All simple blits in GapiTools are done by using fast 32-bit memory loops. Factors such as analyzing pixel strip length to decrease loop counts, stepping in the smallest direction with respect to x/y pitch and re-using word alignments can also be used to increase speed further (unless an entire surface is to be copied as a memory block).

The overhead in translating the coordinates in each drawing function does not involve too much logic, and the performance drawback is most visible using single SetPixel/GetPixel accesses.

With all new screens emerging on the Pocket PC, I personally believe that direct drawing to a screen buffer (using raw mem pointer access) should be avoided at all costs, and let a thin middleware (such as the one implemented in GapiTools) do all coordinate transformations. Which is a shame because of the overhead requirements.. In a perfect world all PDA's have perfectly aligned screen buffers. :)

Best regards,
Johan Sanneblad
www.gapitools.com
Last edited by Johan on Jan 12, 2002 @ 10:07pm, edited 4 times in total.
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Hi again!

Postby Johan » Jan 12, 2002 @ 7:56pm

<<<Removed>>>
Last edited by Johan on Jan 13, 2002 @ 6:49pm, edited 2 times in total.
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Postby Digby » Jan 12, 2002 @ 10:04pm

FYI, I've started a new topic in the General Developer Discussion forum on rotated blit performance.

Here's a link:
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Previous

Return to Phantom's Forum


Sort


Forum Description

Discuss any of Phantom's projects here (Operation Nutcracker, etc.)

Moderators:

sponge, RICoder, Phantom

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron