示例#1
0
 /// <summary>
 /// 得到PC电脑的配置信息
 /// </summary>
 /// <param name="IsLog"></param>
 public void GetPlayerPC(bool IsLog = true)
 {
     this.m_DeviceModel            = SystemInfo.deviceModel;
     this.m_deviceName             = SystemInfo.deviceName;
     this.m_deviceType             = SystemInfo.deviceType;
     this.m_graphicsDeviceName     = SystemInfo.graphicsDeviceName;
     this.m_graphicsDeviceVersion  = SystemInfo.graphicsDeviceVersion;
     this.m_graphicsMemorySize     = SystemInfo.graphicsMemorySize;
     this.m_graphicsPixelFillrate  = SystemInfo.graphicsPixelFillrate;
     this.m_graphicsShaderLevel    = SystemInfo.graphicsShaderLevel;
     this.m_maxTextureSize         = SystemInfo.maxTextureSize;
     this.m_npotSupport            = SystemInfo.npotSupport;
     this.m_operatingSystem        = SystemInfo.operatingSystem;
     this.m_processorCount         = SystemInfo.processorCount;
     this.m_processorType          = SystemInfo.processorType;
     this.m_supports3DTextures     = SystemInfo.supports3DTextures;
     this.m_supportsImageEffects   = SystemInfo.supportsImageEffects;
     this.m_supportsRenderTextures = SystemInfo.supportsRenderTextures;
     this.m_systemMemorySize       = SystemInfo.systemMemorySize;
     if (IsLog)
     {
         this.m_log.Debug(string.Concat(new object[]
         {
             "  DeviceModel   ",
             this.m_DeviceModel,
             "\r\n deviceName   ",
             this.m_deviceName,
             "\r\n deviceType   ",
             this.m_deviceType,
             "\r\n graphicsDeviceName   ",
             this.m_graphicsDeviceName,
             "\r\n  graphicsDeviceVersion   ",
             this.m_graphicsDeviceVersion,
             "\r\n  graphicsMemorySize   ",
             this.m_graphicsMemorySize,
             "\r\n  graphicsPixelFillrate   ",
             this.m_graphicsPixelFillrate,
             "\r\n  graphicsShaderLevel   ",
             this.m_graphicsShaderLevel,
             "\r\n  maxTextureSize   ",
             this.m_maxTextureSize,
             "\r\n  npotSupport   ",
             this.m_npotSupport,
             "\r\n  operatingSystem   ",
             this.m_operatingSystem,
             "\r\n  processorCount   ",
             this.m_processorCount,
             "\r\n  processorType   ",
             this.m_processorType,
             "\r\n  supports3DTextures   ",
             this.m_supports3DTextures,
             "\r\n  supportsImageEffects   ",
             this.m_supportsImageEffects,
             "\r\n  supportsRenderTextures   ",
             this.m_supportsRenderTextures,
             "\r\n  systemMemorySize   ",
             this.m_systemMemorySize
         }));
     }
 }
示例#2
0
    static int IntToEnum(IntPtr L)
    {
        int         arg0 = (int)LuaDLL.lua_tonumber(L, 1);
        NPOTSupport o    = (NPOTSupport)arg0;

        LuaScriptMgr.PushEnum(L, o);
        return(1);
    }
 // Set the hardwareInfo using the current system config
 public void SetFromCurrentConfig()
 {
     deviceModel       = SystemInfo.deviceModel;
     deviceName        = SystemInfo.deviceName;
     deviceType        = SystemInfo.deviceType;
     deviceID          = SystemInfo.deviceUniqueIdentifier;
     gpuDeviceID       = SystemInfo.graphicsDeviceID;
     gpuDeviceName     = SystemInfo.graphicsDeviceName;
     gpuDeviceType     = SystemInfo.graphicsDeviceType;
     gpuDeviceVendor   = SystemInfo.graphicsDeviceVendor;
     gpuDeviceVendorID = SystemInfo.graphicsDeviceVendorID;
     gpuDeviceVersion  = SystemInfo.graphicsDeviceVersion;
     gpuMemory         = SystemInfo.graphicsMemorySize;
     gpuMultiThread    = SystemInfo.graphicsMultiThreaded;
     gpuShaderLevel    = SystemInfo.graphicsShaderLevel;
     maxTextureSize    = SystemInfo.maxTextureSize;
     npotSupport       = SystemInfo.npotSupport;
     operatingSystem   = SystemInfo.operatingSystem;
     // operatingSystemFamily = SystemInfo.operatingSystemFamily;
     processorCount             = SystemInfo.processorCount;
     processorFrequency         = SystemInfo.processorFrequency;
     processorType              = SystemInfo.processorType;
     supportedRenderTargetCount = SystemInfo.supportedRenderTargetCount;
     supports2DArrayTextures    = SystemInfo.supports2DArrayTextures;
     supports3DTextures         = SystemInfo.supports3DTextures;
     supportsAudio              = SystemInfo.supportsAudio;
     supportsComputeShaders     = SystemInfo.supportsComputeShaders;
     //supportsCubemapArrayTextures = SystemInfo.supportsCubemapArrayTextures;
     supportsGyroscope              = SystemInfo.supportsGyroscope;
     supportsImageEffects           = SystemInfo.supportsImageEffects;
     supportsInstancing             = SystemInfo.supportsInstancing;
     supportsLocationService        = SystemInfo.supportsLocationService;
     supportsMotionVectors          = SystemInfo.supportsMotionVectors;
     supportsRawShadowDepthSampling = SystemInfo.supportsRawShadowDepthSampling;
     supportsRenderToCubemap        = SystemInfo.supportsRenderToCubemap;
     supportsShadows        = SystemInfo.supportsShadows;
     supportsSparseTextures = SystemInfo.supportsSparseTextures;
     supportsVibration      = SystemInfo.supportsVibration;
     //usesReversedZBuffer = SystemInfo.usesReversedZBuffer;
     systemMemory = SystemInfo.systemMemorySize;
 }
