draw: fix vertex id computation