-
Notifications
You must be signed in to change notification settings - Fork 22
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
OpenGL Bindings #16
OpenGL Bindings #16
Conversation
I also was not sure what to link to for every target, so I just did the ones I know. |
Oh, this was an interesting solution. So the idea was that to avoid the user having to specify a version, all are available and you pick from the versions you know are available? |
Sort of? I believe the version number in the source is in reference to when the specific functions were added, as the earlier versions definitely do not have all of the functions of that version (e.g. fixed pipeline functions like glStart and glEnd are not included). I came from a background of using Java/LWJGL which does something similar with their bindings. |
I could probably add the old functions, though it would likely take a little while longer. |
There is the alternative to use the |
Is env defined in the project.json? or is it a separate custom module? |
I am talking about std::core::env, which can be injected. Another option is to have module opengl;
const int VERSION = 22;
module mycode;
... This would work. |
how do you inject it? (sorry I am still a bit new to C3) |
Also as of this moment the bindings should be fully functional with the latest version of OpenGL. |
Literally just placing these rows anywhere in your sources: module opengl;
const int VERSION = 22; |
You can access it then through env? |
That's not even needed if all opengl modules import this. |
Do you mind explaining to me how it(injecting variables into env) works anyway, it may be useful in other ways. |
I'll start working on supporting earlier versions |
Basically all modules are extendable, so if your program adds something to some other module it's there. |
Ooh ok so it's just like the opengl thing but with std::core::env |
I have been looking around and I can't seem to find older versions of the OpenGL headers/ xml spec. Would it be alright if you just merged this pull request and I will work on trying to find sources for older versions. |
Oh wait I found the previous versions. It will probably take a day or two to do all of them. |
Finished adding all of the previous versions! I also tested it by making a simple triangle and everything seemed to work. |
Awesome work! |
I was not sure if it was better to have multiple files or just one. So I added one file for each sub-module, I am willing to merge them together if necessary though.