Move image object to global variable so it does not get re-declared on every actionLoad()
This commit is contained in:
parent
4a9ddae1c4
commit
27921f0155
|
@ -37,6 +37,7 @@ GLint screenHeight = 0;
|
|||
|
||||
Image img;
|
||||
State state;
|
||||
Mat image;
|
||||
|
||||
uint64_t exposureTime = 0;
|
||||
uint64_t exposureElapsedTime = 0;
|
||||
|
@ -101,7 +102,7 @@ uint64_t actionLoad () {
|
|||
auto localStartTime = steady_clock::now();
|
||||
string imagePath = state.getImage();
|
||||
vector<uint64_t> position = state.getPosition();
|
||||
Mat image = img.loadImage(imagePath, position[0], position[1], position[2], position[3]);
|
||||
image = img.loadImage(imagePath, position[0], position[1], position[2], position[3]);
|
||||
glGenTextures(1, &imageTexture);
|
||||
glBindTexture(GL_TEXTURE_2D, imageTexture);
|
||||
|
||||
|
|
Loading…
Reference in New Issue