Thats so odd… The same code just produces this one-colored cube for me.
What Processing version are you using?