문제

If you set BitsPerPixel="32" in WMAppManifest.xml file you will have 32 bits colour depth in application. The thing is that low cost devices are always using 16 bits, so images bacome choppy. I want to determine what value of BitsPerPixel is used in application. How to do that?

도움이 되었습니까?

해결책

You can get the current SurfaceFormat from the GraphicsDevice like this:

// XNA
game.GraphicsDevice.DisplayMode.Format;

// Silverlight
page.SharedGraphicsDeviceManager.Current.GraphicsDevice.DisplayMode.Format;

This returns SurfaceFormat.Bgr565 for 16-bit color depth and SurfaceFormat.Color for 32-bit color depth.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top