SFML community forums

Help => Graphics => Topic started by: Putarda on November 01, 2016, 01:51:07 am

Title: Is it possible to create class which inheritance sf::Drawable and which can be..
Post by: Putarda on November 01, 2016, 01:51:07 am
Is it possible to create class which inheritance sf::Drawable and which sf::Drawable can be overwritten by an sfml Drawable class for example sf::CircleShape?

If so, would it look like this?
sf::RectangleShape s;

sf::Drawable* f = &s;

Object* d = &f; //My class which inhertiance sf::Drawable
Title: AW: Is it possible to create class which inheritance sf::Drawable and which can be..
Post by: eXpl0it3r on November 01, 2016, 04:33:02 am
Am I understanding you right, that you basically want a base class to sf::Drawable? You can't achieve that by inheriting from sf::Drawable.