feat: time tracking added
This commit is contained in:
11
main.cpp
11
main.cpp
@@ -7,6 +7,7 @@
|
|||||||
#include <QImage>
|
#include <QImage>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
|
#include <chrono>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -77,7 +78,17 @@ int main(int argc, char *argv[]) {
|
|||||||
polygon poly =
|
polygon poly =
|
||||||
polygon(vec3(0.9, 0.9, 1.0), vec3(0.5, 0.1, 1.0), vec3(0.1, 0.9, 1.0));
|
polygon(vec3(0.9, 0.9, 1.0), vec3(0.5, 0.1, 1.0), vec3(0.1, 0.9, 1.0));
|
||||||
|
|
||||||
|
std::chrono::steady_clock::time_point begin =
|
||||||
|
std::chrono::steady_clock::now();
|
||||||
renderer.render(&testModel);
|
renderer.render(&testModel);
|
||||||
|
std::chrono::steady_clock::time_point end =
|
||||||
|
std::chrono::steady_clock::now();
|
||||||
|
|
||||||
|
std::cout << "Time difference = "
|
||||||
|
<< std::chrono::duration_cast<std::chrono::milliseconds>(end -
|
||||||
|
begin)
|
||||||
|
.count()
|
||||||
|
<< "[ms]" << std::endl;
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
|
|
||||||
uint8_t *pixel = new uint8_t[64 * 64 * 3];
|
uint8_t *pixel = new uint8_t[64 * 64 * 3];
|
||||||
|
|||||||
Reference in New Issue
Block a user