Modular rendering backends#1585
Conversation
992c480 to
202625d
Compare
|
A few random thoughts after a very quick review of the changes:
|
|
Yeah, I agree. Ideally, it should be possible to use any backend without even linking to any other. For example, if you want to only use DirectX, you shouldn't need OpenGL and vice-versa. I'm not sure how important it would be to be able to change them at runtime, but I'd say even just doing so only at compile time (of SFML) would be a big gain.
I'd probably go for an optional standalone function I'd go with |
|
Any movement on this? |
… only the existing GL1 renderer implementation is available.
202625d to
fcd52af
Compare
So... after quite some time... and probably too many delays...
here is the initial draft implementation of support for modular rendering backends. It is still quite raw, and probably unpolished, even though I tried to fill out as many holes as possible.
I've pushed this branch and opened this PR not primarily to get this merged, but to allow for an open discussion on how this should be implemented and to have a concrete example of a working implementation at hand.
There is obviously not going to be "test code" because for anybody besides SFML developers, nothing should really change. The external facing public API has not changed besides the fact that the user can select from multiple renderers if they choose to do so. ABI compatibility is more or less impossible to not break if we don't want to start making unreasonable compromises.
For those interested, browse the code, test it as you please and spend some time imagining how future rendering backends might plug into the architecture. Currently, only the existing ported GL1 implementation is available.