Is it possible to do any logic with gl lists, I am trying to make a wrapper class for them and I have this code in the compile function:
glNewList(model1,GL_COMPILE);
glBegin(GL_TRIANGLES);
int pos=0;
for (int i=0; i<numcmds; i++)
{
if (cmdtype[i]=='v')
{
glVertex(cmdarg[pos++],cmdarg[pos++],cmdarg[pos++]);
}
else if (cmdtype[i]=='t')
{
glTexture(cmdarg[pos++],cmdarg[pos++]);
}
}
glEnd();
glEndList();
where cmdtype is an array containing either 'v' or 't' specifying whether a vertex of a texture or a shape is being drawn. (I will add more functionality later (EG: Normals, Quads, Colours). The problem is that when I use CallLists on model1 I get a nothing drawn. Does this mean that I cannot have any logic at all between glNewList and glEndList?