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

Author Topic: Using views for splitscreen, minimap or similar (1.6)  (Read 2784 times)

0 Members and 1 Guest are viewing this topic.

Tenry

  • Full Member
  • ***
  • Posts: 120
  • Experienced Programmer
    • View Profile
    • Simon-Burchert.com
Using views for splitscreen, minimap or similar (1.6)
« on: September 28, 2011, 06:11:56 pm »
Is there any way to use views that only draw at a certain portion on the render target? I have searched the forums, but I don't understand the things I find or they use OpenGL functions.
I currently understand views in sfml like that, that they will always cover the whole screen. Let's say, we want to draw a small minimap in the top right corner. But no matter what I do, the minimap will cover the whole window, not letting me see what in the actual world is.

Or do I misunderstand something?
Please note that my previous display name was "Shy Guy".

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Using views for splitscreen, minimap or similar (1.6)
« Reply #1 on: September 28, 2011, 06:14:01 pm »
Yes, the viewport specifies the part of the window to which things are rendered.

Viewports are a SFML 2 feature, see here.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Tenry

  • Full Member
  • ***
  • Posts: 120
  • Experienced Programmer
    • View Profile
    • Simon-Burchert.com
Using views for splitscreen, minimap or similar (1.6)
« Reply #2 on: September 28, 2011, 06:22:53 pm »
Quote from: "Nexus"
Yes, the viewport specifies the part of the window to which things are rendered.

Viewports are a SFML 2 feature, see here.

Okay, thanks for the hint! :)
I'm looking forward to 2.0, it seems to have so many new useful features.
Please note that my previous display name was "Shy Guy".

 

anything