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

Author Topic: more views problem  (Read 993 times)

0 Members and 1 Guest are viewing this topic.

CreaM

  • Newbie
  • *
  • Posts: 36
    • View Profile
more views problem
« on: April 08, 2014, 07:26:45 pm »
Hello, iv got two views, when i use just one its ok. But when i use both it apperars just one...
sf::View tools;
        tools.setViewport(sf::FloatRect(0.5f, 0, 0.5f, 1));
        tools.setCenter(0, 0);
        tools.zoom(0.05f);

        sf::View clasic;
        clasic.setViewport(sf::FloatRect(0, 0, 1, 1));
        clasic.setCenter(0, 0);
 
-from beginning of main(), and than window.setView(clasic);window.setView(tools);in loop.
in pixel 0, 0, there is rect. shape and it apears just in tools view...
Do you know where is mistake?
Thanks
   
      

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10913
    • View Profile
    • development blog
    • Email
Re: more views problem
« Reply #1 on: April 09, 2014, 01:32:47 am »
Do you know where is mistake?
Not reading the view tutorial? ;)

You set a view, then you draw the related objects, then you set the other view and you draw the other objects. How else would one know what to draw where?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/