diff --git a/stim/visualization/gl_network.h b/stim/visualization/gl_network.h index d2ddbd7..e6ef107 100644 --- a/stim/visualization/gl_network.h +++ b/stim/visualization/gl_network.h @@ -112,9 +112,9 @@ public: if (radius != sigma) // if render radius was changed by user, create a new display list glDeleteLists(dlist, 1); - if (!glIsList(dlist)) { // if dlist isn't a display list, create it - dlist = glGenLists(1); // generate a display list - glNewList(dlist, GL_COMPILE); // start a new display list + if (!glIsList(dlist)) { // if dlist isn't a display list, create it + dlist = glGenLists(1); // generate a display list + glNewList(dlist, GL_COMPILE); // start a new display list for (unsigned e = 0; e < E.size(); e++) { // for each edge in the network for (unsigned p = 1; p < E[e].size(); p++) { // for each point on that edge stim::circle C1 = E[e].circ(p - 1); @@ -125,9 +125,10 @@ public: std::vector< stim::vec3 >Cp2 = C2.glpoints(20); glBegin(GL_QUAD_STRIP); for (unsigned i = 0; i < Cp1.size(); i++) { // for every point on the circle(+1 means closing the circle) + glTexCoord1f(E[e].r(p-1)); glVertex3f(Cp1[i][0], Cp1[i][1], Cp1[i][2]); - glVertex3f(Cp2[i][0], Cp2[i][1], Cp2[i][2]); glTexCoord1f(E[e].r(p)); + glVertex3f(Cp2[i][0], Cp2[i][1], Cp2[i][2]); } glEnd(); } // set the texture coordinate based on the specified magnitude index -- libgit2 0.21.4