I am a novice OpenGL coder and have only written basic programs in academia using SFML framework. I relied on GLEW a lot. But I looked at some of the threads in the OpenGL forum and a couple of people have pointed out some major flaws in GLEW. GLEW has served me fine and I understand what it does. It’s good enough for the kind of simple and purely academic programs I have written. But I don’t imagine professional studios rely on something simple like GLEW. Just curious, do the major OpenGL employers like game outfits use GLEW or do they wrangle the extensions themselves? Can I get some insight into what industry uses?
Apologies ahead of time if this is in the wrong section. Also I don’t think this question has been asked before and I did my best to check that it hasn’t been.
The most recent OpenGL-based commercial game for which I’ve looked at the source code is Doom3 which has explicitly queries extensions and function pointers. Link.
But that was 10 years ago, when GLEW was significantly less mature. I have no idea whether they’d take the same approach now.
I’m not sure you can call GLEW “mature”, when it requires something it explicitly calls “experimental” just to work in a core OpenGL context. And this is over six years after OpenGL 3.1 came out.
The question is can you do something better and more mature. I suspect the answer is no. GLEW saves you a lot of effort, works and solves a lot of cross platform and compatibility headaches. It is useful in a professional application. It is JUST a thin API binding layer to map queried or included function entry points to a consistent API.
The thing is that GLEW is set up as a “one-size-fits-all” extension and function pointer grabber. Aside from the GLEW_EXPERIMENTAL thing (which if you look at the header file will tell you that it allows GLEW to grab function pointers even if an extension is absent from the GL_EXTENSIONS string) it’s designed for pretty much the lowest common denominator use cases.
Sometimes that’s exactly what you need, but sometimes it’s not. For example, from looking over the Doom 3 source code we can see that they’ve added their own GL logging and swap function pointers around between a logging version and the standard version depending on whether or not logging is enabled. GLEW doesn’t have that capability, so therefore they didn’t use it (that’s not saying it’s the only reason they didn’t use it, of course, but it is one reason).
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.