drawing code for solid and wired now shared for all objects