In file included from /projectm/src/libprojectM/Renderer/Renderer.cpp:1:
/projectm/src/libprojectM/Renderer/Renderer.hpp:191:10: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
191 | std::unique_ptr<TextureManager> m_textureManager;
| ^~~~~~~~~~
Amends the previous commit.
In order to avoid unused parameter warnings when building the library
itself, also unname these parameters here.
The names of these parameters are still named in ProjectM.hpp, so they
serve as documentation. In ProjectM.cpp, they are mere stubs.
As a drive-by, removed some unneeded newlines.
Fixes multiple "warning: unknown pragma ignored [-Wunknown-pragmas]"
diagnostics on GCC/Clang when used with MinGW, both when building the
library aswell as in client applications.
Instead, store a reference to the original vector which is managed by the ProjectM class. This will allow manipulation of the paths after library init.
In a shader, the main function must be the last one declared. Everything following it isn't used and the HLSL compiler seems to simply ignore it. Some preset authors put credits after the closing bracket without //, which fails shader compilation in projectM. We'll now just cut off any text following the last closing bracket. One example preset is "martin - city lights.milk".
Using "GL_CLAMP_TO_EDGE" could in theory make textured shaped look weird, but the image should ideally be filling the shape completely, so users will in practice never see the actual texture border.
Function is only called from constructors, so failing to initialize important subsystems would leave projectM unusable, and we can simply let the exception bubble up to the caller. Such exceptions are already being caught in the C wrapper.
Mostly replaced raw pointers with std::unique_ptr for easier memory management. Probably not needed for many of those classes, but was the least intrusive change for now.
The library should not hold up any external render loop. Waiting for vsync or achieving a target FPS value should be done by the outside application after presenting the render result.