SFML community forums

General => General discussions => Topic started by: prchakal on August 12, 2012, 10:56:16 am

Title: SFML2 and Box2D Debug Draw
Post by: prchakal on August 12, 2012, 10:56:16 am
Hi,

Im searching for a debug draw for SFML2 and Box2D 2.2.1, because i only find old versions on DebugDraw.

Some problems on old classes:

sf::Shape polygon;  <- Shape cannot be created more, it is protected
polygon.AddPoint <- Add point to poligon dont work :*

the correct class name is: b2Draw not b2DebugDraw

Can anyone share it?
Title: Re: SFML2 and Box2 Debug Draw
Post by: eXpl0it3r on August 12, 2012, 11:04:18 am
What are you talking about?
What is a DebugDraw? If you've already some code it should be quite easy to port it, so you'd need to post it here.
Don't assume everyone knows what you're trying to do. ;)
Title: Re: SFML2 and Box2 Debug Draw
Post by: prchakal on August 12, 2012, 11:09:40 am
On title have BOX2D, and debug draw is a feature of it.
Title: Re: SFML2 and Box2D Debug Draw
Post by: Walker on August 12, 2012, 12:14:50 pm
It's really not a difficult class to implement and the one you've found working in SFML version x will be trivial to port to whatever version you're using.

If you need help porting that code, point us to the code and tell us which part is giving you trouble.
Title: Re: SFML2 and Box2 Debug Draw
Post by: eXpl0it3r on August 12, 2012, 03:42:31 pm
On title have BOX2D, and debug draw is a feature of it.
I see...
You should always provide enough information, e.g. a link to that class/manual/etc. Because if I now want to find out what exactly you're talking about I'd have to search for it...
Title: Re: SFML2 and Box2D Debug Draw
Post by: prchakal on August 12, 2012, 04:59:03 pm
Hi Walker,

Here you can get one and the required files:

https://github.com/slok/Box2D-and-SFML-demo (https://github.com/slok/Box2D-and-SFML-demo)

Path:

/src/DebugDraw.cpp
/src/DebugDraw.h
/src/Globals.h