Add screenshot button to simulate.

PiperOrigin-RevId: 465628684
Change-Id: I0eb86d6b18c25bb437f197229be6d1c57ccbc50a
This commit is contained in:
Kevin Zakka
2022-08-05 12:55:44 -07:00
committed by Copybara-Service
parent 7a0e0ed80c
commit 80b4ffdd6a
4 changed files with 44 additions and 3 deletions
+2
View File
@@ -20,6 +20,7 @@
#include <mutex>
#include <thread>
#include "lodepng.h"
#include <GLFW/glfw3.h>
#include <mujoco/mujoco.h>
@@ -112,6 +113,7 @@ class MJSIMULATEAPI Simulate {
// 1: showing "loading" label, about to load
// 0: model loaded or no load requested.
int loadrequest = 0;
std::atomic_bool screenshotrequest = false;
// strings
char loadError[kMaxFilenameLength] = "";
char dropfilename[kMaxFilenameLength] = "";