This section was moved to CreateTexture() as well.