-
-
Notifications
You must be signed in to change notification settings - Fork 470
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
Optional glbinding as OpenGL binding #4
Conversation
@@ -72,6 +72,8 @@ PKG_SEARCH_MODULE(SDL2IMAGE REQUIRED SDL2_image>=2.0.0) | |||
SET(HAVE_SDL TRUE) | |||
|
|||
OPTION(ENABLE_OPENGL "Enable OpenGL support" ON) | |||
OPTION(GLBINDING_ENABLED "Use glbinding instead of GLEW" OFF) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am no expert in CMake, but shouldn't this option be called USE_GLBINDING since we're referencing USE_GLBINDING later in the code (l. 84)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally, I named this option like this, but I changed it to GLBINDING_ENABLED when I added the second glbinding option, so that they get grouped by the cmake gui.
I'm not attached to the exact naming of the options, they can be renamed to whatever you like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, but they should be the same in line 75 and line 84, so that this actually works, right? In any case: Many thanks for your work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, they have to have the same name, I fixed this.
I can merge this, but I keep getting a crash when I try to start SuperTux with glbinding: |
I see that you have used OS X as operating system. Thanks for the extensive crash report. |
I moved the glbinding initialization code behind the context creation code, where it belongs. |
I squashed all commits and applied the pull request on our repository with git revision f266dcd. Changes should appear on this mirror within the hour. In case there are any problems arising, I will get back to you. Thanks for your contribution! :-) |
Hmm, sorry, this was quick, but I accidentally wasn't compiling with glbinding. It still crashes at startup on my Mac 10.9. Please see pastebin for the error message: |
It seems that on OS X an OpenGL context below version 3.0 is used (I assume 2.1), so querying extensions fails. This is implemented in the no_extensions_below_3_0 branch of glbinding. |
The abovementioned branch works, albeit being rather slow. I can upload the log which contains the opengl calls from starting supertux to loading the first worldmap, however, it's 95 MB big, which is too big for any pastebin service. |
Of course, with ongoing write to disk, the program is much times slower. |
You're right. Disabling that debug statement fixed it. Done the final change in commit 8415881 and closing this. Many thanks, again! |
This week my team published an alternative OpenGL binding beside GLEW.
As a simple test we tried to replace the OpenGL binding of known open-source software with ours: glbinding.
For SuperTux this was a pleasingly simple task.
I just want you to be able to use our work we have done while integrating glbinding.
If you pull this PR into your branch, the build defaults to the exact same setting as without this PR.
That has been done:
I know this is just a mirror, but if you're interested in the code you can merge this PR in your internally used git-Repository.