Closed Corbachu closed 6 years ago
I think that custom implementation is the best way :smiley:
I was thinking about that, too: any ideas where we could start with that? I have always used external loaders..
What methods of GLEW are used?
Look in r_main.cc:
RGL_CheckExtensions() is the function that finds and appends all functions (which, really, isn't a ton...)
I am also looking into dGLMake from Doom64-EX, so hopefully I can get on that soon!
Is 3dge still using GL/glew.h really? I noticed at least in i_video.cc i can comment out the include for GL/glew.h and it seems to affect nothing...
I will test this out tonight. The i_video code now uses sdl_opengl, but GLEW is still required for extension checking. We really need to get a replacement going..
On Linux it's easier: just make a header On Windows we need to use wglGetProcAddress
Want to revisit this issue soon :)
Opened up a new branch called "noglew", it uses GZDoom's version of glLoadGen. If anyone is curious. As soon as I get it working properly consider GLEW as good as gone :-D
@usernameak Maybe you can help me test it out? Just checkout noglew to see where it stands right now. :-)
We have successfully stripped out GLEW for our own implementation (based off of GZDoom). Closing this finally :)
Okay, so as you guys might know, I want to strip 3DGE of all GLEW-related stuff in favor of a faster, smaller API to handle OpenGL. Glew is too large, and loads way too much information about GL when we only (for now) use a small set of GL extensions (in RGL_CheckExtensions) -- which we could probably rewrite as well. . .
I have committed a library containing a few headers into a folder inside /src named "GLAD". It seemed like a smaller, decent solution.
However, we do have a few more options:
LibEpoxy
(https://github.com/anholt/libepoxy)
GlLoadGen (https://bitbucket.org/alfonse/glloadgen/wiki/Home)
GLAD
https://github.com/Dav1dde/glad
glBinding
https://github.com/cginternals/glbinding
Reference Sheet
https://www.opengl.org/wiki/OpenGL_Loading_Library
I would like all developers to weigh in on this and see what will work best for us.
One thing is certain: GLEW is not part of 3DGE's future, so we should look into this before creating the new release build (2.1.0).