Determining adaptor identifier with Managed DirectX
Creating a new Managed DirectX device on a single monitor setup is easy, I call the device constructor with adapter identifier 0 ( or Manager.Adapters.Default.Adapter).
On a multiple monitor setup I want to create the device with the correct adapter i开发者_运维知识库dentifier 0 or 1, depending on the primary or secondary monitor being currently used. How can I determine which adapter id I should use?
Couldn't figure out how to do this with Managed DirectX, wrote a wrapper for MonitorFromWindow and MonitorFromPoint to do it.
精彩评论