Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GtkGLArea for OpenGL Spectrum Analyzer plugin #1546

Open
radioactiveman opened this issue Jan 10, 2025 · 2 comments
Open

Use GtkGLArea for OpenGL Spectrum Analyzer plugin #1546

radioactiveman opened this issue Jan 10, 2025 · 2 comments
Labels
Enhancement New feature or request

Comments

@radioactiveman
Copy link
Member

radioactiveman commented Jan 10, 2025

Description

Porting the glspectrum plugin to use GtkGLArea (available since GTK 3.16) would be beneficial for two reasons:

  • No need of different code for X11 and Windows as GTK would take care of it internally
  • Wayland support, the current code for Linux requires X11/XWayland explicitly

As my OpenGL knowledge is not good enough to port this plugin myself, I file this here as enhancement. Patches are welcome. 🙂

Additional information

  1. https://docs.gtk.org/gtk3/class.GLArea.html
  2. https://www.bassi.io/articles/2015/02/17/using-opengl-with-gtk/
  3. https://github.com/ebassi/glarea-example
  4. https://stackoverflow.com/questions/69201843/how-do-you-do-3d-rendering-in-gtk-using-opengl

CC: @CBke, @carlo-bramini as you have been contributors for this plugin

@radioactiveman radioactiveman added the Enhancement New feature or request label Jan 10, 2025
@carlo-bramini
Copy link
Contributor

If I remember well, an user should be able to compile Audacious also with Gtk+2. Is it correct?

@radioactiveman
Copy link
Member Author

Yes, for GTK 2 the code has to stay as it is. We can either use ifdefs or split the code into two files if there is not much to share.

#ifdef USE_GTK3
...
else
...
#endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants