- if (mesh->data_color4f)
- GL_Color(mesh->data_color4f[num*4+0], mesh->data_color4f[num*4+1], mesh->data_color4f[num*4+2], mesh->data_color4f[num*4+3]);
- qglVertex2f(mesh->data_vertex3f[num*3+0], mesh->data_vertex3f[num*3+1]);
+ int num;
+ CHECKGLERROR
+ qglBegin(GL_LINE_LOOP);
+ for (num = 0;num < mesh->num_vertices;num++)
+ {
+ if (mesh->data_color4f)
+ GL_Color(mesh->data_color4f[num*4+0], mesh->data_color4f[num*4+1], mesh->data_color4f[num*4+2], mesh->data_color4f[num*4+3]);
+ qglVertex2f(mesh->data_vertex3f[num*3+0], mesh->data_vertex3f[num*3+1]);
+ }
+ qglEnd();
+ CHECKGLERROR