2 개의 배열 (법선과 정점 중 하나)을 말하고 정점과 법선 사이에 삽입 된 인덱스 버퍼를 사용할 수있을 때 glDrawElements 메서드를 사용할 수 있습니까?인덱스가 정점과 법선에 적용된 glDrawElements
예 : 큐브
// 8 of vertex coords
GLfloat vertices[] = {...};
// 6 of normal vectors
GLfloat normals[] = {...};
// 48 of indices (even are vertex-indices, odd are normal-indices)
GLubyte indices[] = {0,0,1,0,2,0,3,0,
0,1,3,1,4,1,5,1,
0,2,5,2,6,2,1,2,
1,3,6,3,7,3,2,3,
7,4,4,4,3,4,2,4,
4,5,7,5,6,5,5,5};
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_NORMAL_ARRAY);
glVertexPointer(3, GL_FLOAT, 0, vertices);
glNormalPointer(3, GL_FLOAT, 0, normals);
glDrawElements(GL_QUADS,...);//?see Question
[여러 인덱스로 렌더링 메쉬] 가능한 중복 (0120-555-003) –