resize osg viewer window dynamically #1199
-
i want to resize osg viewer window dynamically based on an external event like pressing 'a' key on keyboard. through reading the Veiwer.cpp codes in osg core, i found this line of code for resizing window: so i used it in my code:
but when i call this function it seems that it is ineffective (window size and location doesn't change) . so the question is how can i do this job properly? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The EventQueue is for recording events sent from the windowing system, it doesn't have any actions associated with, so eventQueue->windowResize(..) just say that a window resize event has happened. If you you want to resize a window then you should call window->setWindowRectange(x,y,width,height). |
Beta Was this translation helpful? Give feedback.
The EventQueue is for recording events sent from the windowing system, it doesn't have any actions associated with, so eventQueue->windowResize(..) just say that a window resize event has happened.
If you you want to resize a window then you should call window->setWindowRectange(x,y,width,height).