Move Milkdrop-specific shader code into MilkdropPreset, only keep generic and potentially reusable stuff in Renderer.
Also adding some abstraction to reduce the number of direct OpenGL calls to make it easier to add other rendering APIs in the future.
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.
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.
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.
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".
Moved all declarations and implementations into class-specific files. Makes it easier to find them and creates smaller compilation units.
Added Doxygen comments to all moved classes and reformatted their code.
Fixed a few typos and type/function declarations.
Added default initializers in the headers where needed.
* Noise not needed - F4 shows if shaders are compiled.
* Don't compile native presets by default in Visual Studio
* Debug / duplicate info
* Missed a debug native preset.
* Make texture errors more clear - we failed looking for multiple extensions.
* Move images from presets folder to textures folder
* Documented missing textures.
* Undo Visual Studio version bump.
* Renable NativePresetFactory (but the example native presets remain disabled)
* Comment
* Fixes / updates to audio device toggling.
* Stop crashing if there is no input microphone. Make fake audio dynamic so it can be enabled if there is no mic.
* Remove debug output.
* Document VC++ redist requirement.
* F4 missing from SDL help menu.
* Windows app instead of Console (no more cmd.exe pop-up when launching).
* Fullscreen for built-in settings.
* New icon (based on github and idle preset and consistent with Steam)
* Change language for loopback / audio changing.
* default fullscreen for built-in settings.
* Revert "Fullscreen for built-in settings."
This reverts commit b1936e76ab.
* Revert "default fullscreen for built-in settings."
This reverts commit ea89584174.
* Revert "9a9151b9"
* 9a9151b9
* fake_audio to fakeAudio
* add glm lib in vendor folder
* fix makefile
* add more help and context to emscripten readme
* add correct output parameter to emcc
* add how to restart the process to the readme
* simplify emscripten compilation
* apply patch
* fix blur shaders to work with WebGL