Skip to content
Permalink
Browse files

[Rendering] EffectSystem: Remove dependency to Game class and move Ef…

…fectCompilationMode in the same namespace
  • Loading branch information
xen2 committed Feb 12, 2019
1 parent 9b11625 commit 0cc21349a0c4c172c53a94ad7fc7f69547708b3e
@@ -372,6 +372,11 @@ protected override void Initialize()
// If requested in game settings, compile effects remotely and/or notify new shader requests
EffectSystem.Compiler = EffectSystem.CreateEffectCompiler(Content.FileProvider, EffectSystem, Settings?.PackageName, Settings?.EffectCompilation ?? EffectCompilationMode.Local, Settings?.RecordUsedEffects ?? false);

// Setup shader compiler settings from a compilation mode.
// TODO: We might want to provide overrides on the GameSettings to specify debug and/or optim level specifically.
if (Settings != null)
EffectSystem.SetCompilationMode(Settings.CompilationMode);

GameSystems.Add(EffectSystem);

GameSystems.Add(Streaming);
@@ -7,12 +7,8 @@
using System.Threading.Tasks;
using Xenko.Core;
using Xenko.Core.Diagnostics;
using Xenko.Core.Extensions;
using Xenko.Core.IO;
using Xenko.Core.ReferenceCounting;
using Xenko.Core.Serialization.Contents;
using Xenko.Engine;
using Xenko.Engine.Design;
using Xenko.Games;
using Xenko.Graphics;
using Xenko.Shaders;
@@ -79,13 +75,11 @@ public override void Initialize()
directoryWatcher.Modified += FileModifiedEvent;
// TODO: xkfx too
#endif
}

// Setup shader compiler settings from a compilation mode.
// TODO: We might want to provide overrides on the GameSettings to specify debug and/or optim level specifically.
if (Game != null && (((Game)Game).Settings != null))
{
effectCompilerParameters.ApplyCompilationMode(((Game)Game).Settings.CompilationMode);
}
public void SetCompilationMode(CompilationMode compilationMode)
{
effectCompilerParameters.ApplyCompilationMode(compilationMode);
}

protected override void Destroy()

0 comments on commit 0cc2134

Please sign in to comment.
You can’t perform that action at this time.