A variety of methods have been developed in the last years to generate vector beams. In this work we will present some techniques that we have developed for the efficient and compact generation of arbitrary polarized vector beams. They are based on the use of geometric-phase elements combined with liquid-crystal on silicon (LCOS) spatial-light modulators (SLM) in a common-path architecture. LCOS-SLMs were used to encode a phase-only diffractive mask that encodes complex functions with high diffraction efficiency. We demonstrate the generation of arbitrary scalar modes and vector beam modes.