Fix queries stop working after changing resolution
This commit is contained in:
parent
0e3398a46b
commit
971db902a8
@ -263,8 +263,9 @@ ScopedGPUTimer::~ScopedGPUTimer()
|
|||||||
}
|
}
|
||||||
|
|
||||||
GPUTimer::GPUTimer(const char* name)
|
GPUTimer::GPUTimer(const char* name)
|
||||||
: initialised(false), lastResult(0), canSubmitQuery(true), m_name(name)
|
: m_name(name)
|
||||||
{
|
{
|
||||||
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned GPUTimer::elapsedTimeus()
|
unsigned GPUTimer::elapsedTimeus()
|
||||||
|
@ -61,6 +61,12 @@ public:
|
|||||||
GPUTimer(const char* name);
|
GPUTimer(const char* name);
|
||||||
unsigned elapsedTimeus();
|
unsigned elapsedTimeus();
|
||||||
const char* getName() const { return m_name; }
|
const char* getName() const { return m_name; }
|
||||||
|
void reset()
|
||||||
|
{
|
||||||
|
initialised = false;
|
||||||
|
lastResult = 0;
|
||||||
|
canSubmitQuery = true;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class VertexUtils
|
class VertexUtils
|
||||||
|
@ -897,6 +897,13 @@ void IrrDriver::applyResolutionSettings()
|
|||||||
SharedGPUObjects::reset();
|
SharedGPUObjects::reset();
|
||||||
initDevice();
|
initDevice();
|
||||||
|
|
||||||
|
#ifndef SERVER_ONLY
|
||||||
|
for (unsigned i = 0; i < Q_LAST; i++)
|
||||||
|
{
|
||||||
|
m_perf_query[i]->reset();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
font_manager = new FontManager();
|
font_manager = new FontManager();
|
||||||
font_manager->loadFonts();
|
font_manager->loadFonts();
|
||||||
// Re-init GUI engine
|
// Re-init GUI engine
|
||||||
|
Loading…
Reference in New Issue
Block a user