# [.net] NVPerfHUD 5 and mdx/xna?

## Recommended Posts

I've tried to get NVIDIA PerfHUD 5 running on MDX and XNA, but i've failed. Every time i start nvperfhud with my mdx or xna application i get the following message: "ERROR: The developer of this application has not enabled NVIDIA PerfHUD analysis...". The user guide says, that the device must be created using the reference mode and the "NVIDIA PerfHUD" adapter. In mdx i create the device with the following code:
D3D.DeviceType devType = D3D.DeviceType.Hardware;
{
{
devType = D3D.DeviceType.Reference;
break;
}
}
device = new D3D.Device(adapter, devType, handle,
D3D.CreateFlags.HardwareVertexProcessing, pp);


Any ideas? Thanks!

##### Share on other sites
I'm not sure if I used this code for NVPerfHud 4 or 5, but this worked for me:

if (enabledNVidiaPerfHud){                    if (Manager.Adapters[Manager.Adapters.Count - 1].Information.Description == "NVIDIA NVPerfHUD")    {        settings.AdapterOrdinal = (uint)Manager.Adapters.Count - 1;        settings.DeviceType = DeviceType.Reference;    }}

As I recall, the guide says the instrumental adapter used with PerfHud will always be exposed as the last adapter in the enumeration, so by just checking the last one for the proper description, you'll know. You might want to recheck the guide to see what the proper description should be, but since this came from working code I'm pretty sure it should be "NVIDIA NVPerfHUD".

##### Share on other sites
Quote:
 Original post by remigiusYou might want to recheck the guide to see what the proper description should be, but since this came from working code I'm pretty sure it should be "NVIDIA NVPerfHUD".

They changed the description in version 5 to "NVIDIA PerfHUD" (without the NV).

However, I found a thread in the public nvidia development forum that says there is a bug with managed directx and will be fixed ASAP [rolleyes]

##### Share on other sites
Sorry for the misinformation then. Quite puzzling that NVPerfHud worked when MDX was pretty much unknown and that they've managed to break it now managed code is becoming more popular. [rolleyes] indeed

## Create an account

Register a new account

• ## Partner Spotlight

• ### Forum Statistics

• Total Topics
627646
• Total Posts
2978383

• 10
• 12
• 22
• 13
• 33