I’ve got an annoying problem with my program. It is a modeller and you can switch between 2D and 3D rendering modes. There is no problem if you run the program with an argument to specify the current rendering method. (eg. modeller.exe -2d)
Recently I added a feature to the program which allows rendering method to be changed by a specified key. If it is pressed the following code switch to the other rendering mode:
// presume that we wanted to change from 2D to 3D //... glutDisplayFunc(display3D); glutReshapeFunc(resize3D); resize3D(); //...
The resize function is called to setup the prespective viewport instead of ortho. If I now disable the wireframe mode the objects remain wireframe. If I run with the 3D displaying mode as default then wireframe mode can be easily turned on and off. This instance occurs only if I want to switch to 3D from 2D while the modeller is running.
Which openGL command can cause that it doesn’t matter if I run gluSphere or glutWireSphere ? The result is a wireframe sphere in both cases.
The inaccurate use of glMatrixMode, glPushMatrix, glPopMatrix, glLoadIdentity was so far suspected by me but no erros found yet.
The problem consists after commenting out glPolygonMode which is also responsible for rendering objects wireframe and a set of points - as far as I know.
Please help me I am really getting out of ideas…