Converted PlainTexture2D to TextureFactory.