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

Author Topic: when to open new rendervindow?  (Read 3250 times)

0 Members and 1 Guest are viewing this topic.

paupav

  • Full Member
  • ***
  • Posts: 156
    • View Profile
    • Email
when to open new rendervindow?
« 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

G.

  • Hero Member
  • *****
  • Posts: 1590
    • View Profile
Re: when to open new rendervindow?
« Reply #1 on: August 21, 2014, 03:23:42 am »
Why don't you use the same window? :p

paupav

  • Full Member
  • ***
  • Posts: 156
    • View Profile
    • Email
Re: when to open new rendervindow?
« Reply #2 on: August 21, 2014, 01:09:32 pm »
How would I do that if I wanna split code in few functions?

MadMartin

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: when to open new rendervindow?
« Reply #3 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"!

AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: when to open new rendervindow?
« Reply #4 on: August 21, 2014, 02:08:51 pm »
You should take a look at this example, maybe it will help you to understand why you don't need "2" windows in your case. (Just switch states/screens)



AlexAUT

paupav

  • Full Member
  • ***
  • Posts: 156
    • View Profile
    • Email
Re: when to open new rendervindow?
« Reply #5 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
« Last Edit: August 21, 2014, 09:28:06 pm by paupav »

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: when to open new rendervindow?
« Reply #6 on: August 21, 2014, 09:19:06 pm »
« Last Edit: August 21, 2014, 09:25:18 pm by zsbzsb »
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

paupav

  • Full Member
  • ***
  • Posts: 156
    • View Profile
    • Email
Re: when to open new rendervindow?
« Reply #7 on: August 21, 2014, 09:28:50 pm »
Sorry, bad habit.

 

anything