this avoids issues with abysmal gl_vbo 1 performance on NVIDIA cards
(which seem to use a software fallback for drawing lines for some
reason)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7164
d7cf8633-e32d-0410-b094-
e92efae38249
qglBegin(GL_LINES);
for (k = 0;k < surface->num_triangles;k++, elements += 3)
{
- qglArrayElement(elements[0]);qglArrayElement(elements[1]);
- qglArrayElement(elements[1]);qglArrayElement(elements[2]);
- qglArrayElement(elements[2]);qglArrayElement(elements[0]);
+#define GLVERTEXELEMENT(n) qglVertex3f(rsurface_vertex3f[elements[n]*3+0], rsurface_vertex3f[elements[n]*3+1], rsurface_vertex3f[elements[n]*3+2])
+ GLVERTEXELEMENT(0);GLVERTEXELEMENT(1);
+ GLVERTEXELEMENT(1);GLVERTEXELEMENT(2);
+ GLVERTEXELEMENT(2);GLVERTEXELEMENT(0);
}
qglEnd();
CHECKGLERROR