0

我正在使用 GLUT 使用 openGL。我想知道您是否可以通过用鼠标拖动它的“边框”来更改子窗口的窗口大小。(边界是我画的线)来标记子窗口的边界。我知道您可以设置初始宽度和高度,但这些是恒定的。

我知道有一个函数 glutReshapeFunc 但这只会在主窗口被重塑时为您提供窗口的新宽度和高度。

或者,GLUT 不允许您更改用户子窗口的大小吗?

4

1 回答 1

3

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.

于 2013-01-15T20:24:52.103 回答