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

[DO NOT MERGE] Test Clang.jl's generator #72

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Gnimuc
Copy link

@Gnimuc Gnimuc commented Jan 24, 2022

As per #71 (comment)

@Gnimuc
Copy link
Author

Gnimuc commented Jan 24, 2022

TODO List: (What I can do at the moment is to merely provide this demo.)

  1. Need to find a way to ship gl.h. Maybe we can create a new JLL package like what we did for VulkanCore.jl: https://github.com/JuliaBinaryWrappers/Vulkan_Headers_jll.jl
  2. Function pointer loading. Can we just use "libGL.so.1" etc. in ccall directly instead of querying those function pointers with these helpers? https://github.com/JuliaGL/ModernGL.jl/blob/master/src/ModernGL.jl

@SimonDanisch
Copy link
Member

Can we just use "libGL.so.1" etc. in ccall directly instead of querying those function pointers with these helpers?

Pretty sure we can't.. To be fair, my memory is a bit hazy about the details, since I dived into this (almost) centuries ago.
But what I remember is, that it may work with some drivers, but is absolutely not guaranteed.
It's also somewhat impossible to work - e.g. think of hybrid GPU platforms, where one can switch the GPU from intel to amd dynamically - pretty sure that kind of stuff already requires us to always ask for the current pointers of the OpenGL implementation.

@Gnimuc
Copy link
Author

Gnimuc commented Jan 25, 2022

I can successfully render triangles with this PR on macOS. This method is doable but still needs someone to add support to generate extra expressions for Windows and debug mode. Also, this PR uses CEnum.jl which will be a breaking change.

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