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

Author Topic: SFML2 and Box2D Debug Draw  (Read 7944 times)

0 Members and 1 Guest are viewing this topic.

prchakal

  • Full Member
  • ***
  • Posts: 142
    • View Profile
SFML2 and Box2D Debug Draw
« 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?
« Last Edit: August 12, 2012, 11:09:50 am by prchakal »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: SFML2 and Box2 Debug Draw
« Reply #1 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. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

prchakal

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: SFML2 and Box2 Debug Draw
« Reply #2 on: August 12, 2012, 11:09:40 am »
On title have BOX2D, and debug draw is a feature of it.

Walker

  • Full Member
  • ***
  • Posts: 181
    • View Profile
Re: SFML2 and Box2D Debug Draw
« Reply #3 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: SFML2 and Box2 Debug Draw
« Reply #4 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...
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

prchakal

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: SFML2 and Box2D Debug Draw
« Reply #5 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

Path:

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

 

anything