Class PlatformMacros
- Namespace
- ShadowDusk.Core.Preprocessor
- Assembly
- ShadowDusk.Core.dll
Provides the standard preprocessor macros (e.g. MGFX, GLSL/HLSL,
per-target flags) that shaders branch on for each PlatformTarget, mirroring
the macros mgfxc defines.
public static class PlatformMacros
- Inheritance
-
PlatformMacros
- Inherited Members
Methods
For(PlatformTarget)
Returns the macro set for the given platform target.
public static MacroSet For(PlatformTarget platform)
Parameters
platformPlatformTargetThe target backend.
Returns
- MacroSet
The macros to define for that target.
Exceptions
- ArgumentOutOfRangeException
Thrown for an unsupported target (e.g. Metal, which is not yet implemented).
IsSupported(PlatformTarget)
Whether For(PlatformTarget) can produce a macro set for the given target — i.e. the target is one ShadowDusk compiles. Callers pre-check this instead of catching the ArgumentOutOfRangeException (no exception-as-control-flow).
public static bool IsSupported(PlatformTarget platform)
Parameters
platformPlatformTarget