I’ve got a strange Problem with using Displaylists:
This piece of Code works (lets call it manuell-index-picking)
if(Nyx.drawstyle.mode == DRAWSTYLE_MODE_POINTS)
{
for(int i = 0; i < indexLIST->lenght; i++)
{
unsigned short index = indexLIST->indexlist[i];
glBegin(GL_POINTS);
glVertex3f(vtxLIST->ArrayPOSITION[index].x,
vtxLIST->ArrayPOSITION[index].y,
vtxLIST->ArrayPOSITION[index].z);
glEnd();
}
}
But Dislaylists just display strange Coordinates… Its ****ed up.
if(Nyx.drawstyle.mode == DRAWSTYLE_MODE_DISPLAYLISTS)
{
glVertexPointer(3,
GL_FLOAT,
sizeof(float)*3, // irrelevant, da highly packed. kann auch 0 sein
(const GLvoid*) &vtxLIST->ArrayPOSITION);
glEnableClientState(GL_VERTEX_ARRAY);
glDrawElements(GL_POINTS,
indexLIST->lenght,
GL_UNSIGNED_SHORT,
indexLIST->indexlist);
glDisableClientState(GL_VERTEX_ARRAY);
}
VEKTOR is a structure with 3 coordinates, indexlist is an unsigned short* containing the indeces…
plz help, id relly need this up to tomorow morning!
greetings,
Matthias Markowski