-
Notifications
You must be signed in to change notification settings - Fork 287
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
GlutWindow::screenshot() doesn't work #395
Comments
it works for me, and I have some what related question, is it possible to change in /dart/gui/Win3D.cpp if (mCapture)
screenshot(); to if (mCapture)
std::async(std::launch::async, screenshot); |
Is there a particular motivation for launching it in a thread? I'd be concerned about race conditions causing problems, such as missing the frame that the user wanted, or worse: capturing a frame which is only partially rendered. |
Out of curiosity, which platform are you using? I've never seen this function working on ubuntu. |
I am using ubuntu as well, I did not check whether it is working on my computer, just saw it while reading more about C++11. |
I meant |
I guess it works on my computer. When I press 'c', |
I manually created Also, I have a similar concern about the race conditions as @mxgrey mentioned. The screen data will be shared by the renderer and the screen-capturing threads. |
which fix will be better //...
#include <boost/filesystem.hpp>
//...
void Win3D::keyboard(unsigned char _key, int /*_x*/, int /*_y*/) {
char directory[8] = "frames";
//...
case 'c':
case 'C':
//...
if (!boost::filesystem::exists(directory)) {
boost::filesystem::create_directory(directory);
}
if (!boost::filesystem::is_directory(directory)) {
std::cout << "frames/ is not a directory, cannot write a screenshot\n";
} or something without boost::filesystem |
I created a pull request for this (#623), which is similar to your suggestion but not using |
No description provided.
The text was updated successfully, but these errors were encountered: