work with gl primitives