mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 12:18:51 -05:00
Added use of frame size to multi-window test.
This commit is contained in:
parent
eb3f75e03e
commit
40f69d7abf
|
@ -60,6 +60,8 @@ int main(void)
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
|
int left, top, right, bottom;
|
||||||
|
|
||||||
windows[i] = glfwCreateWindow(200, 200, titles[i], NULL, NULL);
|
windows[i] = glfwCreateWindow(200, 200, titles[i], NULL, NULL);
|
||||||
if (!windows[i])
|
if (!windows[i])
|
||||||
{
|
{
|
||||||
|
@ -73,7 +75,10 @@ int main(void)
|
||||||
i ? 0.f : 1.f,
|
i ? 0.f : 1.f,
|
||||||
0.f);
|
0.f);
|
||||||
|
|
||||||
glfwSetWindowPos(windows[i], 100 + (i & 1) * 300, 100 + (i >> 1) * 300);
|
glfwGetWindowFrameSize(windows[i], &left, &top, &right, &bottom);
|
||||||
|
glfwSetWindowPos(windows[i],
|
||||||
|
100 + (i & 1) * (200 + left + right),
|
||||||
|
100 + (i >> 1) * (200 + top + bottom));
|
||||||
glfwShowWindow(windows[i]);
|
glfwShowWindow(windows[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user