private void OnDestroy()
        {
            foreach (var item in ViewerMap)
            {
                item.Value.Clear();
            }


            m_CurrentShader = null;

            m_APIType = EAPIType.OpenGLES;

            m_SkipUnused = false;

            m_AnalyzedData = null;

            m_GPUVendors = null;

            m_Vendors         = null;
            m_ModelNames      = null;
            m_VendorsSelected = 0;

            m_GPUModelsSelected = 0;

            m_CurrentVendor = null;

            m_ScrollPosition = Vector2.zero;

            m_SettingsFolderOpen = true;

            m_AnalyzedDataDrawType = EAnalyzedDataViewType.Hierarchy;
        }
Пример #2
0
        /// <summary>
        /// 通过厂商类型获取GPU厂商信息
        /// </summary>
        /// <param name="vendorType">GPU厂商类型</param>
        /// <returns>GPU厂商信息</returns>
        public GPUVendor GetVendorModelsByVendorType(EGPUVendorType vendorType)
        {
            if (Vendors == null)
            {
                return(null);
            }

            for (int i = 0; i < Vendors.Length; i++)
            {
                GPUVendor vendor = Vendors[i];
                if (vendor.VendorType == vendorType)
                {
                    return(vendor);
                }
            }

            return(null);
        }
        private void initVendors()
        {
            List <string> vendors = new List <string>();

            for (int i = 0; i < m_GPUVendors.Vendors.Length; i++)
            {
                GPUVendor vendor = m_GPUVendors.Vendors[i];
                if ((vendor.CompatibleAPI & m_APIType) == m_APIType)
                {
                    vendors.Add(vendor.VendorType.ToString());
                }
            }

            m_Vendors = vendors.ToArray();

            m_VendorsSelected = 0;

            initVendor();
        }
        private void initVendor()
        {
            string vendorName = m_Vendors[m_VendorsSelected];

            for (int i = 0; i < m_GPUVendors.Vendors.Length; i++)
            {
                GPUVendor vendor = m_GPUVendors.Vendors[i];
                if (vendor.VendorType.ToString() == vendorName)
                {
                    m_CurrentVendor = vendor;

                    m_ModelNames = new string[m_CurrentVendor.Models.Length];
                    for (int j = 0; j < m_CurrentVendor.Models.Length; j++)
                    {
                        m_ModelNames[i] = m_CurrentVendor.Models[i].ModelName;
                    }
                    break;
                }
            }

            m_GPUModelsSelected = 0;
        }