[DEBUG] correct OS request force redraw ==> it work now
This commit is contained in:
parent
5e65339d82
commit
4266dd1bfe
@ -633,6 +633,7 @@ bool gale::Context::OS_Draw(bool _displayEveryTime) {
|
||||
}
|
||||
gale::openGL::threadHasContext();
|
||||
echrono::Steady currentTime = echrono::Steady::now();
|
||||
// TODO : Review this ...
|
||||
// this is to prevent the multiple display at the a high frequency ...
|
||||
#if (!defined(__TARGET_OS__Android) && !defined(__TARGET_OS__Windows))
|
||||
if(currentTime - m_previousDisplayTime < echrono::milliseconds(8)) {
|
||||
@ -662,8 +663,6 @@ bool gale::Context::OS_Draw(bool _displayEveryTime) {
|
||||
Release the event processing
|
||||
|
||||
*/
|
||||
|
||||
|
||||
if (m_application != nullptr) {
|
||||
// Redraw all needed elements
|
||||
m_application->onRegenerateDisplay(*this);
|
||||
@ -713,6 +712,7 @@ bool gale::Context::OS_Draw(bool _displayEveryTime) {
|
||||
m_FpsFlush.tic();
|
||||
}
|
||||
if (hasDisplayDone == true) {
|
||||
//GALE_INFO("lklklklklk " << _displayEveryTime);
|
||||
if (m_displayFps == true) {
|
||||
m_FpsFlush.incrementCounter();
|
||||
}
|
||||
|
@ -822,11 +822,16 @@ class X11Interface : public gale::Context {
|
||||
XSync(m_display,0);
|
||||
}
|
||||
// draw after switch the previous windows ...
|
||||
//GALE_DEBUG("specialEventThatNeedARedraw"<<specialEventThatNeedARedraw);
|
||||
if (specialEventThatNeedARedraw == true) {
|
||||
X11_INFO("specialEventThatNeedARedraw = " << specialEventThatNeedARedraw);
|
||||
}
|
||||
hasDisplay = OS_Draw(specialEventThatNeedARedraw);
|
||||
if (hasDisplay == true) {
|
||||
// need to request it every time needed to have a redrawing (this can take some time if the application filter the drfaw periodicity)
|
||||
specialEventThatNeedARedraw = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/****************************************************************************************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user