示例#4
0
        public SystemInfoKun(bool isSet)
        {
            if (isSet)
            {
                batteryLevel           = SystemInfo.batteryLevel;
                batteryStatus          = SystemInfo.batteryStatus;
                copyTextureSupport     = SystemInfo.copyTextureSupport;
                deviceModel            = SystemInfo.deviceModel;
                deviceName             = SystemInfo.deviceName;
                deviceType             = SystemInfo.deviceType;
                deviceUniqueIdentifier = SystemInfo.deviceUniqueIdentifier;
                graphicsDeviceID       = SystemInfo.graphicsDeviceID;
                graphicsDeviceName     = SystemInfo.graphicsDeviceName;
                graphicsDeviceType     = SystemInfo.graphicsDeviceType;
                graphicsDeviceVendor   = SystemInfo.graphicsDeviceVendor;
                graphicsDeviceVendorID = SystemInfo.graphicsDeviceVendorID;
                graphicsDeviceVersion  = SystemInfo.graphicsDeviceVersion;
                graphicsMemorySize     = SystemInfo.graphicsMemorySize;
                graphicsMultiThreaded  = SystemInfo.graphicsMultiThreaded;
                graphicsShaderLevel    = SystemInfo.graphicsShaderLevel;
                graphicsUVStartsAtTop  = SystemInfo.graphicsUVStartsAtTop;
                hasDynamicUniformArrayIndexingInFragmentShaders = SystemInfo.hasDynamicUniformArrayIndexingInFragmentShaders;
                hasHiddenSurfaceRemovalOnGPU = SystemInfo.hasHiddenSurfaceRemovalOnGPU;
                hasMipMaxLevel = SystemInfo.hasMipMaxLevel;
                maxComputeBufferInputsCompute  = SystemInfo.maxComputeBufferInputsCompute;
                maxComputeBufferInputsDomain   = SystemInfo.maxComputeBufferInputsDomain;
                maxComputeBufferInputsFragment = SystemInfo.maxComputeBufferInputsFragment;
                maxComputeBufferInputsGeometry = SystemInfo.maxComputeBufferInputsGeometry;
                maxComputeBufferInputsHull     = SystemInfo.maxComputeBufferInputsHull;
                maxComputeBufferInputsVertex   = SystemInfo.maxComputeBufferInputsVertex;
                maxComputeWorkGroupSize        = SystemInfo.maxComputeWorkGroupSize;
                maxComputeWorkGroupSizeX       = SystemInfo.maxComputeWorkGroupSizeX;
                maxComputeWorkGroupSizeY       = SystemInfo.maxComputeWorkGroupSizeY;
                maxComputeWorkGroupSizeZ       = SystemInfo.maxComputeWorkGroupSizeX;
                maxCubemapSize = SystemInfo.maxCubemapSize;
                maxTextureSize = SystemInfo.maxTextureSize;
#if UNITY_2020_1_OR_NEWER
                constantBufferOffsetAlignment = SystemInfo.constantBufferOffsetAlignment;
#else
                minConstantBufferOffsetAlignment = SystemInfo.minConstantBufferOffsetAlignment;
#endif
                npotSupport                         = SystemInfo.npotSupport;
                operatingSystem                     = SystemInfo.operatingSystem;
                operatingSystemFamily               = SystemInfo.operatingSystemFamily;
                processorCount                      = SystemInfo.processorCount;
                processorFrequency                  = SystemInfo.processorFrequency;
                processorType                       = SystemInfo.processorType;
                renderingThreadingMode              = SystemInfo.renderingThreadingMode;
                supportedRandomWriteTargetCount     = SystemInfo.supportedRenderTargetCount;
                supportedRenderTargetCount          = SystemInfo.supportedRenderTargetCount;
                supports2DArrayTextures             = SystemInfo.supports2DArrayTextures;
                supports32bitsIndexBuffer           = SystemInfo.supports32bitsIndexBuffer;
                supports3DRenderTextures            = SystemInfo.supports3DRenderTextures;
                supports3DTextures                  = SystemInfo.supports3DTextures;
                supportsAccelerometer               = SystemInfo.supportsAccelerometer;
                supportsAsyncCompute                = SystemInfo.supportsAsyncCompute;
                supportsAsyncGPUReadback            = SystemInfo.supportsAsyncGPUReadback;
                supportsAudio                       = SystemInfo.supportsAudio;
                supportsComputeShaders              = SystemInfo.supportsComputeShaders;
                supportsCubemapArrayTextures        = SystemInfo.supportsCubemapArrayTextures;
                supportsGeometryShaders             = SystemInfo.supportsGeometryShaders;
                supportsGraphicsFence               = SystemInfo.supportsGraphicsFence;
                supportsGyroscope                   = SystemInfo.supportsGyroscope;
                supportsHardwareQuadTopology        = SystemInfo.supportsHardwareQuadTopology;
                supportsInstancing                  = SystemInfo.supportsInstancing;
                supportsLocationService             = SystemInfo.supportsLocationService;
                supportsMipStreaming                = SystemInfo.supportsMipStreaming;
                supportsMotionVectors               = SystemInfo.supportsMotionVectors;
                supportsMultisampleAutoResolve      = SystemInfo.supportsMultisampleAutoResolve;
                supportsMultisampledTextures        = SystemInfo.supportsMultisampledTextures;
                supportsRawShadowDepthSampling      = SystemInfo.supportsRawShadowDepthSampling;
                supportsRayTracing                  = SystemInfo.supportsRayTracing;
                supportsSeparatedRenderTargetsBlend = SystemInfo.supportsSeparatedRenderTargetsBlend;
                supportsSetConstantBuffer           = SystemInfo.supportsSetConstantBuffer;
                supportsShadows                     = SystemInfo.supportsShadows;
                supportsSparseTextures              = SystemInfo.supportsSparseTextures;
                supportsTessellationShaders         = SystemInfo.supportsTessellationShaders;
                supportsTextureWrapMirrorOnce       = SystemInfo.supportsTextureWrapMirrorOnce;
                supportsVibration                   = SystemInfo.supportsVibration;
                systemMemorySize                    = SystemInfo.systemMemorySize;
                unsupportedIdentifier               = SystemInfo.unsupportedIdentifier;
                usesLoadStoreActions                = SystemInfo.usesLoadStoreActions;
                usesReversedZBuffer                 = SystemInfo.usesReversedZBuffer;
            }
            else
            {
                deviceModel            = "";
                deviceName             = "";
                deviceUniqueIdentifier = "";
                graphicsDeviceName     = "";
                graphicsDeviceVendor   = "";
                graphicsDeviceVersion  = "";
                operatingSystem        = "";
                processorType          = "";
                unsupportedIdentifier  = "";
            }
        }
示例#5
0
        public virtual void Deserialize(BinaryReader binaryReader)
        {
            batteryLevel           = binaryReader.ReadSingle();
            batteryStatus          = (BatteryStatus)binaryReader.ReadInt32();
            copyTextureSupport     = (UnityEngine.Rendering.CopyTextureSupport)binaryReader.ReadInt32();
            deviceModel            = binaryReader.ReadString();
            deviceName             = binaryReader.ReadString();
            deviceType             = (DeviceType)binaryReader.ReadInt32();
            deviceUniqueIdentifier = binaryReader.ReadString();
            graphicsDeviceID       = binaryReader.ReadInt32();
            graphicsDeviceName     = binaryReader.ReadString();
            graphicsDeviceType     = (UnityEngine.Rendering.GraphicsDeviceType)binaryReader.ReadInt32();
            graphicsDeviceVendor   = binaryReader.ReadString();
            graphicsDeviceVendorID = binaryReader.ReadInt32();
            graphicsDeviceVersion  = binaryReader.ReadString();
            graphicsMemorySize     = binaryReader.ReadInt32();
            graphicsMultiThreaded  = binaryReader.ReadBoolean();
            graphicsShaderLevel    = binaryReader.ReadInt32();
            graphicsUVStartsAtTop  = binaryReader.ReadBoolean();
            hasDynamicUniformArrayIndexingInFragmentShaders = binaryReader.ReadBoolean();
            hasHiddenSurfaceRemovalOnGPU = binaryReader.ReadBoolean();
            hasMipMaxLevel = binaryReader.ReadBoolean();
            maxComputeBufferInputsCompute  = binaryReader.ReadInt32();
            maxComputeBufferInputsDomain   = binaryReader.ReadInt32();
            maxComputeBufferInputsFragment = binaryReader.ReadInt32();
            maxComputeBufferInputsGeometry = binaryReader.ReadInt32();
            maxComputeBufferInputsHull     = binaryReader.ReadInt32();
            maxComputeBufferInputsVertex   = binaryReader.ReadInt32();
            maxComputeWorkGroupSize        = binaryReader.ReadInt32();
            maxComputeWorkGroupSizeX       = binaryReader.ReadInt32();
            maxComputeWorkGroupSizeY       = binaryReader.ReadInt32();
            maxComputeWorkGroupSizeZ       = binaryReader.ReadInt32();
            maxCubemapSize = binaryReader.ReadInt32();
            maxTextureSize = binaryReader.ReadInt32();
#if UNITY_2020_1_OR_NEWER
            constantBufferOffsetAlignment = binaryReader.ReadInt32();
#else
            minConstantBufferOffsetAlignment = binaryReader.ReadBoolean();
#endif
            npotSupport                         = (NPOTSupport)binaryReader.ReadInt32();
            operatingSystem                     = binaryReader.ReadString();
            operatingSystemFamily               = (OperatingSystemFamily)binaryReader.ReadInt32();
            processorCount                      = binaryReader.ReadInt32();
            processorFrequency                  = binaryReader.ReadInt32();
            processorType                       = binaryReader.ReadString();
            renderingThreadingMode              = (UnityEngine.Rendering.RenderingThreadingMode)binaryReader.ReadInt32();
            supportedRandomWriteTargetCount     = binaryReader.ReadInt32();
            supportedRenderTargetCount          = binaryReader.ReadInt32();
            supports2DArrayTextures             = binaryReader.ReadBoolean();
            supports32bitsIndexBuffer           = binaryReader.ReadBoolean();
            supports3DRenderTextures            = binaryReader.ReadBoolean();
            supports3DTextures                  = binaryReader.ReadBoolean();
            supportsAccelerometer               = binaryReader.ReadBoolean();
            supportsAsyncCompute                = binaryReader.ReadBoolean();
            supportsAsyncGPUReadback            = binaryReader.ReadBoolean();
            supportsAudio                       = binaryReader.ReadBoolean();
            supportsComputeShaders              = binaryReader.ReadBoolean();
            supportsCubemapArrayTextures        = binaryReader.ReadBoolean();
            supportsGeometryShaders             = binaryReader.ReadBoolean();
            supportsGraphicsFence               = binaryReader.ReadBoolean();
            supportsGyroscope                   = binaryReader.ReadBoolean();
            supportsHardwareQuadTopology        = binaryReader.ReadBoolean();
            supportsInstancing                  = binaryReader.ReadBoolean();
            supportsLocationService             = binaryReader.ReadBoolean();
            supportsMipStreaming                = binaryReader.ReadBoolean();
            supportsMotionVectors               = binaryReader.ReadBoolean();
            supportsMultisampleAutoResolve      = binaryReader.ReadBoolean();
            supportsMultisampledTextures        = binaryReader.ReadInt32();
            supportsRawShadowDepthSampling      = binaryReader.ReadBoolean();
            supportsRayTracing                  = binaryReader.ReadBoolean();
            supportsSeparatedRenderTargetsBlend = binaryReader.ReadBoolean();
            supportsSetConstantBuffer           = binaryReader.ReadBoolean();
            supportsShadows                     = binaryReader.ReadBoolean();
            supportsSparseTextures              = binaryReader.ReadBoolean();
            supportsTessellationShaders         = binaryReader.ReadBoolean();
            supportsTextureWrapMirrorOnce       = binaryReader.ReadInt32();
            supportsVibration                   = binaryReader.ReadBoolean();
            systemMemorySize                    = binaryReader.ReadInt32();
            unsupportedIdentifier               = binaryReader.ReadString();
            usesLoadStoreActions                = binaryReader.ReadBoolean();
            usesReversedZBuffer                 = binaryReader.ReadBoolean();
        }