Daily Archives: December 31, 2011

500 Balls hitting a static box(OpenGL and ODE)

Enter “Balls from heaven”! This is an improvement to the bouncing ball application I posted before, I left it as the way I found the code snippets from multiple sample projects and tutorials, now that I’ve got the hang of it more stuff can be done. The source includes links to some sites that I’ve found important for ODE and OpenGL.

The source is in standard C++, and uses (Open)GL, GLUT and GLU. To compile on Windows with MSVC++ you’d need to edit, but for MingW you’d not need to edit(linking might be hard, I haven’t done it though). On any Linux you can compile with the following commands IF you have ODE(in the repos by the name libode), OpenGL(usually comes by default, but if you are running with prop drivers make sure the linker sees that libGL.so) GLU and GLUT make sure you’ve installed those, commands that are used to install those are in the previous post.

g++ -o balls ogl2.cc -DdDOUBLE -lGL -lGLU -lglut -lode