Commit Graph

57 Commits

Author SHA1 Message Date
882321000b More rendering refactoring.
Continued refactoring work to make Milkdrop preset rendering more self-contained.
2023-09-11 10:19:45 +02:00
b9ef6a3974 Remove old expression parser and add the new projectm-eval lib.
Requires a general rewrite of the Milkdrop preset code. Previous implementation was tightly integrated into the code parser, so reusing this code wasn't possible. Additional refactoring was done, finished converting custom wave/shape implementations to use the new expression parser code.
2023-09-11 10:19:45 +02:00
46e720a7a7 Removed unused projectm_opengl_init_render_to_texture() API function. 2023-01-25 18:10:26 +01:00
e6b493a270 Removed unused projectm_set_texture_size() API function. 2023-01-25 18:09:02 +01:00
2b41fa256a Let developers provide an optional filename for dumping main texture contents. 2023-01-25 14:22:19 +01:00
bcaf98f2f1 Rename USE_THREADS to PROJECTM_USE_THREADS and export it in the package config file.
PROJECTM_USE_THREADS is only exported if ENABLE_CXX_INTERFACE is ON.
2023-01-24 17:56:12 +01:00
bff9e52c69 Reduce header footprint of optional C++ API files and export C++ symbols properly. 2023-01-24 17:47:39 +01:00
c8077a2145 Partially fix smooth blending.
There's still a sudden change between presets halfway through the transitions as the shaders are swapped, but fixing this would require a larger rewrite of how presets are rendered in the pipeline. Will do this later.
2023-01-07 15:52:51 +01:00
3dcb1f7a56 Fix preset change notification. 2023-01-07 15:52:51 +01:00
48f291b51c Removed config file support and added temp fix for mesh size change.
Mesh size is currently so deeply burrowed in the whole preset structure that changing it on the fly is basically impossible. For now, we'll reload the idle preset and reset the whole preset factory class tree to make sure all classes are properly reinitialized. If apps want to change the mesh size after startup, they need to reload the last played preset after changing the mesh size. This will be fixed in the future after the parser/equation compiler rewrite.
2023-01-07 15:52:50 +01:00
bbfc4f7170 Added API method for (re)setting texture search paths.
Was only possible on startup before, changing the paths required recreating the whole projectM instance. Now, the method will only reset the texture manager, but not the shaders and presets.
2023-01-07 15:52:50 +01:00
22b0ccc423 Removed some unused offset parameters in Renderer methods. 2023-01-07 15:52:46 +01:00
2410adc92e Fix file type string 2023-01-05 07:24:26 -06:00
e659d862b5 Remove built-in key handler and rename two API functions.
Renamed preset lock functions to be in line with all other getter/setter functions regarding their naming scheme.
2022-12-30 15:14:25 +01:00
b585017ba3 Fix a compile issue in emscripten by forward-declaring PipelineContext. 2022-12-06 15:03:10 +01:00
381fe4f51e Properly initialize idle preset and preset factory. 2022-12-04 21:51:36 +01:00
94ee2a360b Added remaining API functions and preset change callback. 2022-11-21 19:56:30 +01:00
2b1099a653 Implement external preset switching control and add stream loading support.
Lots of interconnected changes in this commit:
- Removed unnecessary name/author/filename members all over the place.
- Started using exceptions to deliver preset loading and rendering errors to the topmost ProjectM class.
- Added stream loading methods to factories and the base Preset class.
- Added new events for requesting preset switch and telling the user about loading errors.
- Consolidated preset switching logic in ProjectM class a bit.
2022-11-21 19:56:30 +01:00
b23b5ce25c Deleted all playlist-related code from libprojectM.
Note: SDL test UI won't compile after this commit. Will be fixed in a later commit, when the playlist library is done.
2022-11-21 19:56:28 +01:00
18b032a8ef API: Add missing setter for FPS value.
Also make sure to propagate the changed value to the preset code via the PipelineContext class. Keeping it in the settings struct for now. Storing a dynamic value in settings makes no sense, so it will be removed later.
2022-11-20 16:53:25 +01:00
003e45e9d9 API: Add missing getter for preset duration value. 2022-11-20 16:53:25 +01:00
6991953a4e Add get and set for beat sensitivy value to API 2022-10-29 23:00:45 +02:00
dbbbc3e591 Added API function for dumping the next frame. 2022-10-23 18:08:53 +02:00
cb0bbfa860 Removed all text-related code from the core lib.
This removes:
- "Toast" messages
- The help text
- Statistics
- Preset name and (unimplemented) song title display
- Preset selection list and search menu

Some of the above functionality might later be added as an optional library, in a separate repository and with proper UTF-8 support.
2022-09-20 22:46:03 +02:00
d97feb22f6 Entirely removed native presets.
The native presets did not build anymore due to refactorings, cause other build issues on Windows (e.g. require linking to psapi.lib) and would need a complete makeover anyway.
2022-09-18 13:32:58 +02:00
9c8e412cdb Replace broken WIN32 checks with _WIN32
CMake defines WIN32 by default on Windows, but we shouldn't rely on it.
_WIN32 is defined by all compilers targeting Windows.

Also cleaned up some header includes.
2022-09-16 10:47:56 +02:00
371365a03f ProjectM.cpp: Unname unused parameters
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.
2022-09-15 16:57:40 +02:00
c547489feb ProjectM.{hpp,cpp}: Move event function stubs
This will avoid -Wunused-parameter warnings in client applications.
2022-09-15 16:57:40 +02:00
c1a0317367 Fixed a crash when calling ReadConfig() early. 2022-09-09 00:59:25 +02:00
4edfd687f5 Copy texturePath to settings member in ReadSettings()
Why isn't this done via a simple assignment?
2022-09-09 00:45:59 +02:00
60dd295ee6 Expose texture path in the public API, removed unused font settings. 2022-09-09 00:45:58 +02:00
66380727b2 Create texture search path list in ProjectM class, pass it to TextureManager. 2022-09-09 00:45:58 +02:00
6906d4ed60 Class Renderer: Renamed members, removed more unused ones. 2022-09-09 00:45:58 +02:00
a6293f63c8 Fix function name casing causing an error with threads disabled. 2022-07-11 14:26:57 +02:00
9298ae396c Remove unused RenderItem* files 2022-06-09 10:48:57 +02:00
39ceea422b Fix playlist loading check. 2022-06-06 18:50:50 +02:00
65a2496bfa Removed parameters from ProjectM initializer functions and set aspect correction earlier.
All parameters were just values from the internal settings struct, which is readily available - no need to pass them on the stack.
2022-06-06 18:50:50 +02:00
b28d3762ab Simplified ProjectM::RenderFrameOnlyPass2 2022-06-06 18:50:50 +02:00
828a0eb04a Moved comments for ProjectM::RenderFrameOnlyPass1 to header. 2022-06-06 18:50:50 +02:00
3dbf4ecb4b Instantiate PipelineContext directly.
The class has no real dependencies and sind we no longer need to hide internal dependencies we can just use it directly.
2022-06-06 18:50:50 +02:00
9dca6e7857 More cleanups in RenderFrame* methods. 2022-06-06 18:50:50 +02:00
f2e0b09bde Added a FIXME for later improvements of async preset loading. 2022-06-06 18:50:50 +02:00
7334c8085b A few cleanups in the RenderFrame functions. 2022-06-06 18:50:50 +02:00
03f202859b Moved inline implementations to ProjectM.cpp. 2022-06-06 18:50:50 +02:00
1af2b97e50 Remove ProjectM::DestroyPresetTools
Unique pointers are destroyed automatically during destruction of the class and the method isn't called from anywhere else.
2022-06-06 18:50:50 +02:00
0a271b8086 Remove unnecessary/dead code from ProjectM::InitializePresetTools.
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.
2022-06-06 18:50:50 +02:00
576654d676 Build fix: rename a few missed instances of _settings to m_settings 2022-06-06 18:50:50 +02:00
2c2a830843 Reformatted ProjectM class code 2022-06-06 18:50:50 +02:00
db6959c3ab Cleaned up member function parameters. 2022-06-06 18:50:50 +02:00
60f93d7de1 Use trailing return types. 2022-06-06 18:50:50 +02:00