Previously, if the TextureManager was recreated, e.g. when changing the texture paths, all loaded textures were deleted, even if currently in use by a preset. Storing textures and samplers as shared pointers instead of weak pointers will make sure the objects are kept alive until the preset is unloaded.
Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
All waves were rendered upside-down, breaking presets requiring the wave to be at the top or bottom due to warp movement. Using the flipped transformation matrix for drawing will take care of this globally.
Also fixed two small mistakes regarding operators.
Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
Only custom waves set the point size to 2, default waveforms still render the 2x2 pattern when using dots. Other draw calls aren't affected as they only draw lines/triangles, but it's good practice to not leave the uniform in an undefined state.
Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
Otherwise, breaks builds with newer Boost versions. Also set policy CMP0167 to NEW and forcing CMake to use the Config package and not the built-in module. Will now require Boost 1.70, but this should be available everywhere.
Since earlier projectM versions had values in these args which were way higher than they should've been, they were divided by 100. Since the audio processing refactor, this is no longer required, but these divisions were overlooked and thus shaders got only 1% of the actual magnitude expected.
Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
This caused projectM to sometimes stop switching presets if the index chosen was the end of the given interval. Since the preset switch fails in this case, no additional switches will happen unless the user manually switches to a new preset.
Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
If a preset uses different long-form samplers for a single random slot, this will result in a failure, e.g. using both "sampler_rand00_something" and "sampler_rand00_else". As this also isn't supported by Milkdrop and would create a conflict situation, we don't care.
Had to simulate it with the "x * exp2(exp)" expression in GLSL, as GLSL only supports integer types as exponents in its native ldexp implementation, while HLSL solely uses floats.