The attribute locations should be a variable somewhere instead of hardcoded here and in `getViewportQuadVertexArray`.  Perhaps `getViewportQuadVertexArray` (or a renamed function) can return the vertex array and locations.