Add command line controls for reverse z
This commit is contained in:
@@ -80,9 +80,12 @@ namespace Flax.Build
|
|||||||
options.ScriptingAPI.Defines.Add("USE_LARGE_WORLDS");
|
options.ScriptingAPI.Defines.Add("USE_LARGE_WORLDS");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add reverse-z definitions
|
if (!EngineConfiguration.WithTraditionalZ(options))
|
||||||
options.CompileEnv.PreprocessorDefinitions.Add("FLAX_REVERSE_Z");
|
{
|
||||||
options.ScriptingAPI.Defines.Add("FLAX_REVERSE_Z");
|
// Add reverse-z definitions
|
||||||
|
options.CompileEnv.PreprocessorDefinitions.Add("FLAX_REVERSE_Z");
|
||||||
|
options.ScriptingAPI.Defines.Add("FLAX_REVERSE_Z");
|
||||||
|
}
|
||||||
|
|
||||||
// Add include paths for this and all referenced projects sources
|
// Add include paths for this and all referenced projects sources
|
||||||
foreach (var project in Project.GetAllProjects())
|
foreach (var project in Project.GetAllProjects())
|
||||||
|
|||||||
@@ -264,6 +264,12 @@ namespace Flax.Build
|
|||||||
[CommandLine("useLargeWorlds", "1 to enable large worlds with 64-bit coordinates precision support in build (USE_LARGE_WORLDS=1)")]
|
[CommandLine("useLargeWorlds", "1 to enable large worlds with 64-bit coordinates precision support in build (USE_LARGE_WORLDS=1)")]
|
||||||
public static bool UseLargeWorlds = false;
|
public static bool UseLargeWorlds = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 1 to use traditional z buffer, or reversed z will be adopted by default.
|
||||||
|
/// </summary>
|
||||||
|
[CommandLine("useLargeWorlds", "1 to use traditional z buffer, or reversed z will be adopted by default.")]
|
||||||
|
public static bool NoReverseZ = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// True if managed C# scripting should be enabled, otherwise false. Engine without C# is partially supported and can be used when porting to a new platform before implementing C# runtime on it.
|
/// True if managed C# scripting should be enabled, otherwise false. Engine without C# is partially supported and can be used when porting to a new platform before implementing C# runtime on it.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -287,6 +293,12 @@ namespace Flax.Build
|
|||||||
return UseLargeWorlds;
|
return UseLargeWorlds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool WithTraditionalZ(NativeCpp.BuildOptions options)
|
||||||
|
{
|
||||||
|
// Whether to use traditional z-buffer instead of reversed z
|
||||||
|
return NoReverseZ;
|
||||||
|
}
|
||||||
|
|
||||||
public static bool WithDotNet(NativeCpp.BuildOptions options)
|
public static bool WithDotNet(NativeCpp.BuildOptions options)
|
||||||
{
|
{
|
||||||
return UseDotNet;
|
return UseDotNet;
|
||||||
|
|||||||
Reference in New Issue
Block a user