diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml
index 1a0f352bf4..a6557ef484 100644
--- a/.github/workflows/build_windows.yml
+++ b/.github/workflows/build_windows.yml
@@ -38,7 +38,9 @@ jobs:
- name: Bootstrap vcpkg
shell: pwsh
- run: ${{ github.workspace }}/vcpkg/bootstrap-vcpkg.bat
+ run: |
+ ${{ github.workspace }}/vcpkg/bootstrap-vcpkg.bat
+ ${{ env.VCPKG_EXE }} fetch nuget
- name: Add NuGet sources
shell: pwsh
@@ -64,12 +66,12 @@ jobs:
if("${{ matrix.libs }}" -eq "shared") {
$shared_libs = "ON"
} else {
- $shared_libs = "ON"
+ $shared_libs = "OFF"
}
if("${{ matrix.fslib }}" -eq "boost") {
$use_boost = "ON"
} else {
- $use_boost = "ON"
+ $use_boost = "OFF"
}
if("${{ matrix.arch }}" -eq "X64") {
$triplet = "x64-windows"
diff --git a/src/api/include/projectM-4/parameters.h b/src/api/include/projectM-4/parameters.h
index 3885a3d754..e090576f87 100644
--- a/src/api/include/projectM-4/parameters.h
+++ b/src/api/include/projectM-4/parameters.h
@@ -64,7 +64,7 @@ PROJECTM_EXPORT void projectm_set_texture_search_paths(projectm_handle instance,
* If using this feature, it is further recommended to set the time to 0.0 on the first frame.
*
* @param instance The projectM instance handle.
- * @param seconds_since_first_frame Any value >= 0 to use user-specified timestamps, values < 0 will use the system clock.
+ * @param seconds_since_first_frame Any value >= 0 to use user-specified timestamps, values < 0 will use the system clock. Default: -1.0
* @since 4.2.0
*/
PROJECTM_EXPORT void projectm_set_frame_time(projectm_handle instance, double seconds_since_first_frame);
@@ -87,7 +87,7 @@ PROJECTM_EXPORT double projectm_get_last_frame_time(projectm_handle instance);
* The beat sensitivity to be used.
*
* @param instance The projectM instance handle.
- * @param sensitivity The sensitivity setting.
+ * @param sensitivity The sensitivity setting. Default: 1.0
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_beat_sensitivity(projectm_handle instance, float sensitivity);
@@ -109,7 +109,7 @@ PROJECTM_EXPORT float projectm_get_beat_sensitivity(projectm_handle instance);
*
Set this to a higher value than preset duration to disable hard cuts.
*
* @param instance The projectM instance handle.
- * @param seconds Minimum number of seconds the preset will be displayed before a hard cut.
+ * @param seconds Minimum number of seconds the preset will be displayed before a hard cut. Default: 20.0
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_hard_cut_duration(projectm_handle instance, double seconds);
@@ -129,7 +129,7 @@ PROJECTM_EXPORT double projectm_get_hard_cut_duration(projectm_handle instance);
* to work properly.
*
* @param instance The projectM instance handle.
- * @param enabled True to enable hard cuts, false to disable.
+ * @param enabled True to enable hard cuts, false to disable. Default: false
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_hard_cut_enabled(projectm_handle instance, bool enabled);
@@ -148,7 +148,7 @@ PROJECTM_EXPORT bool projectm_get_hard_cut_enabled(projectm_handle instance);
* The beat detection volume difference that must be surpassed to trigger a hard cut.
*
* @param instance The projectM instance handle.
- * @param sensitivity The volume threshold that triggers a hard cut if surpassed.
+ * @param sensitivity The volume threshold that triggers a hard cut if surpassed. Default: 2.0
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_hard_cut_sensitivity(projectm_handle instance, float sensitivity);
@@ -168,7 +168,7 @@ PROJECTM_EXPORT float projectm_get_hard_cut_sensitivity(projectm_handle instance
* to the other.
*
* @param instance The projectM instance handle.
- * @param seconds Time in seconds it takes to smoothly transition from one preset to another.
+ * @param seconds Time in seconds it takes to smoothly transition from one preset to another. Default: 3.0
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_soft_cut_duration(projectm_handle instance, double seconds);
@@ -188,7 +188,7 @@ PROJECTM_EXPORT double projectm_get_soft_cut_duration(projectm_handle instance);
* a smooth cut will be initiated. A hard cut, if any, will always happen before this time.
*
* @param instance The projectM instance handle.
- * @param seconds The number of seconds a preset will be displayed before the next is shown.
+ * @param seconds The number of seconds a preset will be displayed before the next is shown. Default: 30.0
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_preset_duration(projectm_handle instance, double seconds);
@@ -212,8 +212,8 @@ PROJECTM_EXPORT double projectm_get_preset_duration(projectm_handle instance);
* so only multiples of two are used.
*
* @param instance The projectM instance handle.
- * @param width The new width of the mesh.
- * @param height The new height of the mesh.
+ * @param width The new width of the mesh. Default: 32
+ * @param height The new height of the mesh. Default: 24
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_mesh_size(projectm_handle instance, size_t width, size_t height);
@@ -235,8 +235,8 @@ PROJECTM_EXPORT void projectm_get_mesh_size(projectm_handle instance, size_t* wi
* be configured externally to fix any possible drift.
*
* @param instance The projectM instance handle.
- * @param offset_X The offset in texels in the horizontal direction. Milkdrop uses 0.5, default in projectM is 0.0.
- * @param offset_y The offset in texels in the vertical direction. Milkdrop uses 0.5, default in projectM is 0.0.
+ * @param offset_X The offset in texels in the horizontal direction. Milkdrop uses 0.5. Default: 0.0
+ * @param offset_y The offset in texels in the vertical direction. Milkdrop uses 0.5. Default: 0.0
* @since 4.2.0
*/
PROJECTM_EXPORT void projectm_set_texel_offset(projectm_handle instance, float offset_X, float offset_y);
@@ -263,7 +263,7 @@ PROJECTM_EXPORT void projectm_get_texel_offset(projectm_handle instance, float*
* which may choose to use it for calculations. It is not used in any other way by the library.
*
* @param instance The projectM instance handle.
- * @param fps The current FPS value projectM is running with.
+ * @param fps The current FPS value projectM is running with. Default: 35
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_fps(projectm_handle instance, int32_t fps);
@@ -286,7 +286,7 @@ PROJECTM_EXPORT int32_t projectm_get_fps(projectm_handle instance);
* be distorted if the viewport isn't exactly square.
*
* @param instance The projectM instance handle.
- * @param enabled True to enable aspect correction, false to disable it.
+ * @param enabled True to enable aspect correction, false to disable it. Default: true
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_aspect_correction(projectm_handle instance, bool enabled);
@@ -309,7 +309,7 @@ PROJECTM_EXPORT bool projectm_get_aspect_correction(projectm_handle instance);
*
See function sampledPresetDuration() of the TimeKeeper class on how it is used.
*
* @param instance The projectM instance handle.
- * @param value The new "easter egg" value. Must be greater than zero, otherwise a default sigma value of 1.0 will be used.
+ * @param value The new "easter egg" value. Must be greater than zero, otherwise a default sigma value of 1.0 will be used. Default: 1.0
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_easter_egg(projectm_handle instance, float value);
@@ -329,7 +329,7 @@ PROJECTM_EXPORT float projectm_get_easter_egg(projectm_handle instance);
* preset switches will still be executed.
*
* @param instance The projectM instance handle.
- * @param lock True to lock the current preset, false to enable automatic transitions.
+ * @param lock True to lock the current preset, false to enable automatic transitions. Default: false
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_preset_locked(projectm_handle instance, bool lock);
@@ -345,6 +345,9 @@ PROJECTM_EXPORT bool projectm_get_preset_locked(projectm_handle instance);
/**
* @brief Sets the current viewport size in pixels.
*
+ * This method must be called with a non-zero size for each dimension for projectM to render
+ * anything. The viewport size should be the same size or smaller as the surface being rendered to.
+ *
* The internal textures will only be replaced and resized when rendering the next frame and only
* if any of the two dimensions actually changed.
*
@@ -352,8 +355,8 @@ PROJECTM_EXPORT bool projectm_get_preset_locked(projectm_handle instance);
* effects as it only updates the size with the same values.
*
* @param instance The projectM instance handle.
- * @param width New viewport width in pixels.
- * @param height New viewport height in pixels.
+ * @param width New viewport width in pixels. Default: 0
+ * @param height New viewport height in pixels. Default: 0
* @since 4.0.0
*/
PROJECTM_EXPORT void projectm_set_window_size(projectm_handle instance, size_t width, size_t height);
diff --git a/src/libprojectM/Audio/CMakeLists.txt b/src/libprojectM/Audio/CMakeLists.txt
index c5db70b07e..99685b95c4 100644
--- a/src/libprojectM/Audio/CMakeLists.txt
+++ b/src/libprojectM/Audio/CMakeLists.txt
@@ -14,7 +14,7 @@ add_library(Audio OBJECT
target_include_directories(Audio
PUBLIC
- ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/..
)
target_link_libraries(Audio
diff --git a/src/libprojectM/Audio/FrameAudioData.hpp b/src/libprojectM/Audio/FrameAudioData.hpp
index f905bb33a0..98ed4177ab 100644
--- a/src/libprojectM/Audio/FrameAudioData.hpp
+++ b/src/libprojectM/Audio/FrameAudioData.hpp
@@ -6,8 +6,9 @@
*/
#pragma once
-#include "projectM-4/projectM_export.h"
-#include "AudioConstants.hpp"
+#include "Audio/AudioConstants.hpp"
+
+#include
#include
diff --git a/src/libprojectM/Audio/Loudness.cpp b/src/libprojectM/Audio/Loudness.cpp
index 2139c92406..0f8d6371dd 100644
--- a/src/libprojectM/Audio/Loudness.cpp
+++ b/src/libprojectM/Audio/Loudness.cpp
@@ -1,4 +1,4 @@
-#include "Loudness.hpp"
+#include "Audio/Loudness.hpp"
#include
diff --git a/src/libprojectM/Audio/Loudness.hpp b/src/libprojectM/Audio/Loudness.hpp
index 55f3baf8cf..7d453bd297 100644
--- a/src/libprojectM/Audio/Loudness.hpp
+++ b/src/libprojectM/Audio/Loudness.hpp
@@ -5,7 +5,7 @@
#pragma once
-#include "AudioConstants.hpp"
+#include "Audio/AudioConstants.hpp"
#include
#include
diff --git a/src/libprojectM/Audio/MilkdropFFT.cpp b/src/libprojectM/Audio/MilkdropFFT.cpp
index 83dfe128d4..134f338a17 100644
--- a/src/libprojectM/Audio/MilkdropFFT.cpp
+++ b/src/libprojectM/Audio/MilkdropFFT.cpp
@@ -27,7 +27,7 @@ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISI
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "MilkdropFFT.hpp"
+#include "Audio/MilkdropFFT.hpp"
namespace libprojectM {
namespace Audio {
diff --git a/src/libprojectM/Audio/PCM.cpp b/src/libprojectM/Audio/PCM.cpp
index 56a7cc65d0..bc7c83c59a 100755
--- a/src/libprojectM/Audio/PCM.cpp
+++ b/src/libprojectM/Audio/PCM.cpp
@@ -1,4 +1,4 @@
-#include "PCM.hpp"
+#include "Audio/PCM.hpp"
namespace libprojectM {
namespace Audio {
diff --git a/src/libprojectM/Audio/PCM.hpp b/src/libprojectM/Audio/PCM.hpp
index 602e2490fb..bfda1a4235 100755
--- a/src/libprojectM/Audio/PCM.hpp
+++ b/src/libprojectM/Audio/PCM.hpp
@@ -7,11 +7,11 @@
#pragma once
-#include "AudioConstants.hpp"
-#include "FrameAudioData.hpp"
-#include "Loudness.hpp"
-#include "MilkdropFFT.hpp"
-#include "WaveformAligner.hpp"
+#include "Audio/AudioConstants.hpp"
+#include "Audio/FrameAudioData.hpp"
+#include "Audio/Loudness.hpp"
+#include "Audio/MilkdropFFT.hpp"
+#include "Audio/WaveformAligner.hpp"
#include
diff --git a/src/libprojectM/Audio/WaveformAligner.cpp b/src/libprojectM/Audio/WaveformAligner.cpp
index 6d59f5aca0..a92eea200c 100644
--- a/src/libprojectM/Audio/WaveformAligner.cpp
+++ b/src/libprojectM/Audio/WaveformAligner.cpp
@@ -1,4 +1,4 @@
-#include "WaveformAligner.hpp"
+#include "Audio/WaveformAligner.hpp"
#include
#include
diff --git a/src/libprojectM/Audio/WaveformAligner.hpp b/src/libprojectM/Audio/WaveformAligner.hpp
index 74b7e616a1..9c0950b4f7 100644
--- a/src/libprojectM/Audio/WaveformAligner.hpp
+++ b/src/libprojectM/Audio/WaveformAligner.hpp
@@ -5,7 +5,7 @@
#pragma once
-#include "AudioConstants.hpp"
+#include "Audio/AudioConstants.hpp"
#include
#include
diff --git a/src/libprojectM/CMakeLists.txt b/src/libprojectM/CMakeLists.txt
index 8acfb82cff..2fc1c3160e 100644
--- a/src/libprojectM/CMakeLists.txt
+++ b/src/libprojectM/CMakeLists.txt
@@ -20,8 +20,6 @@ add_library(projectM_main OBJECT
PresetFactory.hpp
PresetFactoryManager.cpp
PresetFactoryManager.hpp
- PresetFileParser.cpp
- PresetFileParser.hpp
ProjectM.cpp
ProjectM.hpp
ProjectMCWrapper.cpp
@@ -30,7 +28,6 @@ add_library(projectM_main OBJECT
TimeKeeper.hpp
Utils.cpp
Utils.hpp
- projectM-opengl.h
)
target_link_libraries(projectM_main
diff --git a/src/libprojectM/MilkdropPreset/BlurTexture.hpp b/src/libprojectM/MilkdropPreset/BlurTexture.hpp
index 04647a5a80..bfab458fbb 100644
--- a/src/libprojectM/MilkdropPreset/BlurTexture.hpp
+++ b/src/libprojectM/MilkdropPreset/BlurTexture.hpp
@@ -4,10 +4,8 @@
*/
#pragma once
-#include "Renderer/Mesh.hpp"
-
-
#include
+#include
#include
#include
#include
diff --git a/src/libprojectM/MilkdropPreset/Border.cpp b/src/libprojectM/MilkdropPreset/Border.cpp
index 10dd8c9d90..f5805e4e80 100644
--- a/src/libprojectM/MilkdropPreset/Border.cpp
+++ b/src/libprojectM/MilkdropPreset/Border.cpp
@@ -1,5 +1,7 @@
#include "Border.hpp"
+#include "PerFrameContext.hpp"
+
#include
namespace libprojectM {
diff --git a/src/libprojectM/MilkdropPreset/Border.hpp b/src/libprojectM/MilkdropPreset/Border.hpp
index b8f8f7eeb8..839398ca19 100644
--- a/src/libprojectM/MilkdropPreset/Border.hpp
+++ b/src/libprojectM/MilkdropPreset/Border.hpp
@@ -1,6 +1,5 @@
#pragma once
-#include "PerFrameContext.hpp"
#include "PresetState.hpp"
#include
diff --git a/src/libprojectM/MilkdropPreset/CMakeLists.txt b/src/libprojectM/MilkdropPreset/CMakeLists.txt
index 68851e548c..6889d8ad2f 100644
--- a/src/libprojectM/MilkdropPreset/CMakeLists.txt
+++ b/src/libprojectM/MilkdropPreset/CMakeLists.txt
@@ -72,6 +72,8 @@ add_library(MilkdropPreset OBJECT
PerPixelContext.hpp
PerPixelMesh.cpp
PerPixelMesh.hpp
+ PresetFileParser.cpp
+ PresetFileParser.hpp
PresetState.cpp
PresetState.hpp
ShapePerFrameContext.cpp
diff --git a/src/libprojectM/MilkdropPreset/CustomShape.cpp b/src/libprojectM/MilkdropPreset/CustomShape.cpp
index 4f9a0f3acf..1acbeb2395 100644
--- a/src/libprojectM/MilkdropPreset/CustomShape.cpp
+++ b/src/libprojectM/MilkdropPreset/CustomShape.cpp
@@ -25,7 +25,7 @@ CustomShape::CustomShape(PresetState& presetState)
m_perFrameContext.RegisterBuiltinVariables();
}
-void CustomShape::Initialize(::libprojectM::PresetFileParser& parsedFile, int index)
+void CustomShape::Initialize(PresetFileParser& parsedFile, int index)
{
std::string const shapecodePrefix = "shapecode_" + std::to_string(index) + "_";
diff --git a/src/libprojectM/MilkdropPreset/CustomShape.hpp b/src/libprojectM/MilkdropPreset/CustomShape.hpp
index 326790b2af..5090b37eb7 100644
--- a/src/libprojectM/MilkdropPreset/CustomShape.hpp
+++ b/src/libprojectM/MilkdropPreset/CustomShape.hpp
@@ -31,7 +31,7 @@ class CustomShape
* @param parsedFile The file parser with the preset data.
* @param index The waveform index.
*/
- void Initialize(::libprojectM::PresetFileParser& parsedFile, int index);
+ void Initialize(PresetFileParser& parsedFile, int index);
/**
* @brief Compiles all code blocks and runs the init expression.
diff --git a/src/libprojectM/MilkdropPreset/CustomWaveform.hpp b/src/libprojectM/MilkdropPreset/CustomWaveform.hpp
index e82687ae91..7c4c3df1a2 100644
--- a/src/libprojectM/MilkdropPreset/CustomWaveform.hpp
+++ b/src/libprojectM/MilkdropPreset/CustomWaveform.hpp
@@ -5,16 +5,15 @@
#include
#include
-#include "Renderer/Point.hpp"
+#include
#include
namespace libprojectM {
+namespace MilkdropPreset {
class PresetFileParser;
-namespace MilkdropPreset {
-
class CustomWaveform
{
public:
@@ -30,7 +29,7 @@ class CustomWaveform
* @param parsedFile The file parser with the preset data.
* @param index The waveform index.
*/
- void Initialize(::libprojectM::PresetFileParser& parsedFile, int index);
+ void Initialize(PresetFileParser& parsedFile, int index);
/**
* @brief Compiles all code blocks and runs the init expression.
diff --git a/src/libprojectM/MilkdropPreset/MilkdropPreset.cpp b/src/libprojectM/MilkdropPreset/MilkdropPreset.cpp
index 81a9309681..ef1716115b 100755
--- a/src/libprojectM/MilkdropPreset/MilkdropPreset.cpp
+++ b/src/libprojectM/MilkdropPreset/MilkdropPreset.cpp
@@ -207,7 +207,7 @@ void MilkdropPreset::Load(const std::string& pathname)
SetFilename(ParseFilename(pathname));
- ::libprojectM::PresetFileParser parser;
+ PresetFileParser parser;
if (!parser.Read(pathname))
{
@@ -223,7 +223,7 @@ void MilkdropPreset::Load(std::istream& stream)
{
LOG_DEBUG("[MilkdropPreset] Loading preset from stream.");
- ::libprojectM::PresetFileParser parser;
+ PresetFileParser parser;
if (!parser.Read(stream))
{
@@ -235,7 +235,7 @@ void MilkdropPreset::Load(std::istream& stream)
InitializePreset(parser);
}
-void MilkdropPreset::InitializePreset(::libprojectM::PresetFileParser& parsedFile)
+void MilkdropPreset::InitializePreset(PresetFileParser& parsedFile)
{
// Create the offscreen rendering surfaces.
m_motionVectorUVMap = std::make_shared(GL_RG16F, GL_RG, GL_FLOAT, 0, 0);
diff --git a/src/libprojectM/MilkdropPreset/MilkdropPreset.hpp b/src/libprojectM/MilkdropPreset/MilkdropPreset.hpp
index 06fa470bb7..db8eb43ba4 100644
--- a/src/libprojectM/MilkdropPreset/MilkdropPreset.hpp
+++ b/src/libprojectM/MilkdropPreset/MilkdropPreset.hpp
@@ -27,7 +27,6 @@
#include "CustomShape.hpp"
#include "CustomWaveform.hpp"
#include "DarkenCenter.hpp"
-#include "Filters.hpp"
#include "FinalComposite.hpp"
#include "MotionVectors.hpp"
#include "PerFrameContext.hpp"
@@ -39,8 +38,6 @@
#include
#include
-#include
-#include