Device.c and set render states