openGL for G-code visualization

Hello everybody,
i’m using openGL with C#, it’s my first time and i find on the web an example to draw a square.
So I transform this example to read a G-code file
(G00 X0.5, G01 X6.45 Y67.5 etc.etc.)

Now I use a timer inside the form to redraw the control and inside the OnPaint event of this control I read the file to draw its content.

Every 10ms i read the file and i convert the text into coord and then i call glVertex2d with this coordinates.

Can i create put into openGL “memory” all the information about coord, color of segment and zoom and then call only “draw this object”?

Thanks

ps:sorry for my english i’m italian!!!

Ok, thanks to all… maybe my question was too simple for you!

I partially resolve my problem using List.

Now i compose my draw with a variable number of list with different rotation each other.
Can I find the max and min occupation of my drawing?

thanks to all