-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Examples: add glad for OpenGL 3.3 core #2785
Conversation
b3b9297
to
50649f2
Compare
In the other topic, your reasoning for adding Glad was: " the glad loader was the only one I had modify the project (download glad sources and put them in the right folder). gl3w is already in the repository, and glew is used from system. I thought with glad in the repo the makefile has equal support for all three cases (just comment out the current and comment in another loader) " That's all true, but if gl3w works why considering to use Glad? |
Hey, I made a pull request today that will settle the gl loader headers forever, this will allow imgui to automatically use your existing gl loader header without making changes in your engine/project .... #2798 Probably that's what you are searching for ... |
I think your merged fixed @o-micron doesn't invalidate this PR, what @NeroBurner suggests is that Glad is not part of standard packages so they suggested including it in the repo. |
@ocornut I thought that would help in case we want to use glad with imgui ... Now that we can automatically use whatever gl loader headers included in the original project, we can use glad without adding glad to standard packages ... 🙂 Sorry, I don't mean to invalidate this PR or anything like that, I just wanted to help 🙂 |
I find the flow with glad better. You decide exactly which minimum OpenGL version you want to support (version, core/compatibility, selected extensions), download and add it to your project (or generate it with the python script yourself) the glad version added to the examples would only be for the examples (or if someone wants to use the OpenGL 3.3 Core version). I personally used it to test if my project did something wrong or the fault lies at imgui (in my case it was my project 😅 ). Having a working version of glad in the example folder makes it easier to test the different loaders (if needed) |
I think Glad is great and probably a better solution for end-user. If we include Glad in the repo we may raise the issue that people will come up with infinitity of pull requests to tweak the Glad output to whichever version they end up using in their project. I think you can generate Glad without the KHR stuff and that's lighter. |
50649f2
to
84e8abb
Compare
removed the KHR part in glad the PRs may come, but we could add a remark in the issue template for that case, or somewhere in the readme 🤔 if you think the possible drawbacks outweigh the benefits just close the PR, no hard feelings :) |
just tested glad loader again with
I think I have to re-add the KHR part of glad |
03b33b0
to
b032a8c
Compare
b032a8c
to
5c434b7
Compare
5c434b7
to
1c58214
Compare
Closing this as won't merge. I think at this point we don't need to add more libs than strictly necessary for the examples. Both Glad and Glad2 are supported by the OpenGL thought, but we'll leave it to user to provide their copy of Glad. |
add glad files for examples to use
previous discussion in #2774