From 95158f96e6b98cb9510cca5ccbb98270516a622c Mon Sep 17 00:00:00 2001 From: mattmcw Date: Tue, 22 Oct 2024 17:07:24 -0400 Subject: [PATCH] Testing maybe disasterous change that releases image data after loaded. Might break display --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index c2bd0e4..8e1553e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -122,6 +122,7 @@ uint64_t actionLoad () { GL_RGB, // Input image format (i.e. GL_RGB, GL_RGBA, GL_BGR etc.) GL_UNSIGNED_BYTE, // Image data type image.ptr()); // The actual image data itself + image.release(); auto localCurrentTime = steady_clock::now(); auto localElapsedTime = duration_cast(localCurrentTime - localStartTime).count(); cout << "{ \"load_time\" : " << localElapsedTime << " }" << endl; @@ -148,6 +149,7 @@ void loadBlank () { GL_RGB, // Input image format (i.e. GL_RGB, GL_RGBA, GL_BGR etc.) GL_UNSIGNED_BYTE, // Image data type blank.ptr()); // The actual image data itself + blank.release(); } void initImageTexture() {