Skip to content
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

Merged
merged 1 commit into from
Jan 9, 2017

Conversation

tribal-tec
Copy link
Member

No description provided.


/**
* Enable recording of given buffers for screenshot feature.
* @version 2.1
Copy link
Member

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?)

Copy link
Member Author

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( ));
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refactor into method

Copy link
Member Author

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";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use image->frameNumber

Copy link
Member Author

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()
Copy link
Member

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();

Copy link
Member Author

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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't remove

@tribal-tec tribal-tec merged commit 3e936be into Eyescale:master Jan 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants