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

Pages: [1]
1
Logged in to let you know your project template is working. Thank you for sharing, you saved me some time (:

2
SFML wiki / Question about a tutorial on github [DrawableGroup]
« on: September 23, 2012, 07:24:29 pm »
I am starting a new project but following : https://github.com/SFML/SFML/wiki/TutorialDrawableGroup to group my drawables.

I've encountered an error in the draw code and believe I have the proper solution but since I am just beginning my game I have no way to test this(at least on this PC for the next 6 hours or so)

In particular to the draw code...

I believe the appropriate code should be different. I think it requires a const_iterator and the draw code requires an extra dereference operator.

Code: [Select]
void Group::render(sf::RenderTarget & rt) const
{
for(std::vector<sf::Drawable*>::const_iterator i = begin(); i!= end(); ++i)
rt.draw(**i);
}

If this seems like a valid solution it would probably be best to update the tutorial or other people may get confused as well.

Pages: [1]
anything