Commit Graph

2308 Commits

Author SHA1 Message Date
014fb59dd5 Fix missing include in API CMake file 2025-12-18 11:17:57 +01:00
f06cbf95a1 Add default values of all parameters to Doxygen comments.
Also added a note that projectm_set_window_size() needs to be called once with non-zero size arguments to initiate any rendering.
2025-12-12 19:04:32 +01:00
cd8b804046 Fix upper limit of per-pixel mesh dimensions from 400 to 300 2025-12-12 19:04:27 +01:00
49410adca7 Move projectM-opengl.h into Renderer lib 2025-12-10 21:55:36 +01:00
4f3d062053 Move PresetFileParser into MilkdropPreset subdir
Makes more sense contextually.
2025-12-10 21:55:36 +01:00
0483e0334d Fix includes and some comments 2025-12-10 21:55:34 +01:00
0a4a2b543f Add CMake argument ENABLE_VERBOSE_LOGGING, disable trace/debug logging in Release builds 2025-12-07 17:24:48 +01:00
4a0fa11f0f Move GLSL version check to ProjectM class constructor
Log a fatal error if it fails.
2025-12-07 17:24:48 +01:00
3c80d89337 Use new Logging class for all output 2025-12-07 17:24:48 +01:00
c6e02c9e1a Add logging API functions and callbacks 2025-12-07 17:24:48 +01:00
c23f1b9613 Add a new logging class 2025-12-07 17:24:48 +01:00
8e228952ac Use PUBLIC_HEADER CMake target property to install API headers 2025-12-07 17:24:48 +01:00
ccd606df60 Update copyright in API headers 2025-12-07 17:24:48 +01:00
fa532eddc6 Add API function for texture burn-in 2025-12-07 17:23:03 +01:00
e66b110665 Add texture burn-in support
Also use shader cache in texture copier and a transformation matrix for flipping instead of flags.
2025-12-07 17:23:00 +01:00
af479c01d6 Fix installed pkgconfig files using wrong linker argument
for some unknown reason I used "-l:<lib>" in the .pc files while it should just be "-l<lib>". This would prevent libprojectM (and the playlist lib) from being linked in projects using pkgconfig.
2025-12-02 18:04:26 +01:00
834acc376c fixed an issue with sep attribute mngt / per pixel
Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
2025-12-02 08:50:47 +01:00
b7a88d59dd Keep references to textures and samplers in descriptors
Previously, if the TextureManager was recreated, e.g. when changing the texture paths, all loaded textures were deleted, even if currently in use by a preset. Storing textures and samplers as shared pointers instead of weak pointers will make sure the objects are kept alive until the preset is unloaded.

Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
2025-12-02 08:50:47 +01:00
249305f683 Fix wrong type used in PCM smoothing in custom waves.
Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
2025-12-02 08:50:47 +01:00
7ea533a96d Place shader "PS" function into its own line and wrap arguments for readability.
Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
2025-12-02 08:50:47 +01:00
15a083751d Set warp texel offset to 0 by default, as 0.5 introduces a drift.
Since this might be vendor-specific behavior, a new API function to configure the X/Y texel offsets has been added.

Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
2025-12-02 08:50:46 +01:00
d3734dc4c3 Fix some default waveform rendering bugs
All waves were rendered upside-down, breaking presets requiring the wave to be at the top or bottom due to warp movement. Using the flipped transformation matrix for drawing will take care of this globally.

