views:

231

answers:

2

I'm seeing very poor performance while using the managed DirectDraw wrappers for WindowsMobile.

Microsoft.WindowsMobile.DirectX.Direct3D

I would appear the biggest bottle neck is calling Device.Present() after building up the scene.

When using the System.Diagnostics.Stopwatch and running this very trivial exmaple Using Sprites on MSDN

I'm seeing it's taking approximately 150ms to call the Device.Present() method.

I'm seeing this on my AT&T Tilt and on the emulator.

In larger applications such as the UltimateGMan sample it's taking over a second to call this method.

Does anyone have any experience with using DirectX on mobile devices? What am I missing? I would prefer to stay in the managed world but if I drop back into C++ would I see better performance?

+2  A: 

AFAIK there is a problem with the HTC TTYN II (AKA AT&T Tilt). It has no hardware 3D drivers (which it ought too). This could be the source of your problems.

This site implies performance is pretty rubbish on the phone.

Goz
OH MY GOSH! I never knew that about the Tilt.
Kevin
+1  A: 

According to this link

http://j2i.net/blogs/home/archive/2009/07/18/identifying-your-direct3d-driver.aspx

You can determine the type of Direct3D drivers on your device with the following code:

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

Joel Ivory Johnson writes:

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.

Kevin