Skip to content

Update add-on to use libprojectM 4.x#130

Draft
kblaschke wants to merge 2 commits intoxbmc:Piersfrom
kblaschke:update-to-projectm-4
Draft

Update add-on to use libprojectM 4.x#130
kblaschke wants to merge 2 commits intoxbmc:Piersfrom
kblaschke:update-to-projectm-4

Conversation

@kblaschke
Copy link
Copy Markdown

This is a first, rough update to the add-on to make it work with the latest libprojectM 4.1 release. It runs fine on my Kodi on Linux. The build might need a few additional tweaks, as well as the settings dialog (e.g. adding more options supported by projectM), thus I'm initially creating it as a draft PR.

Note that libprojectM was almost completely rewritten between 4.0 and 4.1, with a new rendering process and expression parser. Due to the internal renderer updates, projectM now requires OpenGL ES 3.2 with the OES_texture_float extension being available. For OpenGL Core, at least GL version 3.3 is required (which is the same as before).

I don't think the depends dir is needed anymore, as libprojectM is now also built with CMake and thus can be found via CMAKE_PREFIX_PATH. This makes it more flexible, as (on Linux) maintainers can choose to use the distro package or compile libprojectM as static libs and directly embed it into the add-on shared library.

Also see my comment in the related issue #59 about Windows and Angle.

@kblaschke
Copy link
Copy Markdown
Author

kblaschke commented Nov 10, 2025

Oh, the build pipelines definitely also require some adjustments, e.g. build libprojectM beforehand.

On Windows/UWP, the add-on could in theory use vcpkg for that, as projectM has a port there. Not sure about how popular vcpkg is with Kodi development though.

@garbear
Copy link
Copy Markdown
Member

garbear commented Feb 28, 2026

Sorry this didn't get any attention, add-ons are kinda on our periphery. I'm looking to get projectM shipping with Kodi again, so if you're still interested in this effort, I can help get it in.

@garbear
Copy link
Copy Markdown
Member

garbear commented Feb 28, 2026

@kodiai please review

@kblaschke I updated all the add-ons dependencies and applied your update into a single PR for testing: #133

So far the only working platform is macOS ARM.

We're hoping to ship projectM v4 with Kodi v22, so let me know if you're interested on getting this update over the finish line.

@kodiai
Copy link
Copy Markdown

kodiai bot commented Feb 28, 2026

kodiai response

Decision: NOT APPROVED

Issues:

  • (1) [critical] src/Main.cpp (456): Missing break statement after case 5 causes fall-through to case 6, making preset pack 5 load incorrect files.
  • (2) [critical] CMakeLists.txt (16): Undefined variable ${PROJECTM_PKGDATADIR} - was provided by deleted FindProjectM.cmake, not set by new projectM4 config.
  • (3) [critical] CMakeLists.txt (10, 11): Stale references to ${PROJECTM_INCLUDE_DIRS} from old FindProjectM - should use imported target properties instead.
  • (4) [major] depends/common/projectm/projectm.txt (1): Still references projectM 3.1.12 instead of v4.x for dependency builds.
  • (5) [major] depends/windows/projectm/CMakeLists.txt (1): Full static build of projectM 3.x sources incompatible with v4 architecture - needs rewrite or vcpkg approach.
  • (6) [minor] src/Main.cpp (355): Full re-initialization on beat_sens change appears unnecessary given projectM 4's runtime setting support.

@kblaschke
Copy link
Copy Markdown
Author

I can certainly test it and give additional input as needed, but I'm abroad until March 23rd, so this would have to wait a little bit. If there are specific issues/questions regarding projectM integration, I'll be happy to answer them though!

@garbear
Copy link
Copy Markdown
Member

garbear commented Mar 10, 2026

I've tested on GL and GLES (macOS, linux, Android) and 4.x is working great. Windows, on the other hand, is just a black screen. That's the only issue we'd need to resolve to merge this.

@kblaschke
Copy link
Copy Markdown
Author

I've tested on GL and GLES (macOS, linux, Android) and 4.x is working great. Windows, on the other hand, is just a black screen. That's the only issue we'd need to resolve to merge this.

As stated in the other PR, we've removed SOIL2 and fully migrated GL bindings to an internal glad loader, which is also able to use externally-provided function pointers. Angle was the main reason for this move, so with v4.2, the Windows build should be working just fine, no GLEW required anymore.

@kblaschke
Copy link
Copy Markdown
Author

Oh, with v4.2, the addon could also use the new user sprite feature and custom texture loading to possibly display album art as animated sprites within projectM.

@garbear
Copy link
Copy Markdown
Member

garbear commented Mar 12, 2026

@kblaschke I haven't actually contributed any code, just dependency work. Do you want to take over back in this PR, rebased on Piers and with my dependency work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants