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