Моя программа изменяет размер OGRE::RenderWindow в какое-то время и позже Я хочу получить текущий размер окна. Но когда я использую getWidth()
или getHeight()
в окне, они возвращают исходный размер окна.
Пример кода:
OGRE::RenderWindow* win;
// ... OGRE is initialized
// Window is drawn 1024x768 using size from ogre.cfg
// ... lots of code ...
// Window size is changed and it works
win->resize(800, 600);
// ... lots of code ...
// Window is still visibly 800x600, but this call
// returns 1024x768 (the original size)
int w = win->getWidth(); // Returns 1024
int h = win->getHeight(); // Returns 768
Как получить правильный размер окна?