Judging by your updated question, I think this pseudo-code should get you pointed in the right direction. It seems to me that all you want to do is offset the x and y coordinates of your point by a constant amount, so an array is the perfect way to do this.
const vec3 offset [4] =
vec3 [] ( vec3 (-0.5, 0.5, 0.0),
vec3 ( 0.5, 0.5, 0.0),
vec3 ( 0.5, -0.5, 0.0),
vec3 (-0.5, -0.5, 0.0) );
const vec2 tc [4] =
vec2 [] ( vec2 (0.0, 0.0),
vec2 (1.0, 0.0),
vec2 (1.0, 1.0),
vec2 (0.0, 1.0) );
void
main (void)
{
int i;
for (i = 0; i < gl_in.length (); ++i) {
gl_Position = projection * view * model * (gl_in [i].gl_Position + offset [0]);
tex_coord = tc [0];
EmitVertex ();
gl_Position = projection * view * model * (gl_in [i].gl_Position + offset [1]);
tex_coord = tc [1];
EmitVertex ();
gl_Position = projection * view * model * (gl_in [i].gl_Position + offset [2]);
tex_coord = tc [2];
EmitVertex ();
gl_Position = projection * view * model * (gl_in [i].gl_Position + offset [3]);
tex_coord = tc [3];
EmitVertex ();
}
EndPrimitive ();
}