Box2D simple rendering

Ok so Kcaz is here again, and this time I've learned about GLUT, and I already know box2D from flash. However, I don;t know how to combine them. There are no tutorials what so ever, and the sample code isn't much help. They should at least include the hello world example with SOME GLUT rendering.

So I have searched google, but found nothing on how Box2D uses OpenGL and GLUT to render the images. AS far as I can guess, I would think you could draw shapes for an object, then have it follow the invisible objects position.

In Flash, the debug draw is included, and all you have to do tell Flash you're using Box2D debug draw, then add the bodies to use debug draw. How do you do it in C++?
There is a TestBed with sample rendering. Here's a screenshot.
It's in Examples/.
Yes, I know, but just for the very basics.
I think it would be helpful to have in the helloWorld example, one object rendered, because I really don't understand what is necessary to draw the objects, and what is extra.
Ahha 😀. I figured out the uses of the framework main files 😀.

The only thing I'm stumped on is the test.cpp file. I don't know how to take away the file and the main.cpp file to make just a single test entry. I don't want to use the test.cpp file, and just create test files like they do in the testbed, I want to just have one file with all the things test.cpp takes care of, plus the body info, and have it inserted into the main.cpp file.

Sorry if this didn't make much sense, but if you can would you help me please?
No. The TestBed is not meant for you to chop open and build your program on. It is an EXAMPLE of
a) How to use Box2D for various tasks
b) How to get debug draw working under GLUT.
You are expected to build the other parts of your program for yourself, including non-debug draw. The engine has not part in this, and thus there is little advice I can give you.

The AS3 port is a little more forgiving, partly as there is a canonical way to draw to the screen. But in C++, you should figure display out for yourself, and it's not easy. But no one says C++ is an easy language 😕

Original thread: https://box2d.org/forum/viewtopic.php?t=2781