Closed mottosso closed 9 years ago
As far as I know @Polytonic used glad instead, which is a library with a similar function.
Thanks @metiulekm, any idea why glad got chosen in favour of GLEW?
I don't really know, let's wait and see what @Polytonic says. The only thing I know is that GLEW is said by some people to be kinda outdated, but I don't know if this is the real reason.
@mottosso @metiulekm glad is header-only. Pretty much the only reason. I couldn't get GLEW and CMake to play nicely together. That being said, if I had the choice of any OpenGL function loader, I would use glbinding anyway, not GLEW. Having to pass glewExperimental = true
is absolutely criminal considering it's 2015.
Oh. I didn't even see that. Well, header-only libs are always easier to use... And glbinding looks useful too.
One problem with glbinding is that it enforces types a little too rigidly, so you end up having to do crazy stuff like static_cast<bool>(GL_TRUE)
to go from their enum representation to the underlying type that OpenGL expects. It adds a lot of extra code to read, but that's the price you pay for type safety ...
@mottosso just want to follow up on this. Does this answer your question?
Would it help if I added a note re: GLEW in the main readme?
@Polytonic Yes it does, thanks for that! And yes, a small note I think would help others walking the same path as me, I actually went through compiling and installing GLEW alongside glad as I didn't understand that it was supposed to substitute it.
@mottosso I pushed a small update. Let me know if this is more informative! :smile:
Looks good to me, thanks. :)
@mottosso @metiulekm glad is header-only. Pretty much the only reason. I couldn't get GLEW and CMake to play nicely together. That being said, if I had the choice of any OpenGL function loader, I would use glbinding anyway, not GLEW. Having to pass glewExperimental = true is absolutely criminal considering it's 2015.
@metiulekm sorry, I don't know why I said glad was header-only. I meant to say "the header and source are standalone" and didn't require me to invoke GNU make or CMake to build/link with.
Ok :smiley:
As a complete beginner to OpenGL, I'm wondering why GLEW was left out of Glitter, especially since both tutorials linked to* assume to use it?
* Specifically, these.