Templarc
25-11-2009 16:35:29
Hi,
I have some troubles dealing with multiple viewports in ogre and using QuickGUI at the time. Actually I managed to do what I wanted to do, but I wonder if there is not a better way to do it...
In my Ogre window, I have perfectly split the window with two viewports (same RenderManager anyway). i want to display a button on each viewport, and be able to click on one or the other.
First viewport : a sheet. Position 0:0 in the viewport and size the size of the viewport (window width/2, window height).
Second viewport : a sheet. Position 0:0 in the viewport and size the size of the viewport (window width/2, window height).
My problem is that the sheet of the second viewport is at the position (0:0) in the viewport, but at the absolute position (window width/2, window height) in my Ogre window.
So here is my question : is there a way to say that in absolute position the sheet is at the position (window width/2, window height) in my Ogre window. it's because when I inject the mouse position events in QuickGUI, when it's in the first viewport (position x < window width/2) then it displays the same cursor on the sheet of the second viewport.
The only solution I found was to inject the position x of the mouse less window width/2 for the second GUI manager...
If someone can help me...
Cheers
I have some troubles dealing with multiple viewports in ogre and using QuickGUI at the time. Actually I managed to do what I wanted to do, but I wonder if there is not a better way to do it...
In my Ogre window, I have perfectly split the window with two viewports (same RenderManager anyway). i want to display a button on each viewport, and be able to click on one or the other.
First viewport : a sheet. Position 0:0 in the viewport and size the size of the viewport (window width/2, window height).
Second viewport : a sheet. Position 0:0 in the viewport and size the size of the viewport (window width/2, window height).
My problem is that the sheet of the second viewport is at the position (0:0) in the viewport, but at the absolute position (window width/2, window height) in my Ogre window.
So here is my question : is there a way to say that in absolute position the sheet is at the position (window width/2, window height) in my Ogre window. it's because when I inject the mouse position events in QuickGUI, when it's in the first viewport (position x < window width/2) then it displays the same cursor on the sheet of the second viewport.
The only solution I found was to inject the position x of the mouse less window width/2 for the second GUI manager...
If someone can help me...
Cheers