bad51cdb52
For Apple's on Arm CPU computed triangle normals inside fragment shader using dFdx and dFdy has the opposite direction. Because of this, objects had darker colors inside the multi-material gizmo. Based on https://stackoverflow.com/a/66206648, the similar behavior was also spotted on some other devices with Arm CPU.
48 lines
826 B
C++
48 lines
826 B
C++
#ifndef SLIC3R_Platform_HPP
|
|
#define SLIC3R_Platform_HPP
|
|
|
|
namespace Slic3r {
|
|
|
|
enum class Platform
|
|
{
|
|
Uninitialized,
|
|
Unknown,
|
|
Windows,
|
|
OSX,
|
|
Linux,
|
|
BSDUnix,
|
|
};
|
|
|
|
enum class PlatformFlavor
|
|
{
|
|
Uninitialized,
|
|
Unknown,
|
|
// For Windows and OSX, until we need to be more specific.
|
|
Generic,
|
|
// For Platform::Linux
|
|
GenericLinux,
|
|
LinuxOnChromium,
|
|
// Microsoft's Windows on Linux (Linux kernel simulated on NTFS kernel)
|
|
WSL,
|
|
// Microsoft's Windows on Linux, version 2 (virtual machine)
|
|
WSL2,
|
|
// For Platform::BSDUnix
|
|
OpenBSD,
|
|
// For Platform::OSX
|
|
GenericOSX,
|
|
// For Apple's on Intel X86 CPU
|
|
OSXOnX86,
|
|
// For Apple's on Arm CPU
|
|
OSXOnArm,
|
|
};
|
|
|
|
// To be called on program start-up.
|
|
void detect_platform();
|
|
|
|
Platform platform();
|
|
PlatformFlavor platform_flavor();
|
|
|
|
} // namespace Slic3r
|
|
|
|
#endif // SLIC3R_Platform_HPP
|