  Given an orientable ideally triangulated $3$--manifold $M$, we define a
system of real valued equations and inequalities whose solutions can be used to
construct projective structures on $M$. These equations represent a unifying
framework for the classical Thurston gluing equations in hyperbolic geometry
and their more recent counterparts in Anti-de Sitter and half-pipe geometry.
Moreover, these equations can be used to detect properly convex structures on
$M$. The paper also includes a few explicit examples where the equations are
used to construct properly convex structures.
