Utilities for DirectX