예제 #1
0
void RenderSession::EndSceneEdit() {
	assert (started);
	assert (editMode);

	// Make a copy of the edit actions
	const EditActionList editActions = renderConfig->scene->editActions;
	
	if ((renderEngine->GetEngineType() != RTPATHOCL) &&
			(renderEngine->GetEngineType() != RTBIASPATHOCL)) {
		SLG_LOG("[RenderSession] Edit actions: " << editActions);

		// RTPATHOCL and RTBIASPATHOCL handle film Reset on their own
		if (editActions.HasAnyAction())
			film->Reset();
	}

	renderEngine->EndSceneEdit(editActions);
	editMode = false;
}
예제 #2
0
void RTPathOCLRenderEngine::EndSceneEdit(const EditActionList &editActions) {
	const bool requireSync = editActions.HasAnyAction() && !editActions.HasOnly(CAMERA_EDIT);

	editMutex.lock();
	if (requireSync) {
		// This is required to move the rendering thread forward
		frameBarrier->wait();
		editCanStart.wait(editMutex);
	}

	PathOCLRenderEngine::EndSceneEdit(editActions);

	updateActions.AddActions(editActions.GetActions());
	editMutex.unlock();

	if (requireSync) {
		// This is required to move the rendering thread forward
		frameBarrier->wait();
	}
}