Jul 23 2009

Windows Mobile Graphic APIs

I recent had to take into consideration the APIs available in Windows Mobile for something I was working on recreationally. As per usual I added my notes and conclusions to my OneNote notebook and thought I would share some of it for those that may need to look up the same information.

GDI A moderate to slow speed performer with wide compatibility.
GDI+ Successor of GDI. GDI+ adds gradients, complex paths, and uses ARGB to represent color.
Imaging API for manipulating Images and manipulating them, but slow.
GAPI An API now officially dead as of WM6.5. Predates DirectX. Nothing more of it will be said here.
DirectDraw Gives extremely fast access to imaging surface. Targets low level operations. Centered around bit blting.
Direct3D Gives access to 3D display hardware and provides emulation where hardware isn’t available. Potentially high performing, though some OEMs use improper/slow implementation. HTC historically installed an improper version of Direct3D on their devices
DirectShow API for handling video and audio streams
OpenGL ES Platform independent graphic API. May or may not be present on your Windows Mobile device. If you use this be prepared to provide an implementation to the target device.

I think I may have to go through all of these APIs and write a general introduction like what I did for Windows Mobile Power Management.

 

Tags:

Jul 18 2009

Identifying your Direct3D Driver

I had the need to identify the driver being used in a set of Windows Mobile devices a little earlier and have a very simple program for doing so.   I grabbed some code that Mark Prentice had written to do so. Getting the string that identifies the driver is a couple of lines of code.

AdapterListCollection al = Manager.Adapters;
string driver = al.Default.Information.DriverName.ToString();

If you run this code the one thing you want to watch out for is a driver named "d3dmref.dll".  If you have this driver then that means you OEM didn't create/license a driver for your device and the graphics will render in seconds per frame.

 

Tags: