second shot at XQuartz/OpenGL support with suggested env#67
second shot at XQuartz/OpenGL support with suggested env#67dk wants to merge 1 commit intoPerl-GPU:masterfrom
Conversation
As agreed in Perl-GPU#66, here's the next iteration that would allow linking the module with XQuartz libraries. The intended use is this: env: OGLM_ADD_DEFINE: '-DGLEW_APPLE_GLX -I/opt/X11/include' OGLM_ADD_LIBS: '-L/opt/X11/lib -lglut' OGLM_REPLACE_OTHERLDFLAGS: ''
|
Also, here's the CI: https://github.com/dk/Prima-OpenGL/blob/master/.github/workflows/ci.yml |
|
Thank you for this. You really shouldn't PR it from your I'm glad you have CI on your repo. To be clear, the CI that needs to be in this before it can be accepted is for this repo, to prove it actually works. |
|
By the way, the CI on Prima:OGL appears to be passing, including on MacOS. That seems to suggest this patch isn't needed for OGLM to work with Prima:OGL on there? |
Sorry that's actually not clear for me... if you mean an action to be taken, could you possibly elaborate? As for CI passing, it does not mean it works - it compiles and runs indeed, but if you would try the actual gui, there is no opengl visualisation. I specifically did not add tests that check pixel values, or at least for now, as I dont want local setup quirks to affect module installability. For xt though, could be a good idea. |
|
A side note on the OGLM env vars: I feel that the details specified there belong to the inner workings of the OGLM module, not as much to Prima::OGL.. specifically, -DGLEW_APPLE_GLX is something that looks very internal there. I wonder if you would agree that these flags could be moved to OGLM's Makefile.PL , something like OGLM_TARGET=APPLE_GLX? |
I won't accept a change on this topic until you have added, as part of the PR, CI tests that prove it actually works. I'll remind you that if I do accept it, I have to maintain it forever, so that needs to be painless.
A test proving that it starts up without crashing/segfaulting would be fine. Such a test has served OpenGL.pm well, without any notion of checking pixels.
I want to make the normal config "just work", which it does very well right now. I am comfortable with what you might feel is "pollution" for other distros, since it seems to me it's just defining GLEW-related symbols, which is harmless. If you want, for your purposes, to enable bending that to work with Prima, in a way that absolutely has no effect on non-Prima users, I am happy to facilitate that subject to the tests and CI points above. |
|
Do you mean that the CI to be implemented should be the part of the PR, i e to be a part of the OGLM itself? ( because I thought you meant it to be a part of Prima::OGL). If that is so, am not sure how it is possible to test two different builds in a single CI test run, but I'll see if I can tweak ci.yml for this. I'll also rework the patch so it will support OGLM_TARGET=APPLE_GLX with exactly the point to be a non-default build, with normal config behavior intact. |
As agreed in #66, here's the next iteration that would allow linking the module with XQuartz libraries.
The intended use is this:
env:
OGLM_ADD_DEFINE: '-DGLEW_APPLE_GLX -I/opt/X11/include'
OGLM_ADD_LIBS: '-L/opt/X11/lib -lglut'
OGLM_REPLACE_OTHERLDFLAGS: ''