0
好吧,我正在嘗試開始學習SlimDX,因爲我可能需要它爲我的應用程序。SlimDX,瞭解窗口是如何工作的
因爲我不知道DirectX,所以我很早就停下了工作的方式。 這就是創建一個渲染窗口,這裏是如何顯示的例子,我幾乎複製粘貼它。
MessagePump.Run(form,() =>
{
// clear the render target to a soothing blue
context.ClearRenderTargetView(renderTarget, new Color4(0.5f, 0.5f, 1.0f));
// draw the triangle
context.Draw(3, 0);
swapChain.Present(0, PresentFlags.None);
});
現在我明白它,但我不明白,是「MessagePump.Run」。這會導致代碼中的所有內容暫停。
而我正在試圖做的是不斷加載圖片,如果代碼在打開窗口時暫停,我就不會工作。