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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - xavator4

Pages: [1]
1
Hi,

First of all, this is my first time working with SFML or any API in general, so please, bear with me!

Anyways, here is my question. I am building a board game using SFML. The board itself is loaded as a .jpg texture and displayed in the start. However, since it's a board game, there are 'pieces' that represent players. Everytime a move is made, that piece has to be moved accordingly. However, to do this, I have to call the sf::RenderWindow::display() method again. (Ik this is a non static member, just writing it like this to clear stuff out).

The problem is that first, I call the display() method to initially print the board and the 'pieces', however, when a move is made, those pieces have to move and when I move them, the board disappears leaving behind pieces. I understand that this is because sf::RenderWindow::display() has been called again but what is the workaround for me in this case? Your help will greatly be appreciated!

Pages: [1]
anything