qDebug()<<"Resize to "<<width<<","<<height<<", Perspective: "<<p;
//old:
// GLInt x = 0;//The lower-left corner of the viewport rectangle, in pixels. The default is (0,0).
// GLInt y = 0;//The lower-left corner of the viewport rectangle, in pixels. The default is (0,0).
// glViewport(x,y,width,height);//The width of the viewport. When an OpenGL context is first attached to a window, width and height are set to the dimensions of that window.
glViewport(0,0,width,height);
glMatrixMode(GL_PROJECTION);
glMatrixMode(GL_PROJECTION);//from HelloGL example
glLoadIdentity();
gluPerspective(45.0,p,0.1,1000);//TODO komisch: wenn schmaler als hoch auf einmal grau.
gluPerspective(45.0,p,0.1,1000);
glMatrixMode(GL_MODELVIEW);
screenCenter=QPoint((double)width/2.0,(double)height/2.0);//lieber zu oft casten bevors nicht tut...