SFML community forums

General => General discussions => Topic started by: quasius on July 16, 2008, 07:32:29 am

Title: Render masks on roadmap and the stencil buffer
Post by: quasius on July 16, 2008, 07:32:29 am
I see that render masks to only draw to part of the screen are on the roadmap.  Will you be using the stencil buffer to accomplish this?  I was interested in using the stencil buffer for something else, but that requires requesting a stencil buffer when the rendering context is created in the OS-specific code.  I didn't want to touch that, if you'd be adding in a stencil buffer anyway.  So will you?
Title: Render masks on roadmap and the stencil buffer
Post by: Laurent on July 16, 2008, 08:39:01 am
Render masks won't use the stencil buffer, as it's not supported on 100% of the target platforms (although it is certainly on 99% of them).

It also involves an extra rendering pass, and the fact that you can't easily define a mask without an existing object.

However, requesting a stencil buffer through SFML is supported at window creation (take a look at the WindowSettings structure).