Commit Graph

2431 Commits

Author SHA1 Message Date
a099d1bdb3 Change uses of fmax to std::max 2022-03-19 21:26:48 +01:00
c5b136c7f9 Move some includes from header to implementation 2022-03-19 21:26:48 +01:00
872cb90962 Use std::array::fill for array initialization 2022-03-19 21:26:48 +01:00
720fbccf0c Move member initializations from constructor body 2022-03-19 21:26:48 +01:00
d3aee70916 Remove empty non-virtual destructor 2022-03-19 21:26:48 +01:00
7c13766dc6 Apply formatting 2022-03-19 21:26:48 +01:00
3dc41df328 Change C style arrays to std::array 2022-03-19 21:26:48 +01:00
83182a70ea Add .clang-tidy 2022-03-19 21:12:03 +01:00
31864c0c73 Update gitHub Actions workflow on Windows to use VS 2022 2022-03-08 00:18:47 +01:00
2f8b188195 Some CMake build fixes, mostly affecting Windows builds.
- Got rid of the WORD_BITS usage in omptl_tools.h, which is a macro that is only defined on UNIX platforms, but not MSVC.
- Removed export(PACKAGE) call, as it's been disabled/deprecated since CMake 3.15 and puts a half-baked config into the registry. Better install and use CMAKE_PREFIX_PATH.
- Removed set_and_check commands in the package config file, added missing include for the target definition file.
- Added "lib" prefix to the static library file on Windows as it will otherwise have the exact same name (projectM.lib) as the shared library exports file.
- Enable shared library building on Windows by default as on all other platforms.
- On Windows, search for package GLEW as it's required.
2022-02-28 18:04:25 +01:00
9e9f4ca1b2 Removed all outsourced code/files from the repo and updated README.md with new links.
New subproject/data locations:
- presets/presets-cream_of_the_crop: https://github.com/projectM-visualizer/presets-cream-of-the-crop
- presets/presets-En_D: https://github.com/projectM-visualizer/presets-en-d
- presets/textures: https://github.com/projectM-visualizer/presets-milkdrop-texture-pack
- src/EyeTune: https://github.com/projectM-visualizer/frontend-uwp
- src/museum: https://github.com/projectM-visualizer/museum
- src/projectm-android: https://github.com/projectM-visualizer/examples-android
- src/projectM-emscripten: https://github.com/projectM-visualizer/examples-emscripten
- src/projectM-jack: https://github.com/projectM-visualizer/frontend-qt
- src/projectM-libvisual: https://github.com/projectM-visualizer/frontend-libvisual-plug-in
- src/projectM-libvisual-alsa: Deleted.
- src/projectM-moviegen: https://github.com/projectM-visualizer/tools-moviegen
- src/projectM-MusicPlugin: https://github.com/projectM-visualizer/frontend-music-plug-in
- src/projectM-pulseaudio: https://github.com/projectM-visualizer/frontend-qt
- src/projectM-qt: https://github.com/projectM-visualizer/frontend-qt
- src/projectM-sdl: src/sdl-test-ui
- src/projectM-test: tests
2022-02-18 18:01:03 +01:00
fdf70b47a6 Replace current default preset collection with the 'cream of the crop' and 'En D' 2022-01-19 12:15:26 +02:00
bb1f06d657 SDL: Allow using the system default capture device
By default use the "system default" capture device, by passing name == NULL
to SDL_OpenAudioDevice. Ctrl-I still iterates through all capture devices
as usual.
2021-12-17 10:07:11 +02:00
49d513f719 Updating a broken link in README.md
There was a link to the website for the "helix" game made by ghostfire games. The link was broken.

I replaced the broken link with an archived link.
https://web.archive.org/web/20180628174410/http://ghostfiregames.com/helixhome.html
2021-12-16 20:42:06 +02:00
024ab5aa04 Add definition for WORD_BIT on Windows.
The WORD_BIT macro is defined in xopen_lim.h, but missing on Windows. Just setting it to the appropriate value in CMake helps.
2021-12-10 18:28:39 +01:00
dc4ed71673 Add DPI awareness flag to the SDL app on Windows.
This was fixed for the manually created VS solution in commit 3171507, but not yet ported to CMake.
2021-12-05 23:37:15 +01:00
67f26977a5 Replaced Perlin noise textures with the original Milkdrop noise textures. 2021-12-05 23:02:01 +01:00
f06662bc8a Removed the original Milkdrop 2 sources to decrease checkout size.
In addition the original repo, projectM keeps a mirror for reference at https://github.com/projectM-visualizer/milkdrop2/
2021-12-05 22:26:20 +01:00
d58e3bc5e6 Removed Xcode project files. Please use CMake instead.
One exception: The Music.app plug-in still has its own project, as it's not yet ported to CMake.
2021-12-05 22:26:02 +01:00
365d676c88 Wrap floating point numbers with float() in HLSLParser output.
Integer floats (e.g. 2.0) will lose their decimals in the conversion (2.0 -> 2), causing issues with GLES shader compilation as it doesn't allow implicit conversion. Writing it as "float(2)" will tell the compiler to interpret this correctly. The same is already done for function parameters, but was not done here for some reason.
2021-12-05 22:25:48 +01: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
3dd19d6c63 Removed Visual Studio project files. Please use CMake instead.
One exception: EyeTune still has its own solution, as it's a UWP app and not yet ported to CMake.

