mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-08 04:20:14 -05:00
Proof of concept: Compensate async decode() with busy wait in postSync()
This commit is contained in:
@@ -244,6 +244,10 @@ const std::string EXPECTED_SLAVE_LOG = (slavelog << PRE_SYNC << DECODE << POST_
|
||||
|
||||
#define LOG_BEGIN(x) minilog << (x).begin
|
||||
#define LOG_END(x) minilog << (x).end
|
||||
#define BUSY_WAIT_FOR(x) \
|
||||
while (minilog.str().size() && minilog.str().back() != (x)) { \
|
||||
std::this_thread::sleep_for(std::chrono::microseconds(10)); \
|
||||
}\
|
||||
|
||||
void mainPreSyncFunc() {
|
||||
LOG_BEGIN(PRE_SYNC);
|
||||
@@ -253,6 +257,9 @@ void mainPreSyncFunc() {
|
||||
}
|
||||
|
||||
void mainPostSyncPreDrawFunc() {
|
||||
if (!sgct::Engine::instance()->isMaster()) {
|
||||
BUSY_WAIT_FOR(DECODE.end);
|
||||
}
|
||||
LOG_BEGIN(POST_SYNC);
|
||||
OsEng.postSynchronizationPreDraw();
|
||||
LOG_END(POST_SYNC);
|
||||
|
||||
+2
-2
@@ -9,11 +9,11 @@ return {
|
||||
-- of all entities that will be visible during an instance of OpenSpace
|
||||
--Scene = "${SCENE}/default.scene",
|
||||
|
||||
-- Scene = "${SCENE}/globebrowsing.scene",
|
||||
Scene = "${SCENE}/globebrowsing.scene",
|
||||
-- Scene = "${SCENE}/rosetta.scene",
|
||||
-- Scene = "${SCENE}/dawn.scene",
|
||||
-- Scene = "${SCENE}/newhorizons.scene",
|
||||
Scene = "${SCENE}/osirisrex.scene",
|
||||
--Scene = "${SCENE}/osirisrex.scene",
|
||||
|
||||
Paths = {
|
||||
SGCT = "${BASE_PATH}/config/sgct",
|
||||
|
||||
Reference in New Issue
Block a user