So I try to pass an sf::RenderWindow by reference to my class constructor. When I run sf::RenderWindow.Draw(myShape); i get no errors, but nothing appears in the render window.
class Board
{
public:
Board(sf::RenderWindow &App);
}
Board::Board(sf::RenderWindow &App)
{
sf::Shape myShape= sf::Shape::Rectangle(0, 0, 100, 100, sf::Color(0, 0, 0));
App.Draw(myShape);
}
//in main
sf::RenderWindow App(sf::VideoMode::GetMode(0), "Render Window");
Board gameBoard(App);
So how do can I draw to the renderwindow through reference like this?