Assume you would have function that renders small cube, wether it was with glBegin-glEnd or not, and task to render a 10x10 plane filled with cubes.

[pascal]var x,y: integer;
begin
for y:=0 to 9 do begin
glPushMatrix; // save current modelview matrix to stack
glTranslatef(0,y,0); // go to row start
for x:=0 to 9 do begin
RenderCube;
glTranslatef(1,0,0); // move 1 step on x-axis
end;
glPopMatrix; // load modelview matrix
end;
end;
[/pascal]