[ODE] Drawstuff problem (no objects showing)
Martin Magnusson
mama7121 at student.uu.se
Thu Sep 4 09:43:02 2003
Hi, this problem isn't related to ODE, only to drawstuff. I've been
trying to do a minimal example with just a cylinder in the default
world, but nothing except the ground, the sky and what appears to be a
thin string of pixels with infinite length where the cylinder should be.
Basically it looks the same when I try boxes, too. Could someone be so
kind as to look at the code, or compile it, and see if I'm missing
something, or if my drawstuff-installation is broken
// Begin code
#include "../ode/include/drawstuff/drawstuff.h"
#ifdef dDOUBLE
#define dsDrawCappedCylinder dsDrawCappedCylinderD
#endif
void start()
{
float xyz[3] = {5, 5, 10};
float hpr[3] = {0, -90, 0};
dsSetViewpoint( xyz, hpr );
}
void command( int cmd )
{}
void simLoop( int pause )
{
float pos[3] = {5, 5, 5};
float rot[3] = {0, 0, 0};
dsDrawCappedCylinder( pos, rot, 1, 1 );
}
int main( int argc, char** argv )
{
dsFunctions fn;
fn.version = DS_VERSION;
fn.start = &start;
fn.step = &simLoop;
fn.command = &command;
fn.stop = 0;
fn.path_to_textures = "./textures";
dsSimulationLoop( argc, argv, 640, 480, &fn );
return 0;
}
// end code