0

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:

getEventQueue()->windowResize(newX, newY, newWidth, newHeight);     

so i used it in my code:

while (!viewer->done()) {
    viewer->frame();
    if (bConditionMet) viewer->getEventQueue()->windowResize(newX, newY, newWidth, newHeight);      
}

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?

CaptainHb
  • 13
  • 4

0 Answers0