Move glDeleteTextures staements
This commit is contained in:
parent
d6d3632315
commit
d5b2b63681
|
@ -80,6 +80,7 @@ uint64_t actionStop () {
|
||||||
completed = true;
|
completed = true;
|
||||||
auto currentTime = steady_clock::now();
|
auto currentTime = steady_clock::now();
|
||||||
auto elapsedTime = duration_cast<milliseconds>(currentTime - startTime).count();
|
auto elapsedTime = duration_cast<milliseconds>(currentTime - startTime).count();
|
||||||
|
glDeleteTextures(1, &imageTexture);
|
||||||
cout << "{ \"exposed\" : " << elapsedTime << ", \"exposure\" : null }" << endl;
|
cout << "{ \"exposed\" : " << elapsedTime << ", \"exposure\" : null }" << endl;
|
||||||
return elapsedTime;
|
return elapsedTime;
|
||||||
}
|
}
|
||||||
|
@ -165,7 +166,6 @@ void display () {
|
||||||
actionDisplay();
|
actionDisplay();
|
||||||
} else if (state.getAction() == STOP) {
|
} else if (state.getAction() == STOP) {
|
||||||
data = actionStop();
|
data = actionStop();
|
||||||
glDeleteTextures(1, &imageTexture);
|
|
||||||
}
|
}
|
||||||
state.setInactive();
|
state.setInactive();
|
||||||
}
|
}
|
||||||
|
@ -182,12 +182,12 @@ void display () {
|
||||||
auto currentTime = steady_clock::now();
|
auto currentTime = steady_clock::now();
|
||||||
auto elapsedTime = duration_cast<milliseconds>(currentTime - startTime).count();
|
auto elapsedTime = duration_cast<milliseconds>(currentTime - startTime).count();
|
||||||
if (elapsedTime >= exposureTime) {
|
if (elapsedTime >= exposureTime) {
|
||||||
|
glDeleteTextures(1, &imageTexture);
|
||||||
exposureElapsedTime = elapsedTime;
|
exposureElapsedTime = elapsedTime;
|
||||||
cout << "{ \"exposed\" : " << elapsedTime << ", \"exposure\" : " << exposureTime << " }" << endl;
|
cout << "{ \"exposed\" : " << elapsedTime << ", \"exposure\" : " << exposureTime << " }" << endl;
|
||||||
displaying = false;
|
displaying = false;
|
||||||
//timing = false;
|
//timing = false;
|
||||||
completed = true;
|
completed = true;
|
||||||
glDeleteTextures(1, &imageTexture);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue