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

Author Topic: Can SFML create sub-windows?  (Read 2978 times)

0 Members and 1 Guest are viewing this topic.

luthwyhn

  • Newbie
  • *
  • Posts: 4
    • View Profile
Can SFML create sub-windows?
« on: April 23, 2011, 06:44:04 pm »
I'm attempting to recreate a framework I'd written using blitting in SDL into SFML, and I've come to notice that there doesn't seem to be a way to create sub-windows in SFML.  Basically what I'm looking for is a way to logically subdivide a window (recursively as the case may be) such that you can have a local coordinate system within the sub-window for positioning sprites, and so that a sprite existing on the edge of (or outside of) the sub-window it's being rendered in will be cropped so as not to appear outside of its sub-window.

Is there truly no way to do this in SFML?  It seems like a pretty basic and essential requirement for many projects, so I'm wondering if I'm just not finding it because it's called something else.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Can SFML create sub-windows?
« Reply #1 on: April 23, 2011, 07:23:16 pm »
Can't you achieve this using sf::View and its viewport?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

luthwyhn

  • Newbie
  • *
  • Posts: 4
    • View Profile
Can SFML create sub-windows?
« Reply #2 on: April 23, 2011, 08:15:41 pm »
Aha!  This looks like it might do what I wanted.  Thanks!  I knew there had to be some way to pull it off, but I never would have called it that, so I had no idea what to search for.

 

anything