Hi!
Since SFML doesn't (yet) have functionality for clipped drawing,
and thankfully my requirements are very low (ie. only rectangle clipping areas),
I intend to use glScissor for that. However, I'm a complete newb in terms of openGL,
so besides calling
glEnable(GL_SCISSOR_TEST);
glScissor(x, y, w, h);
before every call to window.draw(...) there isn't much I'd know about.
I feel like calling the glEnable every time I draw seems unnecessary (as I will always use it),
but I don't know where the right place would be to call it once.
Also, do I need to call window.setActive() so openGL knows which context to apply
the scissor test to?
And how should I do all this when I'm using render textures in between normal draws
to the screen? Do I need to "refresh" the scissor box for every render target when I switch them?
Ie. -> set scissor box -> draw to window -> draw to other render target
-> scissor box gone, need to set again ?
(Sorry if this sounds confusing, I'm just not very knowledgeable as to how context and state
like this are managed under the hood in openGL)
A minimal example of using glScissor, maybe with an alternating clip box based on some conditional
would be greatly appreciated