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

565 and 555 screen formats


565 and 555 screen formats

Postby werner » Mar 17, 2002 @ 6:09pm

Hi all,

Are there any known devices that use 555 as their 16-bit buffer format? It seems like all the current devices (iPaq, Jornada, etc.) use 565 as their screen buffer format. I know GAPI will return it as a possible format (KfDirect555) but I don't know of any devices that use it.

Also, does anyone have a list of the GAPI results for a bunch of different devices. Does anyone support the kfDirect444 format or kfDirect888 yet?

Thanks for the info!

Werner Sharp
werner
pm Member
 
Posts: 7
Joined: Mar 17, 2002 @ 6:00pm
Location: Syracuse, NY


555

Postby Johan » Mar 17, 2002 @ 9:37pm

Hi Werner,

Currently no devices use the 555 format. But new devices are coming along all the time (including the new smart phones), so it would be wise to be prepared for it.

One solution (if you are using C++) is to use the adapter design pattern to support multiple pixel formats for 16-bit devices:

Allocate space for the screen as a WORD* pointer. Create a template class with a member variable of type T. The T member variable contains inline functions for native pixel <-> RGB color conversions. Then instanciate two objects of the template class, one with a 555 member object, and one with a 565 member object. Put all operations to access the 16-bit surface in the template class as inline operations.

I use this in a GapiDraw which will be announced later tonight. It uses this design pattern to access screen pixels, and can be adapted to support any screen format, with any screen depth, with no loss of performance (since everything becomes inlined code). Adding support for other formats is as easy as adding a new native format <-> RGB color conversion class and a new adapter template class instance.

Best regards,
Johan
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

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