Emulator Issues #6917

GLExtensions branch review

Added by Sonicadvance1 over 7 years ago.

% Done:


Operating system:
Issue type:
Feature request
Relates to usability:
Relates to performance:
Relates to maintainability:
Regression start:
Fixed in:


This won't actually be a pull request until we figure out exactly why OS X is failing to work.

I'm starting this early since this is a lot of change to the code, in the initial push I think it was 16K lines added and 56K lines removed.

The main reasoning behind this branch is to completely remove GLEW from the Dolphin code base. GLEW being the fantastic library that it is, supports every single OpenGL extension which according to is currently sitting at 443 extensions. While that is all nice, and we don't use anywhere near all those extensions, there are some issues that GLEW brings with it.

1) Only supports desktop OpenGL. There are scripts in it to support Android with OpenGL ES 2, but it is neglected and doesn't build a working binary. No support for OpenGL ES 3 either.
2) It doesn't support runtime switching between OpenGL ES and OpenGL, so we would eventually end up with two GLEW libraries in our externals for supporting both code paths.
3) GLEW doesn't support EGL at all, so we wouldn't ever be able to provide a binary that works on Wayland.

The second reason behind removing GLEW from the project is to support runtime switching between OpenGL and OpenGL ES 3 depending on if the hardware supports it. This will be a requirement in the future, and it is much better to get started early here.

Of course working towards improving Wayland support is something I am trying to indirectly work upon as well.

With such a huge introduction of new code to the project, there are many places where I could have made mistakes with it.
This does add some code complexity to the project, and some increased maintenance, which was noticed in the original proposal document.
I know Bh44L had a concern with how I use extern for all the function pointers, which is exactly how GLEW does it. I'm not entirely sure what could be done about it though.

The original proposal for the extension loader was here:


#1 Updated by Sonicadvance1 over 7 years ago

As suspected earlier in the IRC channel, Apple doesn't expose all the core extensions for OpenGL. So we needed to propagate the extension list with core extensions similar to how it is done on GL ES 3 hardware.

This now works on all tested platforms on my end; OS X(Software renderer), Linux(AMD), Nvidia Kepler, Android(Qualcomm).

So this just needs a review before merging.

#2 Updated by Sonicadvance1 over 7 years ago

In reviewing of the branch one should mostly focus on GLExtensions.cpp since the rest are mostly just function pointers/defines or minor changes needed to support GLExtensions.

#3 Updated by Sonicadvance1 about 7 years ago

  • Status changed from New to Fixed


Also available in: Atom PDF