I’ve been working for some time with wxWidgets. The only thing I’ve missed, regarding OpenGL, is the ability to define my own OpenGL context, in particular Core profile and Debug contexts.
To be able to set a context we, or the toolkit we’re using, must use the
wglCreateContextAttribsARB function, as defined in the WGL_ARB_create_context extension. As it happens, wxWidgets uses
wglCreateContext, hence no OpenGL context can be explicitly defined using the provided source code for the current release (2.9.4).
As OpenGL context setting is not yet in the roadmap for future releases of wxWidgets, nor is it in its Todo List, I’m sharing a solution for this issue.
The solution is for the Windows platform, but other platforms should be as easy to change as well.
Note: I make no claim regarding the quality of the solution, it worked for me, and that’s all I claim. If anyone knows of a better way of doing this comments are most welcome, as they may prove useful for other readers (and me as well 🙂 ).