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

Make OpenGL dependency conditional #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dpwiz
Copy link

@dpwiz dpwiz commented Nov 14, 2020

I work with Vulkan graphics but want to use OpenAL for audio.
Bringing the whole of OpenGL with its code and library dependencies is too much when they aren't your transitives already.

Another (better) alternative would be extracting those types into OpenGL-tensor package or something and share between the two.

@svenpanne
Copy link
Member

In principle this is a good idea, but I would rather avoid copying the Tensor code one more time: https://hackage.haskell.org/package/Tensor already contains the relevant stuff (or at least it should, I haven't looked into it for a long time), so one could conditionally re-export that instead of the the new copy.

It is rather unfortunate that there are already 2 copies (1 in OpenGL, 1 in Tensor), but I had quite a few discussions about that in the distant past, and that is what we settled for.

Use types from Tensor package as a replacement.
@dpwiz
Copy link
Author

dpwiz commented Nov 17, 2020

Sure, I've updated the patch.

@dpwiz
Copy link
Author

dpwiz commented Nov 28, 2020

Is there anything left to fix?

@svenpanne
Copy link
Member

Is there anything left to fix?

Nope, I just need some time to test this locally, "real life" is currently interfering a bit...

@dpwiz
Copy link
Author

dpwiz commented Dec 23, 2020

🎵 🎵 🎵

@dpwiz
Copy link
Author

dpwiz commented Jun 20, 2021

BTW, there is an example in a package that can switch between Tensor version and OpenGL: https://gitlab.com/dpwiz/opusfile

@dpwiz
Copy link
Author

dpwiz commented Jul 22, 2021

Please merge? I need this flag on Hackage so I can use it in snapshots.

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