Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: How to use stencil buffer.  (Read 3274 times)

0 Members and 1 Guest are viewing this topic.

Akatray

  • Newbie
  • *
  • Posts: 12
    • View Profile
How to use stencil buffer.
« 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
How to use stencil buffer.
« Reply #1 on: November 05, 2011, 10:32:37 am »
And?
Laurent Gomila - SFML developer

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
How to use stencil buffer.
« Reply #2 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.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Akatray

  • Newbie
  • *
  • Posts: 12
    • View Profile
How to use stencil buffer.
« Reply #3 on: November 06, 2011, 10:27:27 pm »
so there is no way using stencil buffer without using pure gl?  :(

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
How to use stencil buffer.
« Reply #4 on: November 06, 2011, 11:49:48 pm »
Nop, but clipping masks will soon be implemented (maybe in SFML 2.1).
Laurent Gomila - SFML developer