glBegin(GL_POLYGON);
glVertex(...); // first point
...
glVertex(...); // last point
glEnd();
In D3DIM, its not quite that simple because you have to split the poly up into triangles yourself - triangulation. This is straightforward for convex polys. Draw some convex ploygons and see how easy it is to turn them into triangle-strips for yourself! Then:
device->Begin(D3DPT_TRIANGLESTRIP,
D3DFVF_VERTEX, 0);
device->Vertex(...); // first point
...
device->Vertex(...); // last point
device->End(0);
Note that there are MUCH more efficient ways of doing this in both GL and D3D when you know what you're doing!
Concave polys are a MUCH more complicated!