Also removed the AppVeyor build config as it was broken for a long time. Updated documentation so it no longer states devs can use the pre-made solution files.
2021-11-25 21:43:28 +01:00
8aaf51c04d Updated build documentation, removing all references to autotools. 2021-11-25 21:42:23 +01:00
c1ce0a1b51 Removed autoconf/automake build system files. Please use CMake instead. 2021-11-25 21:42:23 +01:00
5cf41fff63 Improve overlay text rendering performance and a few Renderer cleanups.
For each line of text, glText was fully reinitialized, which meant that the font texture, vertex and fragment shaders were recompiled and uploaded to the GPU, then destroyed again. This created a huge FPS drop, especially in GLES environments.

Also moved the text rendering into a separate class and cleaned up the initialization of the Renderer class, moving all default values to the header and deleting the default constructor to avoid unwanted effects.
2021-11-25 21:41:43 +01:00
4a77542a5b Update README.md 2021-11-19 14:55:12 +01:00
d2b862d129 Add most Milkdrop built-in textures used by many presets. 2021-11-16 09:39:21 +01:00
5339b85972 Add missing "round" intrinsic in HLSLParser 2021-11-15 23:00:42 +01:00
02771482e6 Cleaned up some audio-related code and fixed a few types.
Allow switching audio devices, even if emscripten will probably only ever provide a single device. This would at least fix audio input not working until any user interaction with the application as happened (autoplay protection in Chrome for example).
2021-11-15 21:13:19 +01:00
ea92b3105d Emscripten: Package presets, display preset name in window title, increase preset duration.
Also removed some debug preset name output that increased startup time drastically.
2021-11-15 21:13:19 +01:00
e92dcd13a0 Add keyboard input and audio recording support to emscripten sample app. 2021-11-15 21:13:19 +01:00
a7035d6e74 Implement proper emscripten support in the new CMake build system.
Changes:
- Removed the unneeded and non-standard gl3ext.h include in SOIL2 that's not present in the official GLES3 specs.
- Auto-detect emscripten via CMAKE_SYSTEM_NAME instead of using an option.
- Disable all other feature detection code if emscripten is used.
- Remove old project files and convert the sample entry point app to use the new C-based API and SDL2 only.
- Updated emscripten build instructions in the README.md.
2021-11-15 21:13:19 +01:00
8c30f62bf0 Add GLES3 find script to CMake and enable GLES3 support.
The find script changes will be proposed upstream for patching the built-in CMake module. Until that's merged, we use the local copy if GLES3 is requested.

Enabling GLES3 on desktop Linux should work out-of-the box now provided the required libs and headers are there. For example, Mesa's GLES implementation will work.
2021-11-15 21:11:03 +01:00
afc2dd50f3 Add GLES3 "support" to SOIL2, using the proper includes. 2021-11-15 21:11:03 +01:00
1f2d081f99 Completely skip compiling native preset loading code if disabled. v3.1.13-9e8ab88-win64 2021-11-05 23:41:12 +01:00
3142a41d5e Fix libdl.so-related linker error on some Linux systems/toolchains. 2021-11-05 23:41:12 +01:00
875e3a0674 Removed unused includes.
sys/select.h introduced in a recent PR isn't available on Windows, failing the build while not being used at all.
2021-11-05 23:37:23 +01:00
e2d265f038 Issue#130 (#546)
* Fixes issue projectM-visualizer/projectm#130

Adds functionality of writing a rendered frame to file
as requested by the issue https://github.com/projectM-visualizer/projectm/issues/130.

Keyhandler.cpp has been updated to handle the keydown of 'd',
which triggers writeNextFrameToFile to be set to true, which means
at the end of Renderer::FinishPass1 we write the texture contents to file.

Renderer::debugWriteMainTextureToFile() const contains the functionality
of writing the contents of the main texture.

* Addition to commit that fixes projectM-visualizer/projectm#130

Safe file write, making sure we don't overflow while creating
the filename. If c++20 features was enabled, this could
look so, so much better.

* Added keybinding to README doc

* Formatting
Fixed snake_case to camelCase
Changed delete to delete[]
Turned magic constant to a named variable
2021-10-23 22:22:49 +03:00
844678472e Fix out-of-bounds error in preset search menu if list is short. 2021-08-24 10:24:56 +02:00
d402c1e3ec Use SDL2's fake fullscreen mode instead of the exclusive one.
Also don't maximize the window before toggling fullscreen and hide the mouse pointer if the window size equals the desktop size to also account for the macOS native fullscreen toggle.
2021-08-23 21:35:10 +02:00
afae7c5e46 readme 2021-08-23 21:47:58 +03:00
0a4cf9fa49 Added getters and setters for all settings values and renamed some members.
Some members and functions were named in different ways, now the naming scheme is a bit more unified. Also changed some types to size_t where negative values don't make sense.
2021-08-23 18:37:57 +02:00
ad313ad5c5 Update CMakeLists.txt 2021-08-23 18:37:57 +02:00
7c8d1583ce Removed old dlldefs.h and reoganized/fixed CMake-related code.
CMake changes are related to shared and static inking, adding the proper public "-DPROJECTM_STATIC_DEFINE" for the static library.
2021-08-23 18:37:57 +02:00
825adb313f Fixed some Windows-specific code in the SDL frontend. 2021-08-23 18:37:57 +02:00
d8f9f6ebe1 Removed an export macro that slipped into the implementation. 2021-08-23 18:37:57 +02:00
c772f5ae18 Missed a file. 2021-08-23 18:37:57 +02:00
58b2ab7a1f Don't prefix includes with "libprojectM/" for now, change it later. 2021-08-23 18:37:57 +02:00
684155d383 Switched to the C-style API in both Qt-based UIs. 2021-08-23 18:37:57 +02:00
6bef260268 Added C++-dependent extern "C" in projectM.h for more convenient including. 2021-08-23 18:37:57 +02:00