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

Author Topic: Polygonal views  (Read 1618 times)

0 Members and 1 Guest are viewing this topic.

Tex Killer

  • Full Member
  • ***
  • Posts: 242
    • View Profile
Polygonal views
« on: December 04, 2012, 01:59:46 am »
Hi

What I want to do is a view with the shape of a polygon, so that I can cut the screen however I'd like with as many cameras I'd like (mainly for split-screen multiplayer games, but does have other uses).

I think there is currently no clean way to do this. I know I can create a RenderTexture, draw on it, then draw a vertex array using the texture, but having a better way to do this would be good.

From what I've seen, I think there is an issue on the tracker for "clipping masks" that would solve this. Is that right? What is the status on that?

Thank you very much.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Polygonal views
« Reply #1 on: December 04, 2012, 08:12:24 am »
Yes, clipping mask may solve this problem (I don't know exactly what kind of masks I'll provide). I haven't started working on this feature, since it's planned for SFML 2.x  (not 2.0).

The render-texture seems to be the better solution for now, whether you draw your scene or the mask to it.
Laurent Gomila - SFML developer