public static ImageTestResultConnection GetDefaultImageTestResultConnection() { var result = new ImageTestResultConnection(); // TODO: Check build number in environment variables result.BuildNumber = -1; result.Platform = Platform.Type.ToString(); result.Serial = Environment.MachineName; #if STRIDE_GRAPHICS_API_DIRECT3D12 result.DeviceName = "Direct3D12"; #elif STRIDE_GRAPHICS_API_DIRECT3D11 result.DeviceName = "Direct3D"; #endif return(result); }
public static ImageTestResultConnection GetDefaultImageTestResultConnection() { var result = new ImageTestResultConnection(); // TODO: Check build number in environment variables result.BuildNumber = -1; #if STRIDE_PLATFORM_WINDOWS_DESKTOP result.Platform = "Windows"; result.Serial = Environment.MachineName; #if STRIDE_GRAPHICS_API_DIRECT3D12 result.DeviceName = "Direct3D12"; #elif STRIDE_GRAPHICS_API_DIRECT3D11 result.DeviceName = "Direct3D"; #elif STRIDE_GRAPHICS_API_OPENGLES result.DeviceName = "OpenGLES"; #elif STRIDE_GRAPHICS_API_OPENGL result.DeviceName = "OpenGL"; #elif STRIDE_GRAPHICS_API_VULKAN result.DeviceName = "Vulkan"; #endif #elif STRIDE_PLATFORM_ANDROID result.Platform = "Android"; result.DeviceName = Android.OS.Build.Manufacturer + " " + Android.OS.Build.Model; result.Serial = Android.OS.Build.Serial ?? "Unknown"; #elif STRIDE_PLATFORM_IOS result.Platform = "iOS"; result.DeviceName = iOSDeviceType.Version.ToString(); result.Serial = UIKit.UIDevice.CurrentDevice.Name; #elif STRIDE_PLATFORM_UWP result.Platform = "UWP"; var deviceInfo = new EasClientDeviceInformation(); result.DeviceName = deviceInfo.SystemManufacturer + " " + deviceInfo.SystemProductName; try { result.Serial = deviceInfo.Id.ToString(); } catch (Exception) { // Ignored on UWP } #endif return(result); }