Skip to content

second shot at XQuartz/OpenGL support with suggested env#67

Open
dk wants to merge 1 commit intoPerl-GPU:masterfrom
dk:master
Open

second shot at XQuartz/OpenGL support with suggested env#67
dk wants to merge 1 commit intoPerl-GPU:masterfrom
dk:master

Conversation

@dk
Copy link
Contributor

@dk dk commented Feb 23, 2026

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: ''

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: ''
@dk
Copy link
Contributor Author

dk commented Feb 23, 2026

@mohawk2
Copy link
Contributor

mohawk2 commented Feb 25, 2026

Thank you for this. You really shouldn't PR it from your master but instead make a new branch as is standard practice.

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.

@mohawk2
Copy link
Contributor

mohawk2 commented Feb 25, 2026

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?

@dk
Copy link
Contributor Author

dk commented Feb 25, 2026

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.

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.

@dk
Copy link
Contributor Author

dk commented Feb 25, 2026

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?

@mohawk2
Copy link
Contributor

mohawk2 commented Feb 26, 2026

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.
Sorry that's actually not clear for me... if you mean an action to be taken, could you possibly elaborate?

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.

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 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.

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 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.

@dk
Copy link
Contributor Author

dk commented Feb 26, 2026

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.

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