SFML community forums

Help => Graphics => Topic started by: Akatray on November 05, 2011, 02:29:58 am

Title: How to use stencil buffer.
Post by: Akatray on November 05, 2011, 02:29:58 am
I am porting gui from my older project and it uses stencil buffer to hide text that is out of element's region.
Title: How to use stencil buffer.
Post by: Laurent on November 05, 2011, 10:32:37 am
And?
Title: How to use stencil buffer.
Post by: Groogy on November 05, 2011, 08:41:50 pm
I guess he wants to have the stencil buffer accessible trough pure SFML interface. Otherwise if using gl* functions it should still work about the same I guess?

Though a similar effect could be done if we have the possibility to render to multiple buffers like I suggested for SFML 2.0
Not sure just talking from ideas from the top of my head. I'd have to check how my volume shadows work again to be 100% certain if it can work like this. Thinking like this because the stencil buffer is really just another buffer that we can write or read to just that it represents some other kind of data.

Note: Of course it wouldn't be as smooth and automatic as using the stencil buffer but it would work I think.
Title: How to use stencil buffer.
Post by: Akatray on November 06, 2011, 10:27:27 pm
so there is no way using stencil buffer without using pure gl?  :(
Title: How to use stencil buffer.
Post by: Laurent on November 06, 2011, 11:49:48 pm
Nop, but clipping masks will soon be implemented (maybe in SFML 2.1).