BasicDemo strange behaviour with one box!

Rasoul
Posts: 8
Joined: Wed Sep 05, 2012 7:03 pm

BasicDemo strange behaviour with one box!

Post by Rasoul »

I examined the example code in BasicDemo folder. I just changed the number of boxes from the default values (125) to only one box as below:

///create 125 (5x5x5) dynamic object
#define ARRAY_SIZE_X 1
#define ARRAY_SIZE_Y 1
#define ARRAY_SIZE_Z 1

Then I compiled and run the BasicDemo program. The result is really strange! The simulation is very slow and not as smooth as the original definition of ARRAY_SIZE's (which is 5 instead of 1). I noticed that the CPU usage goes up to 100%. I couldn't figure out why this happens. Can anybody explain what happens there?

OS: Ubuntu 11.04
Bullet: Ver 2.80
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: BasicDemo strange behaviour with one box!

Post by Erwin Coumans »

It is likely that your GPU's VSync is switched off.

The Glut demos simply consume all CPU resources available in that case. Usual applications either turn on VSync or have other stuff going on.