Worked on implementation of OptimalSizeForTexture().