passing material and lights to cuda