Perform a glFinish at the beginning and the end of the performance measurement frame to capture all OpenGL timings

This commit is contained in:
Alexander Bock
2016-06-15 09:30:22 +02:00
parent 2dd29e5ecb
commit 76a2f78676

View File

@@ -46,6 +46,7 @@ PerformanceMeasurement::PerformanceMeasurement(std::string identifier,
}
PerformanceMeasurement::~PerformanceMeasurement() {
glFinish();
auto endTime = std::chrono::high_resolution_clock::now();
auto duration = std::chrono::duration_cast<std::chrono::microseconds>(
endTime - _startTime).count();