In my mod, I have to render many 3d wireframe boxes. There are often thousands of wireframe cubes that need to be rendered, and my existing algorithm doesn't perform well enough (~3-5 FPS on an i7-7700 + GTX 1060).
The code I currently use has the following flow (pseudocode):
startGlState(); // this initializes the GlStateManager
for (pos in coordinates){
glLineWidth(width); // width varies
drawBox(pos, color); // both vary
}
endGlState(); // this restores the GlStateManager
drawBox(pos, color){
getTessellator(); // this instatiates a tessellator
startBufferBuilding(); // this in