-
Notifications
You must be signed in to change notification settings - Fork 23
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
GLAD is platform specific #2
Comments
Yes so eventually, the library will just be a single c and h file that you can include to your build. You then have to handle the dependencies yourself. There will probably also be compiled libraries for the different platforms with that you can link. So the glad part will be handled by the user and prebuild for the specific platform |
Hmm, I wonder if they have an API that can be used to download GLAD on-build with curl, wget or something like that. |
I don't think they have an api for that. I was wondering the same thing too. I'll ask |
Here is the Issue I created: Dav1dde/glad#435 |
When you hit the generate button a POST request is made to /generate with the following example content: |
from that, i can't just tack on |
I don't think there is an option for macos. As a side note I don't think there is anything OS specific in there. files are just C as far as I can tell. I don't think there are any docs I just used used the network tab in the dev tools on my browser but if you would like to know more the source code would probably be a good place to start: |
Alr. Thx so much. |
This should give you back the generated url: curl -X POST -d "language=c&specification=gl&api=gl%3D1.3&api=gles1%3Dnone&api=gles2%3Dnone&api=glsc2%3Dnone&profile=compatibility&loader=on" --max-redirs 0 https://glad.dav1d.de/generate |grep "You should" |sed -e 's|<p>.*">||g' -e 's|</a>.*||g' | tr -d '\n' It is a bit messy, there is probably a better way to do it |
There is nothing platform specific which glad needs to know, it does not matter on which or for which platform you generate, you will always get the same sources and headers.
I recommend you to just include the files in your repository, faster build times, less dependencies (Python + Jinja) and nice diffs when you re-generate the files.
I'd ask you not to do that, it's fine if you use this as a one (or two-) time script to regenerate automatically, but if it is integrated into your builds this will generate a bunch of files over and over on my server. It also may break when I update the website. |
I think the response I received from the creator of GLAD says enough. Essentially they said that it isn't platform specific, but the underlying APIs and contexts are. My bad. With that in mind, This may be a good spot to close this issue. Thanks for all of your input and support to correct my misunderstanding :) |
Explicitely there is nothing platform-specific, as to my understanding. In my case I get the following when trying to run
It's easy to fix - just download my "platform specific GLAD" (h and c file) (compatible to up to v4.50 only instead of v4.60 EDIT: Sorry, forgot to mention I needed to update the version information of the fragment- and vertex-shader: https://github.com/cococry/leif/blob/main/leif.c#L433 (using |
okay, so changing the version to 450 in the shaders made it work and didn't cause any graphical bugs? |
At least not in the context of the |
okay. i will be testing this and if it does not cause any issues, will add it to leifs main branch. |
hold on, hold on... this happened on one of my very constrained and embedded system plus using remote-display-X11-screen-forwarding to a very old laptop :-P just commenting on how "implicitely" GLAD can result on platform-specific behaviour/dependencies. It works out of the box on a more modern, Ubuntu-22.04-Intel-Core-i7 based system, natively. |
hahaha okay didn't know that 😅 |
Now more experiments with |
From my understanding, GLAD is platform specific. Maybe write a section in your README to let users know that they'll have to download a version for their platform from https://glad.dav1d.de/. Same principal goes to the future dependancies. I guess, in addition to above, add it to your
.gitignore
so that way everyone wont have to re-download GLAD for their system every time a change to the repo occurs.The text was updated successfully, but these errors were encountered: