【发布时间】:2013-08-06 16:15:40
【问题描述】:
好的,我正在尝试开始学习 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”。这会导致代码中的所有内容暂停。
如果我打开窗口时代码暂停,我正在尝试做的就是不断加载图片。
【问题讨论】: