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

Author Topic: Split window to 2 parts  (Read 3445 times)

0 Members and 1 Guest are viewing this topic.

piotrekb

  • Newbie
  • *
  • Posts: 3
    • View Profile
Split window to 2 parts
« on: December 01, 2010, 03:07:09 pm »
Hello!
I want to split my window to 2 parts: one for menu, and second for opengl rendering. What is the best way to make this in your opinion ?
And I have one more question: Can I draw sprites, when I use opengl ?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Split window to 2 parts
« Reply #1 on: December 01, 2010, 05:51:53 pm »
I think, you can find splitscreen functionality on the wiki. If you want to do it on your own, you have to use glScissor() directly in OpenGL.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

danman

  • Hero Member
  • *****
  • Posts: 1121
    • View Profile
    • Email
Split window to 2 parts
« Reply #2 on: December 01, 2010, 06:11:52 pm »
Are you using sfml 2 ?

http://www.sfml-dev.org/documentation/2.0/classsf_1_1View.htm#d4b3912a84ec5c55e84bac08abc63cd9

(I don't know if it's ok with native openGL)
Pointilleur professionnel

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Split window to 2 parts
« Reply #3 on: December 01, 2010, 06:42:00 pm »
Hmm... Is it possible to use SetViewport() multiple times per frame to achieve split screens?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

danman

  • Hero Member
  • *****
  • Posts: 1121
    • View Profile
    • Email
Split window to 2 parts
« Reply #4 on: December 01, 2010, 07:37:23 pm »
I don't know, but in the doc, it's written that a global viewport is always made, so I think there's no problem ;) .
Pointilleur professionnel

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Split window to 2 parts
« Reply #5 on: December 01, 2010, 09:22:28 pm »
Okay. If it were possible, that would certainly be nice. It would also dispense with the need of raw OpenGL ;)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything