is it possible to create a fixed size glut window?

igal k picture igal k · May 21, 2012 · Viewed 9.7k times · Source

is it possible to create a fixed size window using glut, so any changes with the window's dimensions will be disregarded.

it's kinda too late for me switching back to SDL or anything similar.

Answer

mouse picture mouse · Mar 13, 2014

Apparently, it's not possible in a legit way, but you can use glutReshapeWindow inside your glutReshapeFunc-callback, to snap it back right after release of mouse. It's quite effective, and to my knowledge the best solution. Only tested with freeglut:

glutReshapeFunc(resize);

void resize(int width, int height) {
    // we ignore the params and do:
    glutReshapeWindow( 800, 600);
}