Commit Graph

73 Commits

Author SHA1 Message Date
e73b0f3092 Working on getting stuff being rendered again, focus on default waveform.
Fixed many typos, errors and crashes on the way.
2023-09-11 10:19:47 +02:00
e7094aa190 Remove "Pipeline" classes and temp fix all compilation issues. 2023-09-11 10:19:46 +02:00
882321000b More rendering refactoring.
Continued refactoring work to make Milkdrop preset rendering more self-contained.
2023-09-11 10:19:45 +02:00
3a0dcffcee Shader refactoring.
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.
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
8e594bc8e9 Fix index-out-of-bounds crash when getting shader param substring. 2023-01-25 15:42:46 +01:00
28340ce32f Revert reordering of shader preprocessing statements.
Position of "shader_body" is reused in the next find call, which was broken because of the changed order.
2022-12-07 23:06:02 +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
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
3dab0dafc8 Quick fix: Cut off any text after end of shader's main() function
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".
2022-07-25 12:05:46 +02:00
e1832f20f5 Update identifier namings 2022-05-29 15:49:14 +02:00
d272d4a354 Fix default wrap modes for built-in textures.
Should use REPEAT instead of CLAMP_TO_EDGE, as Milkdrop has the same defaults.
2022-03-29 12:11:21 +02:00
76a83db1a8 Split Renderable.hpp/.cpp into separate files.
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.
2022-03-29 12:11:21 +02:00
7bd188246f Added four missing built-in equation parameters.
Also use smoothing parameter in spectrum waveforms and the same aspect ratio values in both equation and shader code.
2021-11-25 21:43:46 +01:00
e5dcd8d372 Merge pull request #399 from fughilli/master
Backport GLSL shaders to version 1.2 to support older hardware.
2020-09-01 21:23:36 -07:00
1dd41ee97a Add mitigation for shader compilation failure 2020-08-31 23:57:22 -07:00
4dc22c58f3 Moved ShaderEngine static shaders to separate manager 2020-08-09 04:30:49 -07:00
093164d583 Backport GLSL shaders to version 1.2 to support older hardware. 2020-08-05 01:12:19 -07:00
c5533e3efe Little things (#368)
* 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
2020-07-28 22:05:35 +03:00
0ccb8bde65 typo fix 2019-10-05 21:23:42 +03:00
d9fb429abd GLSL and emscripten - JavaScript and WebGL support (#92)
* 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
2019-05-11 19:07:49 +03:00
33cb7026bd modify for WINRT support 2019-04-26 14:57:58 -04:00
ce60556dae Windows build with MSVC (#181)
credit: @mancoast 

* msvc

* include glew for windows

* fix usage of std namespace with win32

* Update pmSDL.hpp

fix warning with win32

* update dirent for win32

* libs required for win32 linkage

* Update pmSDL.hpp

SDL_MAIN_HANDLED

* Update ShaderEngine.cpp

init glew to create shaders

* fake SDL audio with win32

* Update Renderer.vcxproj

use wildcards for source filenames

* Create config.h

* Update Expr.cpp

fix win32 breaks

* cleanup broken max function

* Update Makefile.am

remove ref to win32-dirent
2019-03-22 08:55:35 +01:00
7d279db9bb Merge pull request #123 from projectM-visualizer/gles_fixes
DX to openGL/openGLES transpilation fixes
2018-11-23 12:27:57 +01:00
271f1f2f68 - Matrix assignment: DX to GL adaptation
- GLES fix
2018-11-20 20:34:36 +01:00
10ee34683e DX to openGL/openGLES transpilation fixes 2018-11-17 13:13:25 +01:00
d4d74f6d05 Build warnings cleanup 2018-11-17 11:42:28 +01:00
01ea43f5dc Fix unlock FPS flag
Add comments for test flags
2018-08-25 20:19:10 +02:00
bfa33f0bee Fix native presets 2018-08-22 21:20:13 +02:00
f7b971359c Fix texture management 2018-08-22 20:07:11 +02:00
d4ccf8909f Add a fast preset switching test flag to check for shader compilation issues 2018-08-21 19:27:40 +02:00
9f524298af Downgrade glsl required version to 3.3 supported by OGL 3.3.
It's for old hardware compatiblity since OGL 4.x features are not used.
2018-07-28 19:56:46 +02:00
7628fd018c - Fix for travis
- Convert glProgramUniform* for OGL 3.x compatibility
2018-07-25 19:38:17 +02:00
3142b36e79 Blur shaders ported to GLSL
All presets unifoms corrected
Shader rendering fixed
2018-07-23 08:07:14 +02:00
ddcd9fb735 Texture manager rewrite to add sampler support (used by shaders)
Renderer target rewrite to remove FBO support (better fps)
Render to texture support restored
2018-07-22 09:16:06 +02:00
28f34f53d3 WIP: now some presets shaders are compiled
- HLSL: Lots of HLSLparser fixes
- HLSL: Add Preprocessor macro support
- HLSL: Add functions: modf, tan
- HLSL: Add while loops support
- Shader static code fixes
- Add define DUMP_SHADERS_ON_ERROR
- ShaderEngine.hpp cleanup
- Restore current preset message
- Remove useless messages
2018-06-22 19:38:54 +02:00
a56010bf81 merge master 2018-06-17 14:00:27 +02:00
7516a705c4 WIP: shader code update (extract from milkdrop sources) 2018-06-12 22:12:06 +02:00
26da73984f WIP: several fixes 2018-06-12 21:45:32 +02:00
1593d10656 sort of progress w/ comp/warp shader programs 2018-06-12 09:35:08 +03:00
233e9e289b load warp and comp shaders from preset into programs 2018-06-11 22:30:11 +03:00
0522afe064 WIP: making preset shader program 2018-06-10 20:25:52 +03:00
794363f87d switching glsl version depends of --enable-gles configure flag
fix vao memleak
2018-06-10 19:23:41 +02:00
f7b8425963 WIP 2018-06-10 20:00:05 +03:00
048498c816 WIP preset shader loading 2018-06-10 18:00:54 +03:00
d5f81cd9bb checkpoint 2018-06-10 17:27:02 +03:00
c2c00a1e1a Merging GLES3 changes in 2018-06-10 16:59:12 +03:00
ec7d5188a8 Merge branch 'gles3' of https://github.com/projectM-visualizer/projectm into gles3 2018-06-09 22:52:49 +02:00
b650e2323d Restore vertex layout location 2018-06-09 22:50:29 +02:00
47084821da fix undefined VAO error 2018-06-09 23:28:16 +03:00