Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/161.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
线程:在C+的后台进行处理+;Cinder应用程序保持用户界面的响应性 我很高兴我的第一个C++应用程序在几个小时的黑客攻击后工作。该应用程序将视频中的X维与时间维进行交换 例如: 资料来源:_C++_Image_Background - Fatal编程技术网

线程:在C+的后台进行处理+;Cinder应用程序保持用户界面的响应性 我很高兴我的第一个C++应用程序在几个小时的黑客攻击后工作。该应用程序将视频中的X维与时间维进行交换 例如: 资料来源:

线程:在C+的后台进行处理+;Cinder应用程序保持用户界面的响应性 我很高兴我的第一个C++应用程序在几个小时的黑客攻击后工作。该应用程序将视频中的X维与时间维进行交换 例如: 资料来源:,c++,image,background,C++,Image,Background,任何关于如何优化源代码的建议都是受欢迎的,但我感兴趣的是如何在update()中以一种不会使应用程序如此无响应的方式进行图像处理 (在libcinder论坛上交叉发布:)答案似乎是错的。煤渣的作用是这样的: void MyApp::setup() { thread(&MyApp::processFrame, this); } void MyApp::processFrame() { // TODO define mFrameTemp here // Copy to the t

任何关于如何优化源代码的建议都是受欢迎的,但我感兴趣的是如何在
update()
中以一种不会使应用程序如此无响应的方式进行图像处理


(在libcinder论坛上交叉发布:)

答案似乎是错的。煤渣的作用是这样的:

void MyApp::setup()
{
  thread(&MyApp::processFrame, this);
}
void MyApp::processFrame()
{
  // TODO define mFrameTemp here
  // Copy to the texture which we'll actually render
  mFrame = mFrameTemp;
}
void MyApp::draw()
{
  if (mFrame)
    gl::draw(mFrame, mFrame.getBounds());
}

你还有问题吗?否则可能会将其标记为已解决。它仍然出现在未回答的问题中。如何?在标题中添加[已解决]?下面有一个框。。。添加您的编辑作为答案,然后接受它。