Greg Dolley’s Weblog

A Blog about Graphics Programming, Game Programming, Tips and Tricks

Microsoft Drops GAPI, Replaced by Mobile DirectX – My Thoughts

Posted by gregd1024 on January 11, 2008

For a long time the most common way to get direct access to a Windows Mobile device’s framebuffer (i.e. pointer to the screen) was to use the GAPI (Game API) – Microsoft’s helper API for direct screen access and direct hardware input. Many mobile games that needed fast screen blitting utilized this API (most notably the DOOM port for Pocket PC). Unfortunately Microsoft has recently deemed the graphics portions of GAPI to be obsolete (the hardware input portions are not obsolete yet).

The announcement came from Microsoft about one and a half months ago. Fortunately, they’ve replaced it with DirectDraw and Direct3D Mobile. Here are a couple links you’ll find useful:

So far I’ve played around a little bit with DirectDraw on my Pocket PC doing some simple 2D graphics. It was quite easy to start plotting pixels and drawing things in full screen mode. I used Visual Studio 2005, Windows Mobile SDK 6 Professional,  and the default Win32 Smart Device project. Here’s the code:

This is one area where mobile DirectX beats OpenGL ES, in my opinion. I’m always able to write OpenGL applications faster and with much less code than DirectX, but from what I’ve seen here, DirectX is the better way to go if you’re doing 2D.

-Greg Dolley

*Get new posts automatically! Subscribe via RSS here . Want email updates instead? Click here.

Advertisement

3 Responses to “Microsoft Drops GAPI, Replaced by Mobile DirectX – My Thoughts”

  1. pelle said

    We’ve tried to use Direct3D (via the managed wrappers) but unfortunately someone dropped the ball. Hard.

    The device story is a mess full of buggy software drivers, GPU’s without drivers or, even worse, super-buggy hardware drivers.
    We spent several days trying to find a device (PDA or Smartphone) with HW-accelerated Direct3D but couldn’t find any.
    MS has no web site resources linking to devices that work and blaims their partners and the device manufacturers don’t seem willing to divulge details about their devices to developers that want to develop for them.

    The Symbian gang got this right BTW. All OpenGL ES stacks we’ve seen so far have been of good quality if not always super-performing.

    Cf http://groups.google.com/group/microsoft.public.pocketpc.developer/browse_thread/thread/b8c10cf3c0db613a/234f5f7b0ab315ba?lnk=st
    containing the great quote “OEMs are idiots”.

  2. gregd1024 said

    Pelle – Wow, good info. I haven’t tried any Direct3D stuff on my PocketPC yet, but now I know that it probably won’t be HW accelerated. My PocketPC is the HTC 8925 and I don’t think the graphics chip supports HW accelerated OpenGL ES either, but I could be wrong.

    Thanks for the info.

    Update: hey, just thought of something – do you know how well OpenGL ES is supported on the Brew OS? I’ve seen a 3D game (which looked pretty nice) running on some LG phone; I heard it was programmed with OpenGL but I didn’t get to see which OS it was running. I figured it could be Brew because that’s what I’ve seen on most LG phones.

    -Greg Dolley

  3. I found your blog on google and read a few of your other posts. I just added you to my Google News Reader. Keep up the good work. Look forward to reading more from you in the future.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: