sharpdx / SharpDX

SharpDX GitHub Repository
http://sharpdx.org
MIT License
1.7k stars 639 forks source link

Direct2D: No support for command lists? #800

Closed ghost closed 8 years ago

ghost commented 8 years ago

Direct2D1.DeviceContext should according to MSDN contain CreateCommandList (https://msdn.microsoft.com/en-us/library/windows/desktop/hh404479(v=vs.85).aspx)

Is it possible to use command lists on D2D1 on DX11?

andrewst commented 8 years ago

You can use var commanList = new CommandList(deviceContext);

ghost commented 8 years ago

How do you execute it after, D2D1 DeviceContext does not have ExecuteCommandList?

andrewst commented 8 years ago

Please read msdn. https://msdn.microsoft.com/en-us/library/windows/desktop/hh404392(v=vs.85).aspx Example:

var commanList = new CommandList(deviceContext);
deviceContext.DrawImage(commandList);

or

var commanList = new CommandList(deviceContext);
deviceContext.Target = commandList
pD2D1DeviceContext->BeginDraw();
...
pD2D1DeviceContext->EndDraw();;
ghost commented 8 years ago

Thanks, I must've missed the correct way to use it in D2D in the docs.