Simple Problems

OK, so here is what I have:

I started with the helloworld example, and my goal was to actually render the bodies to the screen using the debugDraw and GLUT.

So I started with the hello World example. I then created a GLUT window, so far so good. Then I looked at the manual and it said in order to use the debugDraw, I needed to first create the class (I just copied the testbed's files), then create a debugDraw variable, then say

Code:
m_world.SetDebugDraw(m_debugDraw);


By the way, I have all this besides the debugdraw class in one file. I'm not a very experienced c++ programmer, so what's the difference between
Code:
m_world->SetDebugDraw
and
Code:
m_world.SetDebugDraw


In my program, the latter was the one that worked. So I have everything working, i run the program, and I get:
Image

I'm running in Xcode on Mac OS 10.5.6.
What is wrong?

Here is my main file: http://www.2shared.com/file/5253362/545fe9e6/HelloWorld.html
(The download link is in the bottom right corner) :p

Thanks so much,
Kcaz
There are soo many people here who know this, can someone please help? All I'm looking for is a simple world with debug draw.

Ok sorry that kinda came out wrong. Anyway how do people understand the code? I mean I get what everything does, I just don't get the simplest thing. I think it would be very very useful to include the hellowolrd, and then the helloworld again but with only the simplest debug drawing. What do you think?
Did you forget to add the Render.cpp file to the project? Leaving this file out would cause the code to compile, but produce a link error because the object file was never created for this source.
Nope :p I got both render.h and render.cpp, allthe files from the download of box2D, plus the main file I showed you. What do you think could be wrong? Can anyone quickley demonstrate how to use Glut to draw a body please?
It's also possible that you haven't linked to the box2D library (this is different to including the box2d.h header file in your source)

Edit: FYI - I was able to compile and link your code successfully under MSVC 2008 (though the resulting program is just a blank window).
Sorry I'm on my iPod right now, but I think the debugdraw is not in that file. See if right before the game loop the debugdraw is set.

Btw did u look at the code? What do you think. It would be so so so helpful if someone could create just the simplest GLUT rendering for the hello world exaple. Is there something I'm missing and that would be really hard?

Anyways thanks for the replys and maybe we can find something

EDIT: OK the problem was the render files were in the wrong place. Anyway it didn't work, but I think it has something to do with the way I set up GLUT. If you no something about how to do it, can you help me?

Thanks so much,
Kcaz
Woot!!!! I got it to work. All I needed was to put the world step in the display function :p

Thanks so much for all your help!!!

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