In the process of working on a Linux version some problems were found in initialization and glasses state management. Since they are relevant to other platforms I've pulled these fixes together here. I have excluded changes to build-on-push.yml because the Linux version of the plugin still has some issues to work out.
Problems and fixes:
1) A race condition was found in initialization that would cause rendering to start before frame textures had been created. This was caused when the READY state flipped between the update_connection() call and the get_events() call. The solution implemented was to move the graphics initialization into the start_display() function call chain. Since this is the function that starts rendering it can ensure that textures are setup first.
Although it has never seemed to come up, there are situations where previous state variable might be reset before changes could be detected. The fix for this was stop using a single var for this and track separate vars in each place changes needed to be detected.
There are a few minor changes to account for differences in C++ library functions between Windows and Linux.
In the process of working on a Linux version some problems were found in initialization and glasses state management. Since they are relevant to other platforms I've pulled these fixes together here. I have excluded changes to
build-on-push.yml
because the Linux version of the plugin still has some issues to work out.Problems and fixes: 1) A race condition was found in initialization that would cause rendering to start before frame textures had been created. This was caused when the READY state flipped between the
update_connection()
call and theget_events()
call. The solution implemented was to move the graphics initialization into thestart_display()
function call chain. Since this is the function that starts rendering it can ensure that textures are setup first.Although it has never seemed to come up, there are situations where previous state variable might be reset before changes could be detected. The fix for this was stop using a single var for this and track separate vars in each place changes needed to be detected.
There are a few minor changes to account for differences in C++ library functions between Windows and Linux.
Update SConstruct for Linux build