Comments (18)
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
from leif.
Hmm, I wonder if they have an API that can be used to download GLAD on-build with curl, wget or something like that.
Would this be something you would accept?
PS: I don't see anything platform specific in their options but even if it is not platform specific it would be better to download the deps on-build instead of having them bundled with the repository IMHO.
from leif.
I don't think they have an api for that. I was wondering the same thing too. I'll ask
from leif.
Here is the Issue I created: Dav1dde/glad#435
from leif.
I don't think they have an api for that. I was wondering the same thing too. I'll ask
When you hit the generate button a POST request is made to /generate with the following example content:
language=c&specification=gl&api=gl%3D4.6&api=gles1%3D1.0&api=gles2%3Dnone&api=glsc2%3Dnone&profile=compatibility&loader=on
from leif.
from that, i can't just tack on ...&platform=macos
can I? Is there docs for that?
from leif.
from that, i can't just tack on
...&platform=macos
can I? Is there docs for that?
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:
https://github.com/Dav1dde/glad-web/blob/f2659ebfb9e54b9d72c0cb806c8a27724f8719bf/gladweb/views/index.py#L116
from leif.
Alr. Thx so much.
from leif.
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
from leif.
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.
PS: I don't see anything platform specific in their options but even if it is not platform specific it would be better to download the deps on-build instead of having them bundled with the repository IMHO.
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.
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'
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.
from leif.
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 :)
from leif.
Explicitely there is nothing platform-specific, as to my understanding.
Implicitely it is - like what versions, what "dialect" is supported.
In my case I get the following when trying to run todo
on my "platform":
$ ./todo
[LEIF ERROR]: Failed to compile vertex shader.
Leif: [INFO]: 0:1(10): error: GLSL 4.60 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 4.00, 4.10, 4.20, 4.30, 4.40, 4.50, 1.00 ES, 3.00 ES, 3.10 ES, and 3.20 ES
[LEIF ERROR]: Failed to compile fragment shader.
Leif: [INFO]: 0:1(10): error: GLSL 4.60 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 4.00, 4.10, 4.20, 4.30, 4.40, 4.50, 1.00 ES, 3.00 ES, 3.10 ES, and 3.20 ES
[LEIF ERROR]: Failed to open font file '/usr/share/todo/fonts/inter-bold.ttf'
Segmentation fault (core dumped)
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 todo
was built with by default) and rebuild todo
.
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 450
instead of 460
)
https://github.com/cococry/leif/blob/main/leif.c#L475 (using 450
instead of 460
)
from leif.
okay, so changing the version to 450 in the shaders made it work and didn't cause any graphical bugs?
from leif.
At least not in the context of the todo
application - I came here from one of you Youtube videos about todo
.
from leif.
okay. i will be testing this and if it does not cause any issues, will add it to leifs main branch.
from leif.
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.
from leif.
hahaha okay didn't know that 😅
from leif.
Now more experiments with todo
and also with lyssa
with my changes to GLSL version v450 - I haven't noticed visual artifacts.
But of course that might have only scratched on leif's surface... I haven't analyzed what in detail are the differences between v4.5.0 and v4.6.0.
from leif.
Related Issues (13)
- Hi coco cry, can't really seem to build the library and test it out on my Mac. HOT 5
- Issue with the Makefile HOT 4
- Unable to build example project HOT 2
- font problem HOT 8
- Using OpenCV Mat as texture HOT 4
- running `install.sh` gives compilation error, same with running `make`
- Min opengl version? HOT 1
- .leif folder
- ./install.sh not working HOT 4
- Visual Studio 2022/2019 instead of vscode? HOT 2
- libclipboard missing dependency + buffer overflow error (related to optimization flags)
- GLSL version HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leif.