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 - blargly

Pages: [1]
1
General / Problem with sf::NonCopyable
« on: February 23, 2010, 02:32:16 pm »
Code: [Select]
LocWindow = App

Yeah that's right, I was using the above, and ObjManager was using its own independent instance of sf::RenderWindow.
Ok, just made the changes and the problem is solved, many thanks!

2
General / Problem with sf::NonCopyable
« on: February 23, 2010, 02:12:46 pm »
Code: [Select]
class ObjManager
{
public:
ObjManager(sf::RenderWindow& App);
~ObjManager();

sf::RenderWindow LocWindow;

void AddObject();
void Update();

std::list<Player>m_PlayerList;

};


Just to note Player is a class which inherits from sf::Sprite but the same issue occurs even if everything bar the constructor is commented.

3
General / Problem with sf::NonCopyable
« on: February 23, 2010, 02:05:59 pm »
I'm currently trying to put together an object manager class for game which has an update method which draws each of the sprites in the game. In order to do this, I needed an sf::RenderWindow object to be passed to my object manager and then draw each sprite.
However, when I pass my window I get the following error:

error C2248: 'sf::NonCopyable::operator =' : cannot access private member declared in class 'sf::NonCopyable'

I made sure that only references were being passed, but the same error still occurs, which I thought to be odd considering a reference isn't an actual copy.

Code: [Select]
int main()
{
    // Create main window
    sf::RenderWindow App(sf::VideoMode(800, 600), "SFML Pong", sf::Style::Fullscreen);

ObjManager OMan(App);


Code: [Select]
ObjManager::ObjManager(sf::RenderWindow& App)
{

}


Sorry if I've made some rookie errors here, I'm still a relatively new programmer, and I've just started getting into using libraries like SFML in order to implement graphics into my games.

Pages: [1]
anything