A simple and flexible photonic approach to generating a triangular microwave waveform using a single integrated polarization-multiplexing dual-drive Mach-Zehnder modulator (PM-DMZM) and a polarizer is proposed and demonstrated, which needs no specific large modulation indices or an optical filter. In the proposed method, one sub-Mach-Zehnder modulator (MZM) in the PM-DMZM is driven by a fundamental frequency, which generates an optical signal composed of an optical carrier and a + 1st-order sideband along one polarization direction; and the other sub-MZM is driven by a frequency tripled signal, generating an optical carrier and a -1st-order sideband along the orthogonal polarization direction. By adjusting the polarization direction of the polarizer following the PM-DMZM, which changes the power ratio of the two sidebands, optical intensity with expression corresponding to the Fourier expansion of a triangular-shaped waveform is obtained. Different from the previously reported approaches, neither specific large modulation index nor optical filtering is required, which guarantees a large operational frequency range and improved robustness. A proof-of-concept experiment is carried out. 5-GHz triangular-shaped waveform signals are successfully generated with different modulation indices.