I watched the video2 times, the first time I just copied the source code, this time I actually followed along and coded, but I had a hard time actually drawing the figure. Based off of the video https://www.youtube.com/watch?v=izKAvSV3qk0 (how do I replace the text with a url having blue text?)
I coded along, mostly understanding. Then in the DisplayList rendering code, I’m not sure what I did wrong, and I’m clueless as to what it does. In the source code he uses this:
for (Model.Face face : m.getFaces()) {
Vector3f n1 = m.getNormals().get(face.getNormalIndices()[0] - 1);
glNormal3f(n1.x, n1.y, n1.z);
Vector3f v1 = m.getVertices().get(face.getVertexIndices()[0] - 1);
glVertex3f(v1.x, v1.y, v1.z);
Vector3f n2 = m.getNormals().get(face.getNormalIndices()[1] - 1);
glNormal3f(n2.x, n2.y, n2.z);
Vector3f v2 = m.getVertices().get(face.getVertexIndices()[1] - 1);
glVertex3f(v2.x, v2.y, v2.z);
Vector3f n3 = m.getNormals().get(face.getNormalIndices()[2] - 1);
glNormal3f(n3.x, n3.y, n3.z);
Vector3f v3 = m.getVertices().get(face.getVertexIndices()[2] - 1);
glVertex3f(v3.x, v3.y, v3.z);
}
(Calm your tits, I used glBegin/End glNewLists…)
And since I was coding along, I ended up with this:
what he did but I deleted it lol… Let’s just say if I typed exactly what he did in the vvideo should it work? I’m using the classes from episode 19 also but I don’t understand the source code. ??? ??? ??? ??? ??? ??? ??? ???