I'm trying to enable multisampling in an OpenGL program I'm writing. The application will require a substantial amount of GUI, so I am using wxPython (with which I am less familiar) instead of PyGame (SDL).
I really need hardware multisampling for the main GLCanvas. I am aware that this is borderline possible in the C++ version of wx, e.g., How to enable multisampling for a wxWidgets OpenGL program?. However, I attempted something similar, but it didn't work for wxPython.
So, what I want to know is, is multisampling even possible with wxPython?
Ideas I've already thought of:
- Use a PyGame context inside a wx.Frame instead. Use SDL's hardware multisampling. No idea if this would actually work. IIRC, resizing SDL OpenGL contexts destroys their contents, which would be somewhat of a problem with this application. Although . . . I guess it might be workable.
- Use a FBO with a higher resolution to render, and then downsample with multisampling. This . . . works, sorta. But supersampling is much slower than multisampling, and the technique doesn't work very well for things like GL_LINE. I have already tried this solution.
- Use a FBO with a multisampling render target. This would involve a lot of changes, and would limit cross-system portability.
- Ideally: use wxPython's built-in support, if it exists.