-
-
Notifications
You must be signed in to change notification settings - Fork 436
use GLAD to link OpenGL #942
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
base: master
Are you sure you want to change the base?
Conversation
33e4364 to
ecd0b4e
Compare
|
@kblaschke I have been testing the glad integration. It's starting to shape up, I was able to run projectM with egl + gl core profile 3.3. Now I am looking at wrapping up the lifecycle management for the resolver. There are 2 options: Using glad with MX (multi-context) or without. Technically, the C api with |
|
Just keep it simple for now. I don't think a single application would use different GL implementations within the same process. Multiple GL contexts, sure, but these would all use the same GL functions and libraries. The only use for this I can imagine would be some development test application which runs projectM on multiple backends in parallel for direct comparison, but this can easily be done with several processes as well. For end users, this is an edge case nobody really needs IMO, so a single set of functions is good for now. Besides that, changing to multi-context would only require internal refactoring and no API changes as the resolver callback is already per-instance. I'd postpone this and only implement if there's a real-world demand for it. |
|
Compiled and ran, with this fix. Built with directions here: https://github.com/projectM-visualizer/projectm/blob/master/BUILDING-cmake.md?plain=1#L21-L26
M1 Mac Air |
Yeah, it's a remnant of older SDL2 releases. They've been changing the CMake config scripts multiple times over different releases, so this check might require some additional branching for older SDL releases. We can also try and find out when this behavior actually changed (probably at some point after the 2.0.16 release), and make this version the minimum build requirement. At runtime, it's not an issue as SDL2 is fully backwards compatible at the ABI/API level. |
|
The last issue that I am trying to get right is with Emscripten. Currently |
|
Turned out there is a simple way to support Emscripten/WebGL in the resolver. |
|
re-tested GLX, GLES, EGL, WGL, Emscripten and Android |
|
I think the resolver should be reasonably robust now.
|
|
Can you elaborate on how you are running on these test platforms? Is this all in the cloud? Or since this is LibProjectM; is this just testing that it compiles? May want to add some more linux targets, like different versions of deb/Ubuntu; as well as Redhat and an Arch/Bazzite exotic distro. I also think it needs testing against different GPUs, because they package their own GL libs. - Noveau, Nividia, AMD, Intel, Raspberri Pi / ARM. Great work 👍 |
|
Nothing fancy. It's a painful manual process. 2 computers, one with Mint (X11/Nvidia) and Ubuntu (Wayland/AMD) and dual-boot Windows. I am starting up the sdl-test-ui everywhere, build with and without gles, and let it render a preset. Also running gstreamer for testing. I got the Android example updated, using that to test Android, build the app, run on an ARM emulator. For Emscripten I got the example running. So I actually start them up and look if it renders. |
|
ANGLE can be pulled in via vcpkg and CMake, so it requires a few changes to the build files, but it's to quick to. |
add GL resolver, load GLAD remove GLEW, adjust sdl-test-ui
5b2703a to
110bb98
Compare
26f5646 to
110bb98
Compare
Changes
Test status - OS/GL API
Test status - framework integrations
closes #681