DirectX code is compartmentalized