PDA

View Full Version : glutCreateSubWindow



KC
11-02-2000, 02:56 PM
Does anybody know what are the exact parameters of glutsubCreateWindow? What do they mean and can you give examples? I've tried it but the subwindows didn't come out in the right spot. I'm not sure if I have wrong understanding of the parameters that should be passed.
thanks

Antonio
11-02-2000, 03:19 PM
The following code should show you how to use the glutCreateSubWindow function:

winMain= glutCreateWindow("My Main window");
winSub = glutCreateSubWindow(winMain, xtop, ytop, width, height);

The first parameter of glutCreatesubWindow is just the index of the parent window. As you know glutCreateWindow returns an integer. You must use that integer in glutCreatesubWindow to tell who is the parent window.

hope this helps,

Antonio www.fatech.com/tech (http://www.fatech.com/tech)

KC
11-03-2000, 09:02 AM
Thanks!

I'm just confused about the xtop, ytop, width and height parameters. I've tried it and the subwindows doesn't come out in the right spot. Is there supposed to be a specific ratio between the size of the main window and the subwindows? It's just that my subwindows aren't appearing at the right location and some aren't there at all.

thanks

Antonio
11-03-2000, 04:50 PM
There are two possibilities, the coordinates are either relative to the main window or to the client area top left corner.

The specs say that the coordinates are relative to the main window .

Antonio www.fatech.com/tech (http://www.fatech.com/tech)

KC
11-04-2000, 02:31 PM
Another question related to this one ...

Is there a limit to the number of subwindows a certain window can have? BEcause I am creating 5 subwindows in one big window. DUring the initial display, only 2-3 of the subwindows are displayed properly. The others are distorted images. I have to reshape the window to be able to show all the subwindows.

Anyone has any idea why this happens?
thanks