-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement view screenshot feature #607
Conversation
|
||
/** | ||
* Enable recording of given buffers for screenshot feature. | ||
* @version 2.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make Frame::Buffer an enum class and use here (as separate PR?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
os << "Screenshot written to " << screenshotPath; | ||
_setMessage( os.str( )); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactor into method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Lambda now :)
const auto& image = view->pollScreenshot(); | ||
if( image.hasPixelData( eq::Frame::BUFFER_COLOR )) | ||
{ | ||
const std::string screenshotPath = "./eqPly_" + std::to_string( frameNumber ) + ".png"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use image->frameNumber
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -3,6 +3,9 @@ Changelog {#Changelog} | |||
|
|||
# git master | |||
|
|||
* [607](https://github.com/Eyescale/Equalizer/pull/607): | |||
Implement view screenshot feature: eq::View::setRecording() and | |||
eq::View::pollScreenshot() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void enableScreenshot( buffers, func( frameNumber, image ));
void disableScreenshot();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
{ | ||
_impl->screenshotFunc( frameNumber, *screenshot.image ); | ||
_impl->screenshot.erase( frameNumber ); | ||
_impl->screenshotFunc = ScreenshotFunc(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't remove
No description provided.