Did you consider moving the FreeType implementation to your own code and rendering via your abstracted interface?
A basic sf::Window, which is all you would need if you're not using the text rendering, implements a GL context but doesn't draw anything with it itself, it simply allows you to draw to the context it holds. By that logic you should be able to make a context in the mode you desire without limitations, since you are deciding what features you'll be using.
The context generation is handled by 3 OS specific implementation files:
- <SFML/Window/Win32/WglContext.hpp>
<SFML/Window/Linux/GlxContext.hpp>
<SFML/Window/OSX/SFContext.hpp>
Code: Select all
int attributes[] =
{
WGL_CONTEXT_MAJOR_VERSION_ARB, static_cast<int>(m_settings.majorVersion),
WGL_CONTEXT_MINOR_VERSION_ARB, static_cast<int>(m_settings.minorVersion),
WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB,
0, 0
};
Where: WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB, would be only forward-compatible features.
The only thing other than maintaining the context that sf::Window does in regards to drawing is buffer swapping, sf::Window.display(), and that is implemented in terms of the OS's windowing system. It doesn't even implement context resizing logic, you handle that via an event for maximum control.
Only sf::RenderWindow uses sfml's built in drawing code and might require legacy commands due to that.
I'm quite interested in your thought processes regarding this latest hurdle and would love to hear a bit more about the choices you're making and your opinions on what's best for you and LT. The thoughts behind software engineering are really interesting to me.