openGL 有些三角网格显示不出来
同样的代码,有些三角形网可以看到,有些看不到,改成线框模式可以看到,面模式看不到
代码如下
m_disLst = glGenLists(1);
glNewList(m_disLst, GL_COMPILE);
glBegin(GL_TRIANGLES);
for(size_t i = 0; i < m_tris.size(); ++i)
{
glNormal3d(m_norms[m_tris[i]].x, m_norms[m_tris[i]].y, m_norms[m_tris[i]].z);
const ZzGePoint3d& pt = m_pts[m_tris[i]];
glVertex3d(pt.x, pt.y, pt.z);
}
glEnd();
glEndList();