-
Notifications
You must be signed in to change notification settings - Fork 429
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
Conflicts between extension function decls (I could just be dumb) #9
Comments
Thanks, I will take a look. I assume you're using it for the D programming language? Are you using the latest version I fixed a bug like that in the last commit. |
Can you give me some more information, I tried to reproduce this, but everything I try seems to compile, e.g.:
The last error message means, there is simply no Can you give me the command you use to compile your code and the command which you used to generate the loader? Thanks |
Ah, sorry about that. I'm using the C binding actually, but with one important distinction: I'm compiling the resulting .c file as C++ instead of C. Apparently C doesn't care that there are multiple definitions of these things, but C++ is more strict. The loader generator command:
Then I rename testloader/src/glad.c to glad.cpp, and compile:
|
The three last extensions are also written against plain OpenGL, so there's nothing wrong about them getting loaded: Concerning the compilation error you encounter, this is not valid C++ code. (3.2 One definition rule) Why would you want to compile it with a C++ compiler? |
With latest commit, C++ should be supported. My small tests run through and @pyalot uses it in a bigger C++ project. |
Ok now it is really fixed, thanks everyone! |
I admit I don't know too much about GL extensions, so I don't know which ones are ancient and shouldn't really be used anymore, buuuut I'm writing an OpenGL binding and I don't know what extensions the users of this binding will need. So I used Glad to generate a loader that loads all extensions (by leaving off the --extensions option).
The resulting (enormous) loader doesn't compile because it seems that there are a number of commands which are required by multiple extensions, so Glad generates multiple declarations for their function pointers. I've commented out the duplicates, and have found out roughly which ones stomp on each other. It's a big list.
I'm a little surprised by GL_EXT_separate_shader_objects conflicting because I generated this loader with just the GL profile, no GLES, so I don't know why the GLES2 bits of that extension are getting loaded. Maybe another bug?
The text was updated successfully, but these errors were encountered: