I am writing some code for a research project. I used FLTK to create a simple GUI with a few buttons, a couple of boxes, each of them is used to draw with openGL.
Everything worked fine until yesterday.
I have no clue why this is happening. But when I add the following code to the drawing function of one of the openGL areas, most of the Windows XP SP 2 icons disappear, the top bar of each opened window disappear, even the taskbar at the bottom looses all the icons…
This is the code:
vector<Face*>::iterator iter;
for(iter = gui->app->model->faces->begin(); iter < gui->app->model->faces->end(); iter++) {
Face *face = *iter;
Vertex *v0 = gui->app->model->vertices->at(face->vertices->at(0));
glColor4f(1.0f,1.0f,1.0f,1.0f);
glBegin(GL_TRIANGLES);
glNormal3f(face->nx,face->ny,face->nz);
glVertex3f(v0->x,v0->y,v0->z);
for(int vi=1; vi<face->vertices->size(); vi++) {
Vertex* curr = gui->app->model->vertices->at(face->vertices->at(vi));
glNormal3f(face->nx,face->ny,face->nz);
glVertex3f(curr->x,curr->y,curr->z);
}
glNormal3f(face->nx,face->ny,face->nz);
glVertex3f(v0->x,v0->y,v0->z);
glEnd();
}
If I comment out this code, everything works fine.
As a further note, this code, which simple goes through a vector of Face objects (triangles) and draws them on one of the two openGL boxes, worked fine in a previous project…
Has anyone ever seen their Windows icons disappear? Any clue of what is happening?