Application crashes while changing graphics settings
To reproduce:
1. Open settings window provided with samples or open a window of your app containing the settings panel provided with samples.  
2. Select "software rendering" and then select the "ultra" option from the "rendering quality" ComboBox. Once "ultra" is selected the application crashes.  
My system configuration:
> Intel HD graphics, 512 MB  (Integrated), feature level: 10.1; video memory: 32 MB.  
> Intel Pentium processor 2.2Ghz, Duel core.

During debugging in visual studio it throws an ArgumentOutOfRangException with parameter name 'quality' in the override method "GetGraphicsProfileForQuality" in the file SoftwareAdapterCapabilities.cs
Good find. There was a small bug in the SoftwareAdapterCapabilities class that has thrown an exception in case Ultra quality setting was used for software rendering.

This can be easily fixed by changing the SoftwareAdapterCapabilities.cs file in the Ab3d.DirectX.Client.Settings project that comes with the Ab3d.DXEngine sampes. You need to update the GetGraphicsProfileForQuality method in line 63 to the following (returning HighQualitySoftwareRendering for Ultra setting):

public override GraphicsProfile GetGraphicsProfileForQuality(RenderQualityTypes quality)
    switch (quality)
        case RenderQualityTypes.Low:
            return GraphicsProfile.LowQualitySoftwareRendering;
        case RenderQualityTypes.Normal:
            return GraphicsProfile.NormalQualitySoftwareRendering;
        case RenderQualityTypes.High:
        case RenderQualityTypes.Ultra:
            return GraphicsProfile.HighQualitySoftwareRendering;

        case RenderQualityTypes.Custom:
            throw new ArgumentOutOfRangeException("quality");
Andrej Benedik

Forum Jump:

Users browsing this thread:
1 Guest(s)