Skip to content

Make OpenGL dependency conditional#2

Open
dpwiz wants to merge 1 commit into
haskell-openal:masterfrom
dpwiz:opengl-flag
Open

Make OpenGL dependency conditional#2
dpwiz wants to merge 1 commit into
haskell-openal:masterfrom
dpwiz:opengl-flag

Conversation

@dpwiz

@dpwiz dpwiz commented Nov 14, 2020

Copy link
Copy Markdown

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
Copy Markdown
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

dpwiz commented Nov 17, 2020

Copy link
Copy Markdown
Author

Sure, I've updated the patch.

@dpwiz

dpwiz commented Nov 28, 2020

Copy link
Copy Markdown
Author

Is there anything left to fix?

@svenpanne

Copy link
Copy Markdown
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

dpwiz commented Dec 23, 2020

Copy link
Copy Markdown
Author

🎵 🎵 🎵

@dpwiz

dpwiz commented Jun 20, 2021

Copy link
Copy Markdown
Author

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

@dpwiz

dpwiz commented Jul 22, 2021

Copy link
Copy Markdown
Author

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