Zachariah Brown
Zachariah Brown
> Does this only support regions composed of shapes, or can it also handle a region defined by a texture? From the first post. :wink: > Even textures with alpha...
> What I don't understand is the quite expensive deal inside RenderTextureImplFBO::create. Why create an entire new buffer instead of simply adding a stencil-attachment to the depth-buffer via GL_DEPTH24_STENCIL8? I...
I just added `sf::ClippingMask::Mode`. There are two different modes, inclusive and exclusive. Inclusive is the default mode and will cause only areas of the defined mask to be visible. Exclusive...
> f I don't overlook something, caching could be achieved using a "generation" integer inside `sf::ClippingMask`, which is increased every time the mask changes. This is exactly what is done...
> And `sf::RenderStates::StatesCache` seems like an ideal place to handle caching. > > Furthermore, it's always good if we can prevent `sf::RenderTarget` from becoming a god class Ehh??? https://github.com/SFML/SFML/blob/master/include/SFML/Graphics/RenderTarget.hpp#L401 :)
> As can be seen above, a next step would be transforming the code to an API with a new `sf::RenderStates` attribute rather than `sf::RenderTarget` methods. I was looking at...
> but then how do you remove a specific drawable from the mask, if it only contains copies? Well... the clipping mask already provides a way to iterate the drawables...
Not really needed.... there isn't really anything to break that won't break during compilation of CSFML since it is just a thin wrapper. All functionality is included within SFML.
It would be possible to add a function to each module to redirect the output into a single stream. Trouble with that approach is that if SFML is dynamically linked...