I'm trying to make a custom scene node for authoring meshes. I'm not very familiar with how OpenGL or DirectX work so I'm not sure what it's supposed to look like in their respective API either.
I'd like to draw a U shape. To start out testing I was using the line loops to make sure the shapes were closed. I've followed the the tutorial on creating the class and I added my own function for adding vertices. It seemed to be working fine, but then I switched to drawing with EDT_POLYGON and I'm getting weird results (white shape):

When trying to place points for the U shape the poly draws in weird ways. It looks like it skipped a face and one of them is cutting across the opening.
I'm doing something wrong, but the documentation is pretty sparse and I haven't able to find any code examples using EDT_POLYGON. I've tried to read how OpenGL uses it, but they are talking about buffers and bindings and I get a bit lost. Am I approaching this problem wrong or are there maybe other examples available of something similar?