0

I am programming a simulation in xna/monogame; but i want to go sure and wanna warn (myself ..( = ) if I use inadventertly my on-board video card..

Do you know any way to solve my problem? Does the graphicsdevice offer a property to determine current used video card?

Thank you in advance!

3r0rXx
  • 1
  • 2
  • You'll want to find a third-party library that lets you read the hardware info (OpenHardwareMonitor is a decent choice), and hope that the GraphicsCard class has a property that specified whether it's onboard. If not, you'll probably have to simply compare all graphics cards on the device. As for ACTUALLY detecting the one in use, I'll let someone else answer that part. – Falgantil Oct 22 '15 at 07:45

1 Answers1

0

During XNA start-up you can create your own custom GraphicsDeviceManager that can rank or choose devices based on criteria you provide.

MSDN:

GraphicsDeviceManager Class

Handles the configuration and management of the graphics device. Custom behavior of the GraphicsDeviceManager can be achieved by deriving a class from GraphicsDeviceManager. For example, to allow only widescreen devices in full-screen mode the RankDevices method could be overridden to drop non-widescreen devices. - Tell me more...

During the call to your RankDevices() method, you can inspect the list of GraphicsDeviceInformation to determine information about the adapter and device.

RankDevices() orders the provided list so that devices earlier in the list are preferred over devices later in the list. This method can remove devices from the list if they do not satisfy some custom criteria. Tell me more

Each GraphicsDeviceInformation object has an Adapter property of type GraphicsAdapter. There you will find such useful properties as:

  • Description
  • DeviceId
  • DeviceName
  • VendorId

...and many more.

More

Community
  • 1
  • 1