Added general render initialization code.