Also fixed two small mistakes regarding operators.

Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
2025-12-01 15:39:25 +01:00
614ad90f19 Set vertex_point_size uniform for all uses of the untextured vertex shader
Only custom waves set the point size to 2, default waveforms still render the 2x2 pattern when using dots. Other draw calls aren't affected as they only draw lines/triangles, but it's good practice to not leave the uniform in an undefined state.

Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
2025-12-01 15:39:25 +01:00
744b7cabca Force use of Boost's config package in projectM's installed CMake config 2025-12-01 15:39:25 +01:00
ddf607a3d3 Fix version in config header when used as subproject 2025-12-01 10:46:53 +01:00
5158ecbf7a Load image file and create texture separately with SOIL2
The new combined function no longer returns the image size, so we need to load the image ourselves, store the size and then pass the buffer to SOIL_create_OGL_texture().
2025-11-12 09:17:50 +01:00
413c6d7d06 Set correct primitive type (triangle strip) for user sprites 2025-11-11 15:18:42 +01:00
681ea1749d Remove decay value fix for 16-bit GPUs, as it capped decay to 0.9375. 2025-11-11 10:19:30 +01:00
db1b7bde31 Use previous frame's image (plus motion vectors) in blur textures
Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
2025-11-11 09:41:10 +01:00
37a92f6ae1 Add missing <chrono> include in Playlist.cpp 2025-11-04 12:40:43 +01:00
51142f07fe Add missing includes required for some compilers
Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
2025-11-03 18:32:15 +01:00
6a36b3f5c2 API docs: Clarify usage of projectm_set_window_size()
Calling the function with the same size again and again does not do anything at all - especially not "reset the renderer" as it was previously stated.

Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
2025-11-03 16:22:04 +01:00
48ad45851e Fix values for bass/middle/treble/volume params for shaders
Since earlier projectM versions had values in these args which were way higher than they should've been, they were divided by 100. Since the audio processing refactor, this is no longer required, but these divisions were overlooked and thus shaders got only 1% of the actual magnitude expected.

Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
2025-11-02 15:06:18 +01:00
eccdd26804 Fix playlist shuffle, index upper bound off-by-one
This caused projectM to sometimes stop switching presets if the index chosen was the end of the given interval. Since the preset switch fails in this case, no additional switches will happen unless the user manually switches to a new preset.

Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
2025-10-28 17:37:44 +01:00
890b78a985 Resolves #903: Flip V texture coordinates in sprite rendering to match MilkDrop orientation 2025-10-27 19:29:00 +01:00
765382738b Add Doxygen documentation, plus a few small fixes. 2025-10-27 19:29:00 +01:00
f8b5573d79 Wrap setting of blend mode/functions in a class. 2025-10-27 19:29:00 +01:00
076f5d9aa0 Remove RenderItem class 2025-10-27 19:29:00 +01:00
ec00a950b7 Use Mesh class in User Sprites 2025-10-27 19:29:00 +01:00
d4404b1c58 Use Mesh class in PresetTransition class 2025-10-27 19:29:00 +01:00
04e1f2ccfa Use Mesh class in CopyTexture class 2025-10-27 19:29:00 +01:00
11d93e1633 Use Mesh class in classic post-processing effects 2025-10-27 19:28:59 +01:00
bfd11fa3bf Use Mesh class in Waveform effect 2025-10-27 19:28:59 +01:00
ea5dffa275 Use Mesh class in Video Echo effect 2025-10-27 19:28:59 +01:00
d8ba9a31cb Use Mesh class in Warp effect
Now using the generated grid vertices and indices directly, drawing the warp mesh in a single draw call. This will increase the number of drawn vertices, but all GPUs made in the past decade can easily deal with 100K triangles or more.
2025-10-27 19:28:59 +01:00
95001a7e77 Use Mesh class in Motion Vector effect
Also get rid of the additional index attribute array, as gl_VertexID contains the same information and is free.
2025-10-27 19:28:59 +01:00
a20fba8d98 Use Mesh class in Final Composite effect 2025-10-27 19:28:59 +01:00
f9a1d97f0e Use Mesh class in Darken Center effect 2025-10-27 19:28:59 +01:00
a7df3680d9 Use Mesh class in Border effect
Reduced draw calls from 4/8 to 1/2 by specifying 8 vertices accessed via indices to draw each border in a single call.
2025-10-27 19:28:59 +01:00
f5d9546e83 Use Mesh class in Blur effect 2025-10-27 19:28:59 +01:00