updated to work with Qt 5.2 and added light attenuation