mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 04:30:09 -05:00
Feature/serve screenshots (#1003)
* Take screnshots using lua function, returning screenshot number. Add screenshot endpoint. * Change capitalization from screenShot to screenshot * Fix screenshot filename collision bug when using multiple windows.
This commit is contained in:
@@ -107,7 +107,7 @@ struct WindowDelegate {
|
||||
|
||||
bool (*isFisheyeRendering)() = []() { return false; };
|
||||
|
||||
void (*takeScreenshot)(bool applyWarping) = [](bool) { };
|
||||
unsigned int(*takeScreenshot)(bool applyWarping) = [](bool) { return 0u; };
|
||||
|
||||
void (*swapBuffer)() = []() {};
|
||||
|
||||
|
||||
@@ -142,9 +142,14 @@ public:
|
||||
void setResolveData(ghoul::Dictionary resolveData);
|
||||
|
||||
/**
|
||||
* Mark that one screenshot should be taken
|
||||
* Take a screenshot and store in the ${SCREENSHOTS} directory
|
||||
*/
|
||||
void takeScreenShot();
|
||||
void takeScreenshot();
|
||||
|
||||
/**
|
||||
* Get the filename of the latest screenshot
|
||||
*/
|
||||
unsigned int latestScreenshotNumber() const;
|
||||
|
||||
/**
|
||||
* Returns the Lua library that contains all Lua functions available to affect the
|
||||
@@ -187,8 +192,6 @@ private:
|
||||
properties::BoolProperty _showVersionInfo;
|
||||
properties::BoolProperty _showCameraInfo;
|
||||
|
||||
properties::TriggerProperty _takeScreenshot;
|
||||
bool _shouldTakeScreenshot = false;
|
||||
properties::BoolProperty _applyWarping;
|
||||
properties::BoolProperty _showFrameInformation;
|
||||
#ifdef OPENSPACE_WITH_INSTRUMENTATION
|
||||
@@ -226,6 +229,7 @@ private:
|
||||
properties::Vec3Property _masterRotation;
|
||||
|
||||
uint64_t _frameNumber = 0;
|
||||
unsigned int _latestScreenshotNumber = 0;
|
||||
|
||||
std::vector<ghoul::opengl::ProgramObject*> _programs;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user