private void CollectAvailableAdapters()
        {
            SystemCapabilities = new SystemCapabilities();

            if (_selectedGraphicsProfile == null)
            {
                // This sets _selectedAdapterCapabilities and _selectedRenderQuality
                SystemCapabilities.SelectRecommendedAdapter(out _selectedAdapterCapabilities, out _selectedRenderQuality);

                _selectedGraphicsProfile = _selectedAdapterCapabilities.GetGraphicsProfileForQuality(_selectedRenderQuality);
            }
            else
            {
                // This sets _selectedAdapterCapabilities and _selectedRenderQuality
                _selectedAdapterCapabilities = SystemCapabilities.CreateAdapterCapabilitiesFromGraphicsProfile(_selectedGraphicsProfile);

                var isCustomRenderQuality = IsCustomRenderQuality();

                if (isCustomRenderQuality)
                {
                    _selectedRenderQuality = AdapterCapabilitiesBase.RenderQualityTypes.Custom;
                }
                else
                {
                    _selectedRenderQuality = AdapterCapabilitiesBase.GetGraphicsProfileQuality(_selectedGraphicsProfile);
                }
            }
        }
        private bool IsCustomRenderQuality()
        {
            var renderQuality   = AdapterCapabilitiesBase.GetGraphicsProfileQuality(_selectedGraphicsProfile);
            var graphicsProfile = _selectedAdapterCapabilities.GetGraphicsProfileForQuality(renderQuality);

            var isCustomRenderQuality = !(graphicsProfile.PreferedMultisampleCount == _selectedGraphicsProfile.PreferedMultisampleCount &&
                                          graphicsProfile.ShaderQuality == _selectedGraphicsProfile.ShaderQuality &&
                                          graphicsProfile.TextureFiltering == _selectedGraphicsProfile.TextureFiltering);

            return(isCustomRenderQuality);
        }