簡體   English   中英

如何確定正在使用什么顏色深度的應用程序?

[英]How to determine what colour depth application is using?

如果在WMAppManifest.xml文件中設置BitsPerPixel =“ 32”,則應用程序將具有32位色深。 問題是低成本設備始終使用16位,因此圖像變得斷斷續續。 我想確定在應用程序中使用BitsPerPixel的值。 怎么做?

您可以像這樣從GraphicsDevice獲取當前的SurfaceFormat

// XNA
game.GraphicsDevice.DisplayMode.Format;

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

這將返回SurfaceFormat.Bgr565為16位顏色深度和SurfaceFormat.Color為32位顏色深度。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM