[ODE] Drawstuff problem (no objects showing)
Martin C. Martin
martin at metahuman.org
Thu Sep 4 10:01:02 2003
The "rotation" parameter should be a 3x3 matrix, stored with 4 floats per
row. Look at the ODE test programs for examples.
- Martin
Martin Magnusson wrote:
>
> 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
>
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode
#################################################################
#################################################################
#################################################################
#####
#####
#####
#################################################################
#################################################################
#################################################################