fixed small visualization bugs (dereferenced empty vertex attributes)
This commit is contained in:
parent
157ba4ccfb
commit
8f2c1d543d
|
@ -746,15 +746,18 @@ void DrawPoints()
|
|||
if (nm==NMPerVert)
|
||||
{
|
||||
glEnableClientState (GL_NORMAL_ARRAY);
|
||||
if (m->vert.size() != 0)
|
||||
glNormalPointer(GL_FLOAT,sizeof(typename MESH_TYPE::VertexType),&(m->vert.begin()->N()[0]));
|
||||
}
|
||||
if (cm==CMPerVert)
|
||||
{
|
||||
glEnableClientState (GL_COLOR_ARRAY);
|
||||
if (m->vert.size() != 0)
|
||||
glColorPointer(4,GL_UNSIGNED_BYTE,sizeof(typename MESH_TYPE::VertexType),&(m->vert.begin()->C()[0]));
|
||||
}
|
||||
|
||||
glEnableClientState (GL_VERTEX_ARRAY);
|
||||
if (m->vert.size() != 0)
|
||||
glVertexPointer(3,GL_FLOAT,sizeof(typename MESH_TYPE::VertexType),&(m->vert.begin()->P()[0]));
|
||||
|
||||
glDrawArrays(GL_POINTS,0,m->vn);
|
||||
|
|
Loading…
Reference in New Issue