0
抱歉發送垃圾郵件的問題,但有沒有從窗口(不是項目窗口)在XNA中加載像素的快速方法?我需要加載100像素寬度100像素高度,沒有太多滯後。 (也許每10秒更新一次)。C#XNA快速像素加載
public void UpdateMap()
{
for (int y = 100; y < 120; y++)
{
for (int x = 1500; x < 1510; x++)
{
uint pixel = GetPixel(hdc, x, y);
colorlist.Add(new Color((int)(pixel & 0x000000FF),
(int)(pixel & 0x0000FF00) >> 8,
(int)(pixel & 0x00FF0000) >> 16));
}
}
}