YieldCurrentThread for Fortran interface
Real-time interactive 3D graphics API for scientific simulations
Status: Beta
Brought to you by:
ravidavi
Does the C/Fortran interface need a wrapper for OpenThreads YieldCurrentThread? I notice in test2.cpp you are calling this in a loop while checking to see if the window is still running.
I've created an example implementation of the proposed wrapper here.
The YieldCurrentThread loop is really only needed if your program does nothing of its own while graphics are being drawn. For real programs, they're always doing something else ... e.g. event polling, simulation processing, etc. This is why I didn't bother adding it to the C/Fortran interface, since Copernicus (or any other sim) always has its own tasks to perform while OpenFrames draws the scene.
In the demos, event polling is done by OpenFrames itself and the application isn't doing any data processing of its own, which is why YieldCurrentThread is used.
However, if you think this functionality might just be good to have in general, then I can add it to the C/Fortran interface.
I think it would be nice to have for the simple use case when the application is only an OpenFrames window (similar to the demo). I can see uses for this.