hi i'm new at pd, i'm trying to do a external using GEM, but i have no idea how to start, i tried to search for any tutorial but i didnt find anyone...

if anyone can write some simple code for me i'm very thankfull

what i'm trying to do first of all is something like this:

for(int y=0 ; y< GEMwidth; y++)
   for(int x=0; x<GEMheight; x++)
    {
       glColor3f(0, 0, 1);
       glBegin(GL_POINTS);
       glVertex2i(x,y);
       glEnd();
   }

but on render of GEM in pd

a simple tutorial will help me a lot... thx