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

Author Topic: Class inheriting sf::RenderWindow properties.  (Read 1674 times)

0 Members and 1 Guest are viewing this topic.

KasHKoW

  • Newbie
  • *
  • Posts: 41
    • View Profile
Class inheriting sf::RenderWindow properties.
« on: August 08, 2011, 11:48:47 am »
Hi, I'm wondering if making a class sf::RenderWindow properties and adding a few vectors possibly of growing and sometimes depleting memory will be too expensive to actually have act as a sf::RenderWindow?

thePyro_13

  • Full Member
  • ***
  • Posts: 156
    • View Profile
Class inheriting sf::RenderWindow properties.
« Reply #1 on: August 08, 2011, 04:12:03 pm »
Could you clarify what you're wanting to do, I'm not quite sure what you mean.

Are you saying you want to inherit from RenderWindow and add a few vector members?

Or a class which has a member Renderwindow which it manages?

Or something else?

KasHKoW

  • Newbie
  • *
  • Posts: 41
    • View Profile
Class inheriting sf::RenderWindow properties.
« Reply #2 on: August 09, 2011, 03:37:45 pm »
I want to make a class derived from sf::RenderWindow. I'm not sure if that's a good idea or if I should just have something that is somewhat an addon but not sf::RenderWindow. This is because I want to add a lot of vectors and I don't know if that will slow down the sf::RenderWindow since it is somewhat the backbone or foundation of the whole program.

You know with drawing functions, opening it, manipulating it... Sending it through functions etc.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Class inheriting sf::RenderWindow properties.
« Reply #3 on: August 09, 2011, 03:47:39 pm »
Whether it is in a derived class or not, it will still be outside sf::RenderWindow itself, so it's doesn't matter.
You can have a derived class with GB of data, it makes no difference at all for the base class -- it doesn't know about this extra data.
Laurent Gomila - SFML developer

 

anything