Reputation: 246
I'm using openGL using GLUT. I was wondering if you could change the windowsize of you're subwindow by dragging the "borders" of it by the mouse. (The borders are lines I've drawn) to mark the boundarys of the subwindow. I know you can set the initial width and height but these are constant.
I know there's a function glutReshapeFunc but this only gives you the new width and height of the window when the mainwindow is reshaped.
Or, doesn't GLUT allow you to change the size of the subwindow by the user?
Upvotes: 0
Views: 65
Reputation: 162164
I'd not bother with GLUT subwindows. Instead I'd use glViewport + glScissor + glEnable(GL_SCISSOR_TEST), to cut portions from the main window viewport and draw a few splitter lines. Make the splitter lines draggable by implementing the logic with glutMouseFunc + glutMotionFunc.
Upvotes: 3