| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
- //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
- #pragma once
- #include "Prerequisites/BsPlatformDefines.h"
- #include "String/BsString.h"
- #include "Prerequisites/BsTypes.h"
- namespace bs
- {
- /** @addtogroup General
- * @{
- */
- struct MACAddress;
- /** Contains information about available GPUs on the system. */
- struct GPUInfo
- {
- String names[5];
- UINT32 numGPUs;
- };
- /** Contains information about the system hardware and operating system. */
- struct SystemInfo
- {
- String cpuManufacturer;
- String cpuModel;
- UINT32 cpuClockSpeedMhz;
- UINT32 cpuNumCores;
- UINT32 memoryAmountMb;
- String osName;
- bool osIs64Bit;
- GPUInfo gpuInfo;
- };
- /** Provides access to various operating system specific utility functions. */
- class BS_UTILITY_EXPORT PlatformUtility
- {
- public:
- /**
- * Terminates the current process.
- *
- * @param[in] force True if the process should be forcefully terminated with no cleanup.
- */
- static void terminate(bool force = false);
- /** Returns information about the underlying hardware. */
- static SystemInfo getSystemInfo();
- /** Creates a new universally unique identifier and returns it as a string. */
- static String generateUUID();
- /** @name Internal
- * @{
- */
- /**
- * Assigns information about GPU hardware. This data will be returned by getSystemInfo() when requested. This is
- * expeced to be called by the render API backend when initialized.
- */
- static void _setGPUInfo(GPUInfo gpuInfo) { sGPUInfo = gpuInfo; }
- /** @} */
- private:
- static GPUInfo sGPUInfo;
- };
- /** @} */
- }
|