I’m in the process of trying to render a few meshes in OpenGL for an assignment. I’m rendering the object like so:
void display (void){
glClear(GL_COLOR_BUFFER_BIT);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
gluLookAt(0.0,0.0,0.0,5.0,5.0,5.0,0.0,1.0,0.0);
glutWireCube(size)
glBegin(GL_TRIANGLES);
for (i = 0; i < numtriangles; i++){
for (j = 0; j < 3; j++){
glVertex3dv(&vertices[triangles[i*3+j]*3]);
}
glEnd();
}
I’m getting an image that does this: https://imgur.com/a/PhTXk
I’d really appreciate any help in figuring out what the heck is going on. I hope this post is within rules. I’m really having a tough time getting this working.