Eine ganz stumpfe Idee wäre jetzt, im glutReshapeFunc Callback wieder glutReshapeWindow aufzurufen, um das Reshape rückgängig zu machen: Code (C++): const int WIDTH = 640; const int height = 480; void OnReshape(int w, int h) { if(w != WIDTH || h != HEIGHT) glutReshapeWindow(WIDTH, HEIGHT); } int main(int argc, char** argv) { // ... glutCreateWindow("Mein Fenster"); glutReshapeWindow(WIDTH, HEIGHT); glutReshapeFunc(OnReshape); // ... } Hab das jetzt nicht getestet, sollte aber gehen.
const int WIDTH = 640; const int height = 480; void OnReshape(int w, int h) { if(w != WIDTH || h != HEIGHT) glutReshapeWindow(WIDTH, HEIGHT); } int main(int argc, char** argv) { // ... glutCreateWindow("Mein Fenster"); glutReshapeWindow(WIDTH, HEIGHT); glutReshapeFunc(OnReshape); // ... }
--
Foren-Regeln