glut - how to set the window size

what im trying to do is keep the window size the same even if the user trys to change it, but what is a function that will set the window size? not

glutInitWindowSize

but in the callback for glutReshapeFunc i just want it to snap back to 300,300. i thought it was glutReshapeWindow, but that is not working…

You must be doing something else wrong then …
Maybe post some code?

4.8 glutReshapeWindow
[b]
4.8 glutReshapeWindow

glutReshapeWindow requests a change to the size of the current window.

Usage

void glutReshapeWindow(int width, int height);

width
New width of window in pixels.
height
New height of window in pixels.

Description

glutReshapeWindow requests a change in the size of the current window. The width and height parameters are size extents in pixels. The width and height must be positive values.

The requests by glutReshapeWindow are not processed immediately. The request is executed after returning to the main event loop. This allows multiple glutReshapeWindow, glutPositionWindow, and glutFullScreen requests to the same window to be coalesced.

In the case of top-level windows, a glutReshapeWindow call is considered only a request for sizing the window. The window system is free to apply its own policies to top-level window sizing. The intent is that top-level windows should be reshaped according glutReshapeWindow’s parameters. Whether a reshape actually takes effect and, if so, the reshaped dimensions are reported to the program by a reshape callback.

glutReshapeWindow disables the full screen status of a window if previously enabled. [/b]

I think that you more better use

glutInitWindowSize

but u first should make the setSizeWindows procedure ( void ), that set the int width, int height, so after the procedur execute , then the procedure will call glutInitWindowSize this is call when u want to make your own picture or sometheing that u want to make.
best regard Hendra_Keren_Dab :smiley: