[ODE] MSVC Problems again - dBoxClass not being initialized to proper value

Clay Larabie c-larabie at rogers.com
Tue Jul 16 19:55:01 2002

I've compiled ODE for msvc-dll but found that some of the examples didn't
seem to be working.
For example, the BoxStack example, among others, were not displaying
anything being dropped into the scene when I hit keys.

After testing, I figured out that the geometry was being created, but wasn't
rendering properly because dBoxClass, dSphereClass, dCCylinderClass, etc.
were not initialized to their proper values.

The code uses looks something like this to render the geometry:

int type = dGeomGetClass (g);

if (type == dBoxClass)
    //draw the box
else if(type == dSphereClass)
    //draw the sphere

But dBoxClass was an unitialized variable - something like -15898 or some
other crazy number, instead of 1.

This problem doesn't occur if I compile make the msvc static library.