代码摘要
FontDescription fontDesc = new FontDescription(); fontDesc.CharSet = CharacterSet.Default; fontDesc.FaceName = fontName; fontDesc.Height = fontSize1; fontDesc.OutputPrecision = Precision.Default; fontDesc.PitchAndFamily = PitchAndFamily.DefaultPitch | PitchAndFamily.FamilyDoNotCare; fontDesc.Quality = FontQuality.Default; fontDesc.Weight = FontWeight.Bold; fontDesc.Width = 0; f = new Microsoft.WindowsMobile.DirectX.Direct3D.Font(device, fontDesc);
在虚拟机我的程序可以运行,但是一旦在我的PPC 上就报错,
中断在最后一句 f = new Microsoft.WindowsMobile.DirectX.Direct3D.Font(device, fontDesc);
抛出异常:DriverUnsupportedException。。。难道是我手机显卡有问题?我的是HTC S1机型。
------解决方法--------------------------------------------------------
是不是手机上驱动或者硬件不支持
------解决方法--------------------------------------------------------
找到一段,看看你的问题是不是这个原因
Your device clearly does not support 3d rendering. The required hardware drivers are not present.
The primary device type for Microsoft? Direct3D? Mobile is the hardware device driver. It supports hardware accelerated rasterization and hardware-based vertex processing. Microsoft? Direct3D? Mobile supports a device type called a reference driver which is software driver. The reference driver supports every Direct3D Mobile feature. More info on http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcemultimedia5/html/wce50condevicetypes.asp
Try to use the software driver to test your application on your device. You need to contact your device manufacturer for the hardware 3d directx driver.
Manav
来自:
http://social.msdn.microsoft.com/Forums/en-US/windowsmobiledev/thread/2c1d0bdc-3965-40e6-831d-919e5b63c306