SFML community forums

Help => Graphics => Topic started by: paupav on August 21, 2014, 03:05:38 am

Title: when to open new rendervindow?
Post by: paupav on August 21, 2014, 03:05:38 am
So I've made a game in which at start is shown Main Menu, and when I click game start user can clearly see that one window is closing and another one opening. How do you guys get rid of that transition. Am I doing something wrong?

Here is link to my game if you don't understand what I'm talking about: http://en.sfml-dev.org/forums/index.php?topic=16130.msg115346#new
Title: Re: when to open new rendervindow?
Post by: G. on August 21, 2014, 03:23:42 am
Why don't you use the same window? :p
Title: Re: when to open new rendervindow?
Post by: paupav on August 21, 2014, 01:09:32 pm
How would I do that if I wanna split code in few functions?
Title: Re: when to open new rendervindow?
Post by: MadMartin on August 21, 2014, 02:03:34 pm
This
Why don't you use the same window? :p
and that
split code in few functions?
are totally unrelated!

Why do you think you need more than one window? Please be a bit more elaborate than "split code in few functions"!
Title: Re: when to open new rendervindow?
Post by: AlexAUT on August 21, 2014, 02:08:51 pm
You should take a look at this example (https://github.com/eXpl0it3r/SmallGameEngine), maybe it will help you to understand why you don't need "2" windows in your case. (Just switch states/screens)



AlexAUT
Title: Re: when to open new rendervindow?
Post by: paupav on August 21, 2014, 09:15:09 pm
Thanks, but there isn't as much explanation as I need :).
This tutorial seems nice : https://github.com/SFML/SFML/wiki/Tutorial:-Basic-Game-Engine
Title: Re: when to open new rendervindow?
Post by: zsbzsb on August 21, 2014, 09:19:06 pm
Must I repeat myself again? (http://en.sfml-dev.org/forums/index.php?topic=16145.msg115458#msg115458)
Title: Re: when to open new rendervindow?
Post by: paupav on August 21, 2014, 09:28:50 pm
Sorry, bad habit.