The way you turn the triangle wave, sin wave combo into a square wave is with a comparator. The best way to get the PWM square wave output, and its complement, is to use another comparator with the inputs flipped. This gives you control of the dead time (important for H bridge circuits).