Windows Mobile DirectX and Direct3D
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
The .NET Compact Framework provides two namespaces for developing managed DirectX and Direct3D applications for devices:
Both namespaces are in the Microsoft.WindowsMobile.DirectX assembly in Microsoft.WindowsMobile.DirextX.dll.
Note
Managed Direct3D mobile applications require Windows Mobile version 5.0 software for Pocket PCs and Smartphones. See External Resources for the .NET Compact Framework for information about Windows Mobile software and SDKs.
These namespaces are mostly a subset of the DirectX 9 managed classes that target personal computer (desktop) applications. However, the mobile functionality more closely matches what was available in DirectX 8. The differences involve lack of support for pixel and vertex shaders because mobile devices do not currently provide this capability.
Note that the .NET Compact Framework does not support multiple lock calls using the Lock method for an IndexBuffer or the Lock method for a VertexBuffer.
Developers should be familiar with desktop managed Direct3D development. The DirectX 9 SDK documentation is pertinent for mobile development. For the managed DirectX 9 (desktop) documentation, see Introducing DirectX 9.0 for Managed Code in the MSDN Library.
Download the DirectX SDK August 2006 (DirectX 9.0 SDK) from: Microsoft DirectX Developer Center.
Unique Classes
Some devices, such as ARM processors, have no floating-point capability built in, which yields very different performance characteristics. The .NET Compact Framework provides classes for fixed-point formats to provide better performance in cases where large amounts of floating-point math can be avoided.
The .NET Compact Framework provides the following classes and structures that are unique to mobile applications:
AlreadyLockedException class
BlendOperationCaps structure
ColorValueFixed structure
CustomVertex.PositionNormalFixed structure
FixedPoint structure
LightFixed class
LightsFixedCollection class
MaterialFixed structure
MatrixFixed structure
MemoryPoolEmptyException class
SurfaceCaps structure
Vector3Fixed structure
Memory Considerations
Developers should consider the much lower processing power and RAM available under mobile development and plan resource usage accordingly. Files and loaded resources for content are likely stored in RAM, not on a hard drive or in dedicated video memory. Thus a similar amount of content can occupy far more RAM on a mobile device than it would on a desktop computer.
For information about what objects to re-create when a device is reset, see Managing Device Resources.
Samples
The following samples demonstrate Windows Mobile Direct3D:
Managed Direct3D Mobile Samples
Contains 15 samples and tutorials.
Direct3D Mobile UltimateGMan Game Sample
A game that demonstrates managed mobile Direct3D capabilities.