- 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.
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.
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.
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.
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.
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).
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.
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.
* 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 fixesprojectM-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
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.
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.