Skip to content

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