diff --git a/src/libprojectM/ProjectM.cpp b/src/libprojectM/ProjectM.cpp index 39cf95484..2d74a6278 100644 --- a/src/libprojectM/ProjectM.cpp +++ b/src/libprojectM/ProjectM.cpp @@ -24,7 +24,6 @@ #include "BeatDetect.hpp" #include "ConfigFile.h" #include "PCM.hpp" //Sound data handler (buffering, FFT, etc.) -#include "PipelineContext.hpp" #include "PipelineMerger.hpp" #include "Preset.hpp" #include "PresetChooser.hpp" @@ -69,8 +68,6 @@ void ProjectM::ResetTextures() ProjectM::ProjectM(const std::string& configurationFilename, Flags flags) : m_flags(flags) - , m_pipelineContext(std::make_unique()) - , m_pipelineContext2(std::make_unique()) { ReadConfig(configurationFilename); Reset(); @@ -79,8 +76,6 @@ ProjectM::ProjectM(const std::string& configurationFilename, Flags flags) ProjectM::ProjectM(const class Settings& settings, Flags flags) : m_flags(flags) - , m_pipelineContext(std::make_unique()) - , m_pipelineContext2(std::make_unique()) { ReadSettings(settings); Reset(); @@ -400,12 +395,12 @@ void ProjectM::RenderFrameEndOnSeparatePasses(Pipeline* pipeline) auto ProjectM::PipelineContext() -> class PipelineContext& { - return *m_pipelineContext; + return m_pipelineContext; } auto ProjectM::PipelineContext2() -> class PipelineContext& { - return *m_pipelineContext2; + return m_pipelineContext2; } void ProjectM::Reset() diff --git a/src/libprojectM/ProjectM.hpp b/src/libprojectM/ProjectM.hpp index 0a12feaac..e576c7163 100644 --- a/src/libprojectM/ProjectM.hpp +++ b/src/libprojectM/ProjectM.hpp @@ -22,6 +22,7 @@ #include "Common.hpp" #include "PCM.hpp" +#include "PipelineContext.hpp" #include "event.h" #include "fatal.h" @@ -52,8 +53,6 @@ #endif -class PipelineContext; - class BeatDetect; class Pcm; @@ -361,10 +360,11 @@ private: bool m_errorLoadingCurrentPreset{false}; //!< Error flag for preset loading errors. + class PipelineContext m_pipelineContext; //!< Pipeline context for the first/current preset. + class PipelineContext m_pipelineContext2; //!< Pipeline context for the next/transitioning preset. + std::unique_ptr m_renderer; //!< The Preset renderer. std::unique_ptr m_beatDetect; //!< The beat detection class. - std::unique_ptr m_pipelineContext; //!< Pipeline context for the first/current preset. - std::unique_ptr m_pipelineContext2; //!< Pipeline context for the next/transitioning preset. std::unique_ptr m_presetPos; //!< The current position of the directory iterator. std::unique_ptr m_presetLoader; //!< Required by the preset chooser. Manages a loaded preset directory. std::unique_ptr m_presetChooser; //!< Provides accessor functions to choose